aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GpuLayerCacheTest.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2014-12-16 07:27:30 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-16 07:27:30 -0800
commit702eb9622102599d94ab6798e6227cf29f48c2d3 (patch)
tree4f89d2bd00efba8a11df210765efa3ea3303a6ff /tests/GpuLayerCacheTest.cpp
parent9a5380dd358a9c559a41beef7cb368cd7f0ca51f (diff)
Fix layer hoisting image filter corner cases
This CL fixes 5 bugs related to hoisting image filters: For image filters the src layer (the one prior to filtering) often needs to be smaller then the final layer. This requires the saveLayer's optional bounds to be stored (in SkLayerInfo.h and SkRecordDraw.cpp) and then used in compute_source_rect and carried around in GrCachedLayer. The image filters can add an extra offset to the final draw operation. This is now computed in GrLayerHoister::FilterLayer and carried around in GrCachedLayer. Filtered layers must use exact matches. This is now done in GrLayerCache::lock. The filter cache requires a valid matrix so it can compute the correct offset. This is now done in GrLayerHoister::FilterLayer. Filtered layers need to be drawn with drawSprite while unfiltered (and therefore hopefully atlased) layers can be drawn with drawBitmap. This is now done in draw_replacement_bitmap. Review URL: https://codereview.chromium.org/803183003
Diffstat (limited to 'tests/GpuLayerCacheTest.cpp')
-rw-r--r--tests/GpuLayerCacheTest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/GpuLayerCacheTest.cpp b/tests/GpuLayerCacheTest.cpp
index a149c367a0..6b3084b641 100644
--- a/tests/GpuLayerCacheTest.cpp
+++ b/tests/GpuLayerCacheTest.cpp
@@ -43,6 +43,7 @@ static void create_layers(skiatest::Reporter* reporter,
GrCachedLayer* layer = cache->findLayerOrCreate(picture.uniqueID(),
idOffset+i+1, idOffset+i+2,
SkIRect::MakeEmpty(),
+ SkIRect::MakeEmpty(),
SkMatrix::I(),
indices, 1,
NULL);