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

Unified Diff: src/gpu/GrLayerCache.h

Issue 559603004: Separate replacement creation from layer discovery (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed initializer list order 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
« no previous file with comments | « no previous file | src/gpu/GrLayerCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrLayerCache.h
diff --git a/src/gpu/GrLayerCache.h b/src/gpu/GrLayerCache.h
index 15fa246c439562823583ba93b2c15382e58377c9..1fb4c1001cc6710751340f2d9c89ad3ed9ee6579 100644
--- a/src/gpu/GrLayerCache.h
+++ b/src/gpu/GrLayerCache.h
@@ -98,8 +98,10 @@ public:
// GrCachedLayer proper
GrCachedLayer(uint32_t pictureID, int start, int stop,
- const SkIPoint& offset, const SkMatrix& ctm)
+ const SkIPoint& offset, const SkMatrix& ctm,
+ const SkPaint* paint)
: fKey(pictureID, start, stop, offset, ctm)
+ , fPaint(paint)
, fTexture(NULL)
, fRect(GrIRect16::MakeEmpty())
, fPlot(NULL)
@@ -122,6 +124,7 @@ public:
fRect = rect;
}
GrTexture* texture() { return fTexture; }
+ const SkPaint* paint() const { return fPaint; }
const GrIRect16& rect() const { return fRect; }
void setPlot(GrPlot* plot) {
@@ -141,6 +144,10 @@ public:
private:
const Key fKey;
+ // The paint used when dropping the layer down into the owning canvas.
+ // Can be NULL.
+ const SkPaint* fPaint;
+
// fTexture is a ref on the atlasing texture for atlased layers and a
// ref on a GrTexture for non-atlased textures.
GrTexture* fTexture;
@@ -184,7 +191,8 @@ public:
GrCachedLayer* findLayerOrCreate(uint32_t pictureID,
int start, int stop,
const SkIPoint& offset,
- const SkMatrix& ctm);
+ const SkMatrix& ctm,
+ const SkPaint* paint);
// Inform the cache that layer's cached image is now required.
// Return true if the layer must be re-rendered. Return false if the
@@ -238,7 +246,8 @@ private:
void initAtlas();
GrCachedLayer* createLayer(uint32_t pictureID, int start, int stop,
- const SkIPoint& offset, const SkMatrix& ctm);
+ const SkIPoint& offset, const SkMatrix& ctm,
+ const SkPaint* paint);
void purgeAll();
« no previous file with comments | « no previous file | src/gpu/GrLayerCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698