Skip to content

Commit 88e8bb2

Browse files
rphilliSkia Commit-Bot
authored andcommitted
Fix UMR (valgrind) bug in GrDrawingManager
Even prior to https://skia-review.googlesource.com/c/skia/+/332600 (Change UnrefDDLTask to just be the DDLTask) there was no good reason the 'fRenderTask' array and the 'idArray' kept a strict 1-1 correspondence. Change-Id: Ib92b47b724c319f52fff459d3dc28c49c17bd045 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333576 Reviewed-by: Julia Lavrova <jlavrova@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
1 parent 40022ad commit 88e8bb2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/gpu/GrDrawingManager.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#include "src/image/SkSurface_Gpu.h"
4646

4747
void GrDrawingManager::RenderTaskDAG::gatherIDs(SkSTArray<8, uint32_t, true>* idArray) const {
48-
idArray->reset(fRenderTasks.count());
48+
idArray->reserve_back(fRenderTasks.count());
4949
for (int i = 0; i < fRenderTasks.count(); ++i) {
5050
if (fRenderTasks[i]) {
5151
fRenderTasks[i]->gatherIDs(idArray);
@@ -933,4 +933,3 @@ void GrDrawingManager::flushIfNecessary() {
933933
resourceCache->purgeAsNeeded();
934934
}
935935
}
936-

0 commit comments

Comments
 (0)