Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 616023002: Allow previously-hoisted layers to be reused in the same draw (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/gpu/GrPictureUtils.cpp ('K') | « src/gpu/GrPictureUtils.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 30b3668d6b74a709568e357470aa5d182e6cf722..455a8abe0108ef6ba7f2471114815d46b1b8334c 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1850,23 +1850,23 @@ bool SkGpuDevice::EXPERIMENTAL_drawPicture(SkCanvas* mainCanvas, const SkPicture
return true;
}
- SkTDArray<GrLayerHoister::HoistedLayer> atlased, nonAtlased;
+ SkTDArray<GrLayerHoister::HoistedLayer> atlased, nonAtlased, recycled;
if (!GrLayerHoister::FindLayersToHoist(mainPicture, clipBounds, &atlased, &nonAtlased,
- fContext->getLayerCache())) {
+ &recycled, fContext->getLayerCache())) {
return false;
}
GrReplacements replacements;
- GrLayerHoister::DrawLayers(atlased, nonAtlased, &replacements);
+ GrLayerHoister::DrawLayers(atlased, nonAtlased, recycled, &replacements);
// Render the entire picture using new layers
const SkMatrix initialMatrix = mainCanvas->getTotalMatrix();
GrRecordReplaceDraw(mainPicture, mainCanvas, &replacements, initialMatrix, NULL);
- GrLayerHoister::UnlockLayers(fContext->getLayerCache(), atlased, nonAtlased);
+ GrLayerHoister::UnlockLayers(fContext->getLayerCache(), atlased, nonAtlased, recycled);
return true;
}
« src/gpu/GrPictureUtils.cpp ('K') | « src/gpu/GrPictureUtils.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698