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

Unified Diff: src/core/SkLayerInfo.h

Issue 1130283004: Revert of Sketch splitting SkPicture into an interface and SkBigPicture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « src/core/SkBigPicture.cpp ('k') | src/core/SkLayerInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLayerInfo.h
diff --git a/src/core/SkLayerInfo.h b/src/core/SkLayerInfo.h
index 3d4b26960cfa8f9f725d11d36717a4bf28f93c2f..a47c3f1199c52fdd5682bf91a7dbe72b3da2b87e 100644
--- a/src/core/SkLayerInfo.h
+++ b/src/core/SkLayerInfo.h
@@ -8,12 +8,12 @@
#ifndef SkLayerInfo_DEFINED
#define SkLayerInfo_DEFINED
-#include "SkBigPicture.h"
+#include "SkPicture.h"
#include "SkTArray.h"
// This class stores information about the saveLayer/restore pairs found
// within an SkPicture. It is used by Ganesh to perform layer hoisting.
-class SkLayerInfo : public SkBigPicture::AccelData {
+class SkLayerInfo : public SkPicture::AccelData {
public:
// Information about a given saveLayer/restore block in an SkPicture
class BlockInfo {
@@ -33,12 +33,12 @@
SkRect fSrcBounds;
// 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
+ // part of the initial matrix during replay so that it will be
// preserved across setMatrix calls.
SkMatrix fPreMat;
- // The matrix state (in the leaf picture) in which this layer's draws
+ // 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 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;
@@ -60,7 +60,7 @@
int fKeySize; // # of ints
};
- SkLayerInfo() {}
+ SkLayerInfo(Key key) : INHERITED(key) { }
BlockInfo& addBlock() { return fBlocks.push_back(); }
@@ -72,10 +72,14 @@
return fBlocks[index];
}
+ // We may, in the future, need to pass in the GPUDevice in order to
+ // incorporate the clip and matrix state into the key
+ static SkPicture::AccelData::Key ComputeKey();
+
private:
SkTArray<BlockInfo, true> fBlocks;
- typedef SkBigPicture::AccelData INHERITED;
+ typedef SkPicture::AccelData INHERITED;
};
#endif // SkLayerInfo_DEFINED
« no previous file with comments | « src/core/SkBigPicture.cpp ('k') | src/core/SkLayerInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698