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:
parent
8de5b7b8b7
commit
2246e325b8
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user