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

Unified Diff: tools/PictureRenderer.cpp

Issue 718443002: Change where layer hoisting data is gathered (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-GPU build Created 6 years, 1 month 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 | « tests/PictureTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/PictureRenderer.cpp
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index 1c31e6865ad36216e1a82c57447a28a0d95c76ae..f2fd6b73fa8d968a902d915fbb4e23f347fe5c6f 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -223,10 +223,14 @@ void PictureRenderer::buildBBoxHierarchy() {
if (kNone_BBoxHierarchyType != fBBoxHierarchyType && fPicture) {
SkAutoTDelete<SkBBHFactory> factory(this->getFactory());
SkPictureRecorder recorder;
+ uint32_t flags = this->recordFlags();
+ if (fUseMultiPictureDraw) {
+ flags |= SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag;
+ }
SkCanvas* canvas = recorder.beginRecording(fPicture->cullRect().width(),
fPicture->cullRect().height(),
factory.get(),
- this->recordFlags());
+ flags);
fPicture->playback(canvas);
fPicture.reset(recorder.endRecording());
}
@@ -707,8 +711,12 @@ bool TiledPictureRenderer::render(SkBitmap** out) {
surfaces[i]->getCanvas()->setMatrix(fCanvas->getTotalMatrix());
SkPictureRecorder recorder;
+ SkRTreeFactory bbhFactory;
+
SkCanvas* c = recorder.beginRecording(SkIntToScalar(fTileRects[i].width()),
- SkIntToScalar(fTileRects[i].height()));
+ SkIntToScalar(fTileRects[i].height()),
+ &bbhFactory,
+ SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag);
c->save();
SkMatrix mat;
mat.setTranslate(-SkIntToScalar(fTileRects[i].fLeft),
« no previous file with comments | « tests/PictureTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698