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

Unified Diff: tests/PictureTest.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 | « src/gpu/SkGpuDevice.cpp ('k') | tools/PictureRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PictureTest.cpp
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 1dc37e32edd99f60ea8e7b9cf55d4069cd7b9c22..42bd25806c7ca85561e230ebf2e3ff8e438d7aeb 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -900,11 +900,14 @@ static void test_gpu_picture_optimization(skiatest::Reporter* reporter,
complexPaint.setImageFilter(filter);
SkAutoTUnref<SkPicture> pict, child;
+ SkRTreeFactory bbhFactory;
{
SkPictureRecorder recorder;
- SkCanvas* c = recorder.beginRecording(SkIntToScalar(kWidth), SkIntToScalar(kHeight));
+ SkCanvas* c = recorder.beginRecording(SkIntToScalar(kWidth), SkIntToScalar(kHeight),
+ &bbhFactory,
+ SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag);
c->saveLayer(NULL, &complexPaint);
c->restore();
@@ -937,7 +940,9 @@ static void test_gpu_picture_optimization(skiatest::Reporter* reporter,
SkPictureRecorder recorder;
SkCanvas* c = recorder.beginRecording(SkIntToScalar(kWidth),
- SkIntToScalar(kHeight));
+ SkIntToScalar(kHeight),
+ &bbhFactory,
+ SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag);
// 1)
c->saveLayer(NULL, &complexPaint); // layer #0
c->restore();
@@ -980,14 +985,6 @@ static void test_gpu_picture_optimization(skiatest::Reporter* reporter,
// Now test out the SaveLayer extraction
{
- SkImageInfo info = SkImageInfo::MakeN32Premul(kWidth, kHeight);
-
- SkAutoTUnref<SkSurface> surface(SkSurface::NewScratchRenderTarget(context, info));
-
- SkCanvas* canvas = surface->getCanvas();
-
- canvas->EXPERIMENTAL_optimize(pict);
-
SkPicture::AccelData::Key key = GrAccelData::ComputeAccelDataKey();
const SkPicture::AccelData* data = pict->EXPERIMENTAL_getAccelData(key);
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | tools/PictureRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698