From 8005bff7e631a269f0dfaae93ff9963dc0e5ff39 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Fri, 26 Jan 2018 13:26:38 -0500 Subject: hide picture virtuals (no public callers) This prepares the way for a clean impl of a "placeholder" picture that never unrolls Bug: skia: Change-Id: I3b5785c5c94432b54e9a7dc280b2a6e716592473 Reviewed-on: https://skia-review.googlesource.com/100260 Commit-Queue: Mike Reed Reviewed-by: Mike Klein --- tests/PictureTest.cpp | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'tests/PictureTest.cpp') diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp index 714338f9d1..4eeec35497 100644 --- a/tests/PictureTest.cpp +++ b/tests/PictureTest.cpp @@ -19,7 +19,7 @@ #include "SkMD5.h" #include "SkMiniRecorder.h" #include "SkPaint.h" -#include "SkPicture.h" +#include "SkPicturePriv.h" #include "SkPictureRecorder.h" #include "SkPixelRef.h" #include "SkRectPriv.h" @@ -446,7 +446,7 @@ static void test_cull_rect_reset(skiatest::Reporter* reporter) { canvas->drawRect(bounds, paint); canvas->drawRect(bounds, paint); sk_sp p(recorder.finishRecordingAsPictureWithCull(bounds)); - const SkBigPicture* picture = p->asSkBigPicture(); + const SkBigPicture* picture = SkPicturePriv::AsBigPicture(p.get()); REPORTER_ASSERT(reporter, picture); SkRect finalCullRect = picture->cullRect(); @@ -813,24 +813,3 @@ DEF_TEST(Picture_UpdatedCull_2, r) { REPORTER_ASSERT(r, pic->cullRect() == SkRectPriv::MakeLargest()); } -DEF_TEST(Picture_RecordsFlush, r) { - SkPictureRecorder recorder; - - auto canvas = recorder.beginRecording(SkRect::MakeWH(100,100)); - for (int i = 0; i < 10; i++) { - canvas->clear(0); - for (int j = 0; j < 10; j++) { - canvas->drawRect(SkRect::MakeXYWH(i*10,j*10,10,10), SkPaint()); - } - canvas->flush(); - } - - // Did we record the flushes? - auto pic = recorder.finishRecordingAsPicture(); - REPORTER_ASSERT(r, pic->approximateOpCount() == 120); // 10 clears, 100 draws, 10 flushes - - // Do we serialize and deserialize flushes? - auto skp = pic->serialize(); - auto back = SkPicture::MakeFromData(skp->data(), skp->size()); - REPORTER_ASSERT(r, back->approximateOpCount() == pic->approximateOpCount()); -} -- cgit v1.2.3