From 05e4abae89d0609af91eef5dddc237c835443c9a Mon Sep 17 00:00:00 2001 From: tomhudson Date: Wed, 8 Apr 2015 06:52:58 -0700 Subject: Add missing override of willSaveLayer() Also tweak formatting. BUG=3624 R=djsollen@google.com Review URL: https://codereview.chromium.org/1068163004 --- src/utils/android/SkAndroidSDKCanvas.cpp | 23 ++++++++++++++++++++--- src/utils/android/SkAndroidSDKCanvas.h | 1 + 2 files changed, 21 insertions(+), 3 deletions(-) (limited to 'src/utils/android') diff --git a/src/utils/android/SkAndroidSDKCanvas.cpp b/src/utils/android/SkAndroidSDKCanvas.cpp index d02fd72620..06b960b5d9 100644 --- a/src/utils/android/SkAndroidSDKCanvas.cpp +++ b/src/utils/android/SkAndroidSDKCanvas.cpp @@ -281,13 +281,30 @@ void* SkAndroidSDKCanvas::onAccessTopLayerPixels(SkImageInfo* info, size_t* data return fProxyTarget->accessTopLayerPixels(info, data); } -void SkAndroidSDKCanvas::willSave() { fProxyTarget->save(); } -void SkAndroidSDKCanvas::willRestore() { fProxyTarget->restore(); } +void SkAndroidSDKCanvas::willSave() { + fProxyTarget->save(); +} + +SkCanvas::SaveLayerStrategy SkAndroidSDKCanvas::willSaveLayer(const SkRect* rect, + const SkPaint* paint, + SaveFlags flags) { + fProxyTarget->saveLayer(rect, paint, flags); + return SkCanvas::kNoLayer_SaveLayerStrategy; +} + +void SkAndroidSDKCanvas::willRestore() { + fProxyTarget->restore(); +} + void SkAndroidSDKCanvas::didRestore() { } + void SkAndroidSDKCanvas::didConcat(const SkMatrix& m) { fProxyTarget->concat(m); } -void SkAndroidSDKCanvas::didSetMatrix(const SkMatrix& m) { fProxyTarget->setMatrix(m); } + +void SkAndroidSDKCanvas::didSetMatrix(const SkMatrix& m) { + fProxyTarget->setMatrix(m); +} void SkAndroidSDKCanvas::onClipRect(const SkRect& rect, SkRegion::Op op, diff --git a/src/utils/android/SkAndroidSDKCanvas.h b/src/utils/android/SkAndroidSDKCanvas.h index dc79be25a1..cddd262bdb 100644 --- a/src/utils/android/SkAndroidSDKCanvas.h +++ b/src/utils/android/SkAndroidSDKCanvas.h @@ -88,6 +88,7 @@ protected: const void* onPeekPixels(SkImageInfo*, size_t*) override; void* onAccessTopLayerPixels(SkImageInfo*, size_t*) override; void willSave() override; + SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) override; void willRestore() override; void didRestore() override; void didConcat(const SkMatrix&) override; -- cgit v1.2.3