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 SkPictureRecorderReplayTester; // for unit testing
void partialReplay(SkCanvas* canvas);
void partialReplay(SkCanvas* canvas) const;
#endif
SkAutoTUnref<SkPicture> fPicture;

View File

@ -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<SkPicturePlayback> playback(SkPicture::FakeEndRecording(fPicture,
SkAutoTDelete<SkPicturePlayback> playback(SkPicture::FakeEndRecording(fPicture.get(),
*fPicture->fRecord,
false));
playback->draw(*canvas, NULL);