diff options
author | tomhudson <tomhudson@google.com> | 2015-04-08 06:52:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-08 06:52:59 -0700 |
commit | 05e4abae89d0609af91eef5dddc237c835443c9a (patch) | |
tree | 9abf19776eaf5b0b3cbc5c03281329336bd66b2b /src/utils | |
parent | c654e9016a15985ebeb24f94f819d113ad48a251 (diff) |
Add missing override of willSaveLayer()
Also tweak formatting.
BUG=3624
R=djsollen@google.com
Review URL: https://codereview.chromium.org/1068163004
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/android/SkAndroidSDKCanvas.cpp | 23 | ||||
-rw-r--r-- | src/utils/android/SkAndroidSDKCanvas.h | 1 |
2 files changed, 21 insertions, 3 deletions
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; |