Chromium Code Reviews| Index: src/gpu/GrLayerCache.h |
| diff --git a/src/gpu/GrLayerCache.h b/src/gpu/GrLayerCache.h |
| index 15fa246c439562823583ba93b2c15382e58377c9..2f8bc7bb2cb6ddf8683112ccbbfcbdd6fa5e8617 100644 |
| --- a/src/gpu/GrLayerCache.h |
| +++ b/src/gpu/GrLayerCache.h |
| @@ -98,9 +98,11 @@ 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) |
| , fTexture(NULL) |
| + , fPaint(paint) |
| , fRect(GrIRect16::MakeEmpty()) |
| , fPlot(NULL) |
| , fLocked(false) { |
| @@ -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; |
|
bsalomon
2014/09/17 13:37:37
Is this just a ptr so that it can be NULL or to sa
robertphillips
2014/09/17 13:43:24
I have a TODO to clean this up (I'm leaning toward
bsalomon
2014/09/17 13:43:49
Acknowledged.
|
| + |
| // 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(); |