Index: src/gpu/GrLayerCache.cpp |
diff --git a/src/gpu/GrLayerCache.cpp b/src/gpu/GrLayerCache.cpp |
index 8e61cb761edec788d33953100fb3fcf0d6f1846a..11a97e4c666e1a56f1291f451be7f687a2ac0f0b 100644 |
--- a/src/gpu/GrLayerCache.cpp |
+++ b/src/gpu/GrLayerCache.cpp |
@@ -120,10 +120,11 @@ void GrLayerCache::freeAll() { |
GrCachedLayer* GrLayerCache::createLayer(uint32_t pictureID, |
int start, int stop, |
const SkIPoint& offset, |
- const SkMatrix& ctm) { |
+ const SkMatrix& ctm, |
+ const SkPaint* paint) { |
SkASSERT(pictureID != SK_InvalidGenID && start > 0 && stop > 0); |
- GrCachedLayer* layer = SkNEW_ARGS(GrCachedLayer, (pictureID, start, stop, offset, ctm)); |
+ GrCachedLayer* layer = SkNEW_ARGS(GrCachedLayer, (pictureID, start, stop, offset, ctm, paint)); |
fLayerHash.add(layer); |
return layer; |
} |
@@ -139,11 +140,12 @@ GrCachedLayer* GrLayerCache::findLayer(uint32_t pictureID, |
GrCachedLayer* GrLayerCache::findLayerOrCreate(uint32_t pictureID, |
int start, int stop, |
const SkIPoint& offset, |
- const SkMatrix& ctm) { |
+ const SkMatrix& ctm, |
+ const SkPaint* paint) { |
SkASSERT(pictureID != SK_InvalidGenID && start > 0 && stop > 0); |
GrCachedLayer* layer = fLayerHash.find(GrCachedLayer::Key(pictureID, start, stop, offset, ctm)); |
if (NULL == layer) { |
- layer = this->createLayer(pictureID, start, stop, offset, ctm); |
+ layer = this->createLayer(pictureID, start, stop, offset, ctm, paint); |
} |
return layer; |