Index: src/gpu/GrLayerCache.cpp |
diff --git a/src/gpu/GrLayerCache.cpp b/src/gpu/GrLayerCache.cpp |
index e521b3e3239678c5c16d2ec2be35edf7648e9b04..fc5be5fd059d913b60883ab2467ea2d520165e88 100644 |
--- a/src/gpu/GrLayerCache.cpp |
+++ b/src/gpu/GrLayerCache.cpp |
@@ -123,16 +123,14 @@ |
GrCachedLayer* GrLayerCache::createLayer(uint32_t pictureID, |
int start, int stop, |
- const SkIRect& srcIR, |
- const SkIRect& dstIR, |
+ const SkIRect& bounds, |
const SkMatrix& initialMat, |
const unsigned* key, |
int keySize, |
const SkPaint* paint) { |
SkASSERT(pictureID != SK_InvalidGenID && start >= 0 && stop > 0); |
- GrCachedLayer* layer = SkNEW_ARGS(GrCachedLayer, (pictureID, start, stop, |
- srcIR, dstIR, initialMat, |
+ GrCachedLayer* layer = SkNEW_ARGS(GrCachedLayer, (pictureID, start, stop, bounds, initialMat, |
key, keySize, paint)); |
fLayerHash.add(layer); |
return layer; |
@@ -146,8 +144,7 @@ |
GrCachedLayer* GrLayerCache::findLayerOrCreate(uint32_t pictureID, |
int start, int stop, |
- const SkIRect& srcIR, |
- const SkIRect& dstIR, |
+ const SkIRect& bounds, |
const SkMatrix& initialMat, |
const unsigned* key, |
int keySize, |
@@ -155,9 +152,7 @@ |
SkASSERT(pictureID != SK_InvalidGenID && start >= 0 && stop > 0); |
GrCachedLayer* layer = fLayerHash.find(GrCachedLayer::Key(pictureID, initialMat, key, keySize)); |
if (NULL == layer) { |
- layer = this->createLayer(pictureID, start, stop, |
- srcIR, dstIR, initialMat, |
- key, keySize, paint); |
+ layer = this->createLayer(pictureID, start, stop, bounds, initialMat, key, keySize, paint); |
} |
return layer; |
@@ -247,14 +242,8 @@ |
return true; |
} |
- // TODO: make the test for exact match depend on the image filters themselves |
- GrContext::ScratchTexMatch usage = GrContext::kApprox_ScratchTexMatch; |
- if (layer->fFilter) { |
- usage = GrContext::kExact_ScratchTexMatch; |
- } |
- |
SkAutoTUnref<GrTexture> tex( |
- fContext->refScratchTexture(desc, usage)); |
+ fContext->refScratchTexture(desc, GrContext::kApprox_ScratchTexMatch)); |
if (!tex) { |
return false; |