Index: src/gpu/GrLayerCache.cpp |
diff --git a/src/gpu/GrLayerCache.cpp b/src/gpu/GrLayerCache.cpp |
index 6b176753987c6634830a2b20ee55dc7c6c9029a3..a5c25f17a4e537072de05d9750f23d1cf10fcce7 100644 |
--- a/src/gpu/GrLayerCache.cpp |
+++ b/src/gpu/GrLayerCache.cpp |
@@ -126,10 +126,12 @@ GrCachedLayer* GrLayerCache::createLayer(uint32_t pictureID, |
int start, int stop, |
const SkIRect& bounds, |
const SkMatrix& ctm, |
+ const int* key, |
+ int keySize, |
const SkPaint* paint) { |
SkASSERT(pictureID != SK_InvalidGenID && start >= 0 && stop > 0); |
- GrCachedLayer* layer = SkNEW_ARGS(GrCachedLayer, (pictureID, start, stop, bounds, ctm, paint)); |
+ GrCachedLayer* layer = SkNEW_ARGS(GrCachedLayer, (pictureID, start, stop, bounds, ctm, key, keySize, paint)); |
fLayerHash.add(layer); |
return layer; |
} |
@@ -137,20 +139,24 @@ GrCachedLayer* GrLayerCache::createLayer(uint32_t pictureID, |
GrCachedLayer* GrLayerCache::findLayer(uint32_t pictureID, |
int start, |
const SkIRect& bounds, |
- const SkMatrix& ctm) { |
+ const SkMatrix& ctm, |
+ const int* key, |
+ int keySize) { |
SkASSERT(pictureID != SK_InvalidGenID && start > 0); |
- return fLayerHash.find(GrCachedLayer::Key(pictureID, start, bounds, ctm)); |
+ return fLayerHash.find(GrCachedLayer::Key(pictureID, start, bounds, ctm, key, keySize)); |
} |
GrCachedLayer* GrLayerCache::findLayerOrCreate(uint32_t pictureID, |
int start, int stop, |
const SkIRect& bounds, |
const SkMatrix& ctm, |
+ const int* key, |
+ int keySize, |
const SkPaint* paint) { |
SkASSERT(pictureID != SK_InvalidGenID && start >= 0 && stop > 0); |
- GrCachedLayer* layer = fLayerHash.find(GrCachedLayer::Key(pictureID, start, bounds, ctm)); |
+ GrCachedLayer* layer = fLayerHash.find(GrCachedLayer::Key(pictureID, start, bounds, ctm, key, keySize)); |
if (NULL == layer) { |
- layer = this->createLayer(pictureID, start, stop, bounds, ctm, paint); |
+ layer = this->createLayer(pictureID, start, stop, bounds, ctm, key, keySize, paint); |
} |
return layer; |