From e2f2b984443e870319e107374f7d786f243a20ae Mon Sep 17 00:00:00 2001 From: robertphillips Date: Sun, 8 Jun 2014 13:12:44 -0700 Subject: [PATCH] No longer limit SkPictureRecorder::partialReplay to Android Toggling this for local testing is a bit of a chore. R=mtklein@google.com, reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/316173004 --- include/core/SkPictureRecorder.h | 2 -- src/core/SkPictureRecorder.cpp | 2 -- tests/PictureTest.cpp | 2 -- 3 files changed, 6 deletions(-) diff --git a/include/core/SkPictureRecorder.h b/include/core/SkPictureRecorder.h index 545dc31bb6..d9372d89d0 100644 --- a/include/core/SkPictureRecorder.h +++ b/include/core/SkPictureRecorder.h @@ -55,14 +55,12 @@ public: void internalOnly_EnableOpts(bool enableOpts); private: -#ifdef SK_BUILD_FOR_ANDROID /** Replay the current (partially recorded) operation stream into canvas. This call doesn't close the current recording. */ friend class AndroidPicture; friend class SkPictureRecorderReplayTester; // for unit testing void partialReplay(SkCanvas* canvas) const; -#endif SkAutoTUnref fPicture; SkPictureRecord* fCanvas; // ref counted diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp index 31302d0cbc..d0de355047 100644 --- a/src/core/SkPictureRecorder.cpp +++ b/src/core/SkPictureRecorder.cpp @@ -68,7 +68,6 @@ void SkPictureRecorder::internalOnly_EnableOpts(bool enableOpts) { } } -#ifdef SK_BUILD_FOR_ANDROID void SkPictureRecorder::partialReplay(SkCanvas* canvas) const { if (NULL == fPicture.get() || NULL == canvas) { // Not recording or nothing to replay into @@ -82,4 +81,3 @@ void SkPictureRecorder::partialReplay(SkCanvas* canvas) const { false)); playback->draw(*canvas, NULL); } -#endif diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp index f65c840899..706cc5c6ac 100644 --- a/tests/PictureTest.cpp +++ b/tests/PictureTest.cpp @@ -919,7 +919,6 @@ static void set_canvas_to_save_count_4(SkCanvas* canvas) { canvas->save(); } -#ifdef SK_BUILD_FOR_ANDROID /** * A canvas that records the number of saves, saveLayers and restores. */ @@ -1042,7 +1041,6 @@ DEF_TEST(PictureRecorder_replay, reporter) { REPORTER_ASSERT(reporter, !copy->willPlayBackBitmaps()); } } -#endif static void test_unbalanced_save_restores(skiatest::Reporter* reporter) { SkCanvas testCanvas(100, 100);