aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPictureUtils.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-08 18:45:20 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-08 18:45:20 +0000
commit3d41c4add81e95784faa81f9a59b4a32b7cff082 (patch)
tree612befa9bc405b61c317612031c95e5b58c5b672 /src/gpu/GrPictureUtils.cpp
parent1e44730ade943bba928f289ce9f59430c50c71e5 (diff)
Revert r14650 (Fix rendering artifacts in pull-saveLayers-forward mode - https://codereview.chromium.org/267293007) due to unit test failures
git-svn-id: http://skia.googlecode.com/svn/trunk@14654 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrPictureUtils.cpp')
-rw-r--r--src/gpu/GrPictureUtils.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gpu/GrPictureUtils.cpp b/src/gpu/GrPictureUtils.cpp
index 84a13be466..a66f34c0a6 100644
--- a/src/gpu/GrPictureUtils.cpp
+++ b/src/gpu/GrPictureUtils.cpp
@@ -137,7 +137,16 @@ protected:
device->fInfo.fCTM.postTranslate(SkIntToScalar(-device->getOrigin().fX),
SkIntToScalar(-device->getOrigin().fY));
- device->fInfo.fOffset = device->getOrigin();
+ // We need the x & y values that will yield 'getOrigin' when transformed
+ // by 'draw.fMatrix'.
+ device->fInfo.fOffset.iset(device->getOrigin());
+
+ SkMatrix invMatrix;
+ if (draw.fMatrix->invert(&invMatrix)) {
+ invMatrix.mapPoints(&device->fInfo.fOffset, 1);
+ } else {
+ device->fInfo.fValid = false;
+ }
if (NeedsDeepCopy(paint)) {
// This NULL acts as a signal that the paint was uncopyable (for now)