From 2246e325b8710389d8f718843356e410f683dd25 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Thu, 29 May 2014 15:57:11 +0000 Subject: Make SkPictureRecorder::partialReplay const This will make it easier to integrate this into Android's use case. R=reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/307693003 git-svn-id: http://skia.googlecode.com/svn/trunk@14957 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkPictureRecorder.h | 2 +- src/core/SkPictureRecorder.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/core/SkPictureRecorder.h b/include/core/SkPictureRecorder.h index 8284c7d906..d619561dd2 100644 --- a/include/core/SkPictureRecorder.h +++ b/include/core/SkPictureRecorder.h @@ -105,7 +105,7 @@ private: */ friend class AndroidPicture; friend class SkPictureRecorderReplayTester; // for unit testing - void partialReplay(SkCanvas* canvas); + void partialReplay(SkCanvas* canvas) const; #endif SkAutoTUnref fPicture; diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp index 6fa9a06067..1589ec0536 100644 --- a/src/core/SkPictureRecorder.cpp +++ b/src/core/SkPictureRecorder.cpp @@ -20,7 +20,7 @@ SkCanvas* SkPictureRecorder::beginRecording(int width, int height, } #ifdef SK_BUILD_FOR_ANDROID -void SkPictureRecorder::partialReplay(SkCanvas* canvas) { +void SkPictureRecorder::partialReplay(SkCanvas* canvas) const { if (NULL == fPicture.get() || NULL == canvas) { // Not recording or nothing to replay into return; @@ -28,7 +28,7 @@ void SkPictureRecorder::partialReplay(SkCanvas* canvas) { SkASSERT(NULL != fPicture->fRecord); - SkAutoTDelete playback(SkPicture::FakeEndRecording(fPicture, + SkAutoTDelete playback(SkPicture::FakeEndRecording(fPicture.get(), *fPicture->fRecord, false)); playback->draw(*canvas, NULL); -- cgit v1.2.3