aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMultiPictureDraw.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2014-12-01 09:09:27 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-01 09:09:27 -0800
commit01d6e5f462d1d52203ee1a6660415877e4cf2dde (patch)
treeddbfc5b976c891adf2e318008043a76e9c4a7f8d /src/core/SkMultiPictureDraw.cpp
parente05162d15741eb642080a31f28c38a99b3142dfb (diff)
Use variable length key (rather than accumulated matrix) as save layer hoisting key
Adding the rendering canvas' CTM to the layer hoisting key (i.e., Add support for hoisting layers in pictures drawn with a matrix - https://codereview.chromium.org/748853002/) has increased the cache miss rate due to accumulated floating point error. This CL fixes part of the issue by using the chain of operation indices leading to each saveLayer as the key. The canvas' CTM must still form part of the key but should be less subject to accumulated error. BUG=skia:2315 Review URL: https://codereview.chromium.org/753253002
Diffstat (limited to 'src/core/SkMultiPictureDraw.cpp')
-rw-r--r--src/core/SkMultiPictureDraw.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkMultiPictureDraw.cpp b/src/core/SkMultiPictureDraw.cpp
index 51feae55d8..bd1e8fe08c 100644
--- a/src/core/SkMultiPictureDraw.cpp
+++ b/src/core/SkMultiPictureDraw.cpp
@@ -170,8 +170,8 @@ void SkMultiPictureDraw::draw() {
GrReplacements replacements;
- GrLayerHoister::ConvertLayersToReplacements(needRendering, &replacements);
- GrLayerHoister::ConvertLayersToReplacements(recycled, &replacements);
+ GrLayerHoister::ConvertLayersToReplacements(picture, needRendering, &replacements);
+ GrLayerHoister::ConvertLayersToReplacements(picture, recycled, &replacements);
// Render the entire picture using new layers
GrRecordReplaceDraw(picture, canvas, &replacements, initialMatrix, NULL);