aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PictureTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/PictureTest.cpp')
-rw-r--r--tests/PictureTest.cpp25
1 files changed, 2 insertions, 23 deletions
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<SkPicture> 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());
-}