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

Unified Diff: src/gpu/GrLayerCache.cpp

Issue 790643009: Revert of Fix layer hoisting image filter corner cases (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « src/gpu/GrLayerCache.h ('k') | src/gpu/GrLayerHoister.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/gpu/GrLayerCache.h ('k') | src/gpu/GrLayerHoister.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698