Loading core/jni/android/graphics/Picture.cpp +0 −16 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ Picture::Picture(const Picture* src) { } else if (NULL != src->mRecorder.get()) { mPicture = src->makePartialCopy(); } validate(); } else { mWidth = 0; mHeight = 0; Loading @@ -50,18 +49,15 @@ Canvas* Picture::beginRecording(int width, int height) { void Picture::endRecording() { if (NULL != mRecorder.get()) { mPicture = mRecorder->finishRecordingAsPicture(); validate(); mRecorder.reset(NULL); } } int Picture::width() const { validate(); return mWidth; } int Picture::height() const { validate(); return mHeight; } Loading @@ -84,7 +80,6 @@ void Picture::serialize(SkWStream* stream) const { if (NULL != mRecorder.get()) { this->makePartialCopy()->serialize(stream); } else if (NULL != mPicture.get()) { validate(); mPicture->serialize(stream); } else { // serialize "empty" picture Loading @@ -99,7 +94,6 @@ void Picture::draw(Canvas* canvas) { this->endRecording(); SkASSERT(NULL != mPicture.get()); } validate(); if (NULL != mPicture.get()) { mPicture->playback(canvas->asSkCanvas()); } Loading @@ -115,14 +109,4 @@ sk_sp<SkPicture> Picture::makePartialCopy() const { return reRecorder.finishRecordingAsPicture(); } void Picture::validate() const { #ifdef SK_DEBUG if (NULL != mPicture.get()) { SkRect cullRect = mPicture->cullRect(); SkRect myRect = SkRect::MakeWH(SkIntToScalar(mWidth), SkIntToScalar(mHeight)); SkASSERT(cullRect == myRect); } #endif } }; // namespace android core/jni/android/graphics/Picture.h +0 −2 Original line number Diff line number Diff line Loading @@ -61,8 +61,6 @@ private: // Make a copy of a picture that is in the midst of being recorded. The // resulting picture will have balanced saves and restores. sk_sp<SkPicture> makePartialCopy() const; void validate() const; }; }; // namespace android Loading Loading
core/jni/android/graphics/Picture.cpp +0 −16 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ Picture::Picture(const Picture* src) { } else if (NULL != src->mRecorder.get()) { mPicture = src->makePartialCopy(); } validate(); } else { mWidth = 0; mHeight = 0; Loading @@ -50,18 +49,15 @@ Canvas* Picture::beginRecording(int width, int height) { void Picture::endRecording() { if (NULL != mRecorder.get()) { mPicture = mRecorder->finishRecordingAsPicture(); validate(); mRecorder.reset(NULL); } } int Picture::width() const { validate(); return mWidth; } int Picture::height() const { validate(); return mHeight; } Loading @@ -84,7 +80,6 @@ void Picture::serialize(SkWStream* stream) const { if (NULL != mRecorder.get()) { this->makePartialCopy()->serialize(stream); } else if (NULL != mPicture.get()) { validate(); mPicture->serialize(stream); } else { // serialize "empty" picture Loading @@ -99,7 +94,6 @@ void Picture::draw(Canvas* canvas) { this->endRecording(); SkASSERT(NULL != mPicture.get()); } validate(); if (NULL != mPicture.get()) { mPicture->playback(canvas->asSkCanvas()); } Loading @@ -115,14 +109,4 @@ sk_sp<SkPicture> Picture::makePartialCopy() const { return reRecorder.finishRecordingAsPicture(); } void Picture::validate() const { #ifdef SK_DEBUG if (NULL != mPicture.get()) { SkRect cullRect = mPicture->cullRect(); SkRect myRect = SkRect::MakeWH(SkIntToScalar(mWidth), SkIntToScalar(mHeight)); SkASSERT(cullRect == myRect); } #endif } }; // namespace android
core/jni/android/graphics/Picture.h +0 −2 Original line number Diff line number Diff line Loading @@ -61,8 +61,6 @@ private: // Make a copy of a picture that is in the midst of being recorded. The // resulting picture will have balanced saves and restores. sk_sp<SkPicture> makePartialCopy() const; void validate() const; }; }; // namespace android Loading