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

Unified Diff: gm/multipicturedraw.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 | « no previous file | include/core/SkCanvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/multipicturedraw.cpp
diff --git a/gm/multipicturedraw.cpp b/gm/multipicturedraw.cpp
index 8ce3deb7638a251f8da84634ac4e30fd4eb084d0..250c28a8d9acddadfec2f3883336a7b0d9656e6a 100644
--- a/gm/multipicturedraw.cpp
+++ b/gm/multipicturedraw.cpp
@@ -55,9 +55,12 @@ static const SkPicture* make_hex_plane_picture(SkColor fillColor) {
stroke.setStrokeWidth(3);
SkPictureRecorder recorder;
+ SkRTreeFactory bbhFactory;
SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kPicWidth),
- SkIntToScalar(kPicHeight));
+ SkIntToScalar(kPicHeight),
+ &bbhFactory,
+ SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag);
SkScalar xPos, yPos = 0;
@@ -102,9 +105,11 @@ static const SkPicture* make_single_layer_hex_plane_picture() {
stroke.setStrokeWidth(3);
SkPictureRecorder recorder;
+ SkRTreeFactory bbhFactory;
static const SkScalar kBig = 10000.0f;
- SkCanvas* canvas = recorder.beginRecording(kBig, kBig);
+ SkCanvas* canvas = recorder.beginRecording(kBig, kBig, &bbhFactory,
+ SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag);
canvas->saveLayer(NULL, NULL);
@@ -156,9 +161,12 @@ static const SkPicture* make_tri_picture() {
stroke.setStrokeWidth(3);
SkPictureRecorder recorder;
+ SkRTreeFactory bbhFactory;
SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kPicWidth),
- SkIntToScalar(kPicHeight));
+ SkIntToScalar(kPicHeight),
+ &bbhFactory,
+ SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag);
SkRect r = tri.getBounds();
r.outset(2.0f, 2.0f); // outset for stroke
canvas->clipRect(r);
@@ -173,9 +181,12 @@ static const SkPicture* make_tri_picture() {
static const SkPicture* make_sub_picture(const SkPicture* tri) {
SkPictureRecorder recorder;
+ SkRTreeFactory bbhFactory;
SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kPicWidth),
- SkIntToScalar(kPicHeight));
+ SkIntToScalar(kPicHeight),
+ &bbhFactory,
+ SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag);
canvas->scale(1.0f/2.0f, 1.0f/2.0f);
@@ -205,9 +216,12 @@ static const SkPicture* make_sierpinski_picture() {
SkAutoTUnref<const SkPicture> pic(make_tri_picture());
SkPictureRecorder recorder;
+ SkRTreeFactory bbhFactory;
SkCanvas* canvas = recorder.beginRecording(SkIntToScalar(kPicWidth),
- SkIntToScalar(kPicHeight));
+ SkIntToScalar(kPicHeight),
+ &bbhFactory,
+ SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag);
static const int kNumLevels = 4;
for (int i = 0; i < kNumLevels; ++i) {
@@ -343,9 +357,12 @@ static void create_content(SkMultiPictureDraw* mpd, PFContentMtd pfGen,
{
SkPictureRecorder recorder;
+ SkRTreeFactory bbhFactory;
SkCanvas* pictureCanvas = recorder.beginRecording(SkIntToScalar(kPicWidth),
- SkIntToScalar(kPicHeight));
+ SkIntToScalar(kPicHeight),
+ &bbhFactory,
+ SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag);
(*pfGen)(pictureCanvas, pictures);
« no previous file with comments | « no previous file | include/core/SkCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698