Fix rendering artifacts in pull-saveLayers-forward mode
This CL fixes 2 bugs in the pre-rendering of saveLayers:
1) The drawBitmapRect call wasn't occurring in device space so could sometimes be double transformed
2) The BBH op skipping in SkPicturePlayback could sometimes mess up the SkPictureStateTree's state
It also reduces the number of layers that are pre-rendered when a BBH is not in use.
Committed: http://code.google.com/p/skia/source/detail?r=14650
R=bsalomon@google.com, reed@google.com
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/267293007
git-svn-id: http://skia.googlecode.com/svn/trunk@14659 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 071e6f4..2709582 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -889,7 +889,8 @@
REPORTER_ASSERT(reporter, kWidth/2 == info2.fSize.fWidth &&
kHeight/2 == info2.fSize.fHeight); // bound reduces size
REPORTER_ASSERT(reporter, info2.fCTM.isIdentity()); // translated
- REPORTER_ASSERT(reporter, 0 == info2.fOffset.fX && 0 == info2.fOffset.fY);
+ REPORTER_ASSERT(reporter, kWidth/2 == info2.fOffset.fX &&
+ kHeight/2 == info2.fOffset.fY);
REPORTER_ASSERT(reporter, NULL != info1.fPaint);
REPORTER_ASSERT(reporter, info2.fIsNested && !info2.fHasNestedLayers); // is nested