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
This commit is contained in:
commit-bot@chromium.org 2014-05-29 15:57:11 +00:00
parent 8de5b7b8b7
commit 2246e325b8
2 changed files with 3 additions and 3 deletions

View File

@ -105,7 +105,7 @@ private:
*/ */
friend class AndroidPicture; friend class AndroidPicture;
friend class SkPictureRecorderReplayTester; // for unit testing friend class SkPictureRecorderReplayTester; // for unit testing
void partialReplay(SkCanvas* canvas); void partialReplay(SkCanvas* canvas) const;
#endif #endif
SkAutoTUnref<SkPicture> fPicture; SkAutoTUnref<SkPicture> fPicture;

View File

@ -20,7 +20,7 @@ SkCanvas* SkPictureRecorder::beginRecording(int width, int height,
} }
#ifdef SK_BUILD_FOR_ANDROID #ifdef SK_BUILD_FOR_ANDROID
void SkPictureRecorder::partialReplay(SkCanvas* canvas) { void SkPictureRecorder::partialReplay(SkCanvas* canvas) const {
if (NULL == fPicture.get() || NULL == canvas) { if (NULL == fPicture.get() || NULL == canvas) {
// Not recording or nothing to replay into // Not recording or nothing to replay into
return; return;
@ -28,7 +28,7 @@ void SkPictureRecorder::partialReplay(SkCanvas* canvas) {
SkASSERT(NULL != fPicture->fRecord); SkASSERT(NULL != fPicture->fRecord);
SkAutoTDelete<SkPicturePlayback> playback(SkPicture::FakeEndRecording(fPicture, SkAutoTDelete<SkPicturePlayback> playback(SkPicture::FakeEndRecording(fPicture.get(),
*fPicture->fRecord, *fPicture->fRecord,
false)); false));
playback->draw(*canvas, NULL); playback->draw(*canvas, NULL);