No longer limit SkPictureRecorder::partialReplay to Android
authorrobertphillips <robertphillips@google.com>
Sun, 8 Jun 2014 20:12:44 +0000 (13:12 -0700)
committerCommit bot <commit-bot@chromium.org>
Sun, 8 Jun 2014 20:12:44 +0000 (13:12 -0700)
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
src/core/SkPictureRecorder.cpp
tests/PictureTest.cpp

index 545dc31bb613f9979212e94bfe6d4b00edff1b70..d9372d89d06dab256cda310c94fbd9c9c7eaf8e2 100644 (file)
@@ -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<SkPicture> fPicture;
     SkPictureRecord*        fCanvas;   // ref counted
index 31302d0cbc00e0c289cf015d2ccf3d4849d4301c..d0de355047df560e6d7e9343e8570b97bc2211ea 100644 (file)
@@ -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
index f65c8408991c1dbfa9a4ef752c572da1239fe024..706cc5c6ac1ca0ff9f1b5f2c9408cd7df129654a 100644 (file)
@@ -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);