diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-11 23:47:35 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-11 23:47:35 +0000 |
commit | 4fcd92d0bf09dc9c28643e83b95b6cbf9f1ff2b2 (patch) | |
tree | 322b798b8c00af454caa4508320eaac1fad0a96e /experimental/PdfViewer | |
parent | ab373bd459b91ccf5c7a286eb4a13f4a79b0f60d (diff) |
Revert of Revert "De-virtualize SkCanvas save/restore." (https://codereview.chromium.org/194923008/)
Reason for revert:
Re-landing after roll fix.
Original issue's description:
> Revert "De-virtualize SkCanvas save/restore."
>
> (To allow a roll fix into the tree).
>
> This reverts commit edf702204be42c945254191f9f9cd6585b3d189b.
>
> R=halcanary@google.com
>
> Committed: https://code.google.com/p/skia/source/detail?r=13748
R=halcanary@google.com, fmalita@chromium.org
TBR=fmalita@chromium.org, halcanary@google.com
NOTREECHECKS=true
NOTRY=true
Author: fmalita@google.com
Review URL: https://codereview.chromium.org/196323003
git-svn-id: http://skia.googlecode.com/svn/trunk@13754 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/PdfViewer')
-rw-r--r-- | experimental/PdfViewer/SkNulCanvas.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/experimental/PdfViewer/SkNulCanvas.h b/experimental/PdfViewer/SkNulCanvas.h index 1c12a5b88f..7c1c1cabd9 100644 --- a/experimental/PdfViewer/SkNulCanvas.h +++ b/experimental/PdfViewer/SkNulCanvas.h @@ -26,13 +26,6 @@ public: explicit SkNulCanvas(const SkBitmap& bitmap) : SkCanvas(bitmap) {} virtual ~SkNulCanvas() {} - virtual int save(SaveFlags flags = kMatrixClip_SaveFlag) SK_OVERRIDE {return 0;} - virtual int saveLayer(const SkRect* bounds, const SkPaint* paint, - SaveFlags flags = kARGB_ClipLayer_SaveFlag) SK_OVERRIDE {return 0;} - int saveLayerAlpha(const SkRect* bounds, U8CPU alpha, - SaveFlags flags = kARGB_ClipLayer_SaveFlag) {return 0;} - virtual void restore() SK_OVERRIDE {} - int getSaveCount() const {return 0;} virtual bool isDrawingToLayer() const SK_OVERRIDE {return false;} virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE {return true;} virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE {return true;} @@ -106,6 +99,12 @@ protected: virtual SkCanvas* canvasForDrawIter() {return NULL;} virtual SkBaseDevice* setDevice(SkBaseDevice* device) {return NULL;} + virtual bool onSaveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags flags) + SK_OVERRIDE { + this->INHERITED::onSaveLayer(bounds, paint, flags); + return false; + } + virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE {} virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE {} virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE {} |