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

Unified Diff: src/gpu/GrPictureUtils.h

Issue 266203003: Infrastructure changes to support pull saveLayers forward task (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fixed Android error Created 6 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/SkPicture.cpp ('k') | src/gpu/GrPictureUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPictureUtils.h
===================================================================
--- src/gpu/GrPictureUtils.h (revision 14579)
+++ src/gpu/GrPictureUtils.h (working copy)
@@ -17,8 +17,21 @@
public:
// Information about a given saveLayer in an SkPicture
struct SaveLayerInfo {
+ // True if the SaveLayerInfo is valid. False if either 'fOffset' is
+ // invalid (due to a non-invertible CTM) or 'fPaint' is NULL (due
+ // to a non-copyable paint).
+ bool fValid;
// The size of the saveLayer
SkISize fSize;
+ // The CTM in which this layer's draws must occur. It already incorporates
+ // the translation needed to map the layer's top-left point to the origin.
+ SkMatrix fCTM;
+ // The offset that needs to be passed to drawBitmap to correctly
+ // position the pre-rendered layer.
+ SkPoint fOffset;
+ // The paint to use on restore. NULL if the paint was not copyable (and
+ // thus that this layer should not be pulled forward).
+ const SkPaint* fPaint;
// The ID of this saveLayer in the picture. 0 is an invalid ID.
size_t fSaveLayerOpID;
// The ID of the matching restore in the picture. 0 is an invalid ID.
@@ -26,6 +39,8 @@
// True if this saveLayer has at least one other saveLayer nested within it.
// False otherwise.
bool fHasNestedLayers;
+ // True if this saveLayer is nested within another. False otherwise.
+ bool fIsNested;
};
GPUAccelData(Key key) : INHERITED(key) { }
@@ -43,6 +58,10 @@
return fSaveLayerInfo[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 ComputeAccelDataKey();
+
protected:
SkTDArray<SaveLayerInfo> fSaveLayerInfo;
« no previous file with comments | « src/core/SkPicture.cpp ('k') | src/gpu/GrPictureUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698