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

Unified Diff: src/gpu/GrPictureUtils.h

Issue 639863005: Track nested picture xform state for layer hoisting (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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
Index: src/gpu/GrPictureUtils.h
diff --git a/src/gpu/GrPictureUtils.h b/src/gpu/GrPictureUtils.h
index 7bcf6322d0767e91168ab246344a3798c0fabecd..8b2e2aaee26277258c99d3bf4d79d11373bb577e 100644
--- a/src/gpu/GrPictureUtils.h
+++ b/src/gpu/GrPictureUtils.h
@@ -28,9 +28,17 @@ public:
const SkPicture* fPicture;
// The device space bounds of this layer.
SkIRect fBounds;
- // The matrix state in which this layer's draws must occur. It does not
- // include the translation needed to map the layer's top-left point to the origin.
- SkMatrix fOriginXform;
+ // The pre-matrix begins as the identity and accumulates the transforms
+ // of the containing SkPictures (if any). This matrix state has to be
+ // part of the initial matrix during replay so that it will be
+ // preserved across setMatrix calls.
+ SkMatrix fInitialMat;
jvanverth1 2014/10/21 18:40:04 This name is confusing -- I keep thinking it's the
robertphillips 2014/10/21 19:54:46 Done. Went with fPreMat.
+ // The matrix state (in the leaf picture) in which this layer's draws
+ // must occur. It will/can be overridden by setMatrix calls in the
+ // layer itself. It does not include the translation needed to map the
+ // layer's top-left point to the origin (which must be part of the
+ // initial matrix).
+ SkMatrix fLocalMat;
// The paint to use on restore. Can be NULL since it is optional.
const SkPaint* fPaint;
// The ID of this saveLayer in the picture. 0 is an invalid ID.

Powered by Google App Engine
This is Rietveld 408576698