Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: experimental/PdfViewer/SkNulCanvas.h

Issue 194713008: De-virtualize SkCanvas save/restore. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: SkDumpCanvas fix. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/core/SkCanvas.h » ('j') | include/core/SkCanvas.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/SkNulCanvas.h
diff --git a/experimental/PdfViewer/SkNulCanvas.h b/experimental/PdfViewer/SkNulCanvas.h
index 1c12a5b88faba60d52a1961152cef9cd9e47d0a8..ecdf68cefc2d0e8a236cc208c30533f2f6d5f84d 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,14 @@ protected:
virtual SkCanvas* canvasForDrawIter() {return NULL;}
virtual SkBaseDevice* setDevice(SkBaseDevice* device) {return NULL;}
robertphillips 2014/03/11 15:49:44 Do we even need this onSave here?
f(malita) 2014/03/11 16:38:08 Gah, good point. Removed.
+ virtual void onSave(SaveFlags flags) SK_OVERRIDE { this->INHERITED::onSave(flags); }
+ virtual bool onSaveLayer(const SkRect* bounds, const SkPaint* paint, SaveFlags flags)
+ SK_OVERRIDE {
+ this->INHERITED::onSave(flags);
+ return false;
+ }
robertphillips 2014/03/11 15:49:44 same here
f(malita) 2014/03/11 16:38:08 Done.
+ virtual void onRestore() SK_OVERRIDE { this->INHERITED::onRestore(); }
+
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 {}
« no previous file with comments | « no previous file | include/core/SkCanvas.h » ('j') | include/core/SkCanvas.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698