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

Unified Diff: src/gpu/GrLayerHoister.h

Issue 753253002: Use variable length key (rather than accumulated matrix) as save layer hoisting key (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more cleanup Created 6 years 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
Index: src/gpu/GrLayerHoister.h
diff --git a/src/gpu/GrLayerHoister.h b/src/gpu/GrLayerHoister.h
index 84c7896abec2b1778a0bd7061f70d5f6bdb10c12..a28f887f6198fd0d6f2cceb1e23080eccf3d022e 100644
--- a/src/gpu/GrLayerHoister.h
+++ b/src/gpu/GrLayerHoister.h
@@ -17,9 +17,11 @@ struct SkRect;
class GrHoistedLayer {
public:
- const SkPicture* fPicture;
+ const SkPicture* fPicture; // the picture that actually contains the layer
+ // (not necessarily the top-most picture)
GrCachedLayer* fLayer;
SkIPoint fOffset;
+ SkMatrix fInitialMat;
SkMatrix fPreMat;
SkMatrix fLocalMat;
};
@@ -86,7 +88,8 @@ public:
@param layers The hoisted layers
@param replacements Replacement object that will be used for a replacement draw
*/
- static void ConvertLayersToReplacements(const SkTDArray<GrHoistedLayer>& layers,
+ static void ConvertLayersToReplacements(const SkPicture* topLevelPicture,
+ const SkTDArray<GrHoistedLayer>& layers,
GrReplacements* replacements);
/** Unlock a group of layers in the layer cache.

Powered by Google App Engine
This is Rietveld 408576698