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

Unified Diff: include/core/SkCanvas.h

Issue 195793012: De-virtualize SkCanvas matrix ops. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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 | « experimental/PdfViewer/SkNulCanvas.h ('k') | include/utils/SkDeferredCanvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index bcfba16cd93c14b869ef794d7727a0ba18941ee9..716720bc3ecf033718798f56d248ad777440612c 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -442,38 +442,38 @@ public:
@param dy The distance to translate in Y
returns true if the operation succeeded (e.g. did not overflow)
*/
- virtual bool translate(SkScalar dx, SkScalar dy);
+ bool translate(SkScalar dx, SkScalar dy);
/** Preconcat the current matrix with the specified scale.
@param sx The amount to scale in X
@param sy The amount to scale in Y
returns true if the operation succeeded (e.g. did not overflow)
*/
- virtual bool scale(SkScalar sx, SkScalar sy);
+ bool scale(SkScalar sx, SkScalar sy);
/** Preconcat the current matrix with the specified rotation.
@param degrees The amount to rotate, in degrees
returns true if the operation succeeded (e.g. did not overflow)
*/
- virtual bool rotate(SkScalar degrees);
+ bool rotate(SkScalar degrees);
/** Preconcat the current matrix with the specified skew.
@param sx The amount to skew in X
@param sy The amount to skew in Y
returns true if the operation succeeded (e.g. did not overflow)
*/
- virtual bool skew(SkScalar sx, SkScalar sy);
+ bool skew(SkScalar sx, SkScalar sy);
/** Preconcat the current matrix with the specified matrix.
@param matrix The matrix to preconcatenate with the current matrix
@return true if the operation succeeded (e.g. did not overflow)
*/
- virtual bool concat(const SkMatrix& matrix);
+ bool concat(const SkMatrix& matrix);
/** Replace the current matrix with a copy of the specified matrix.
@param matrix The matrix that will be copied into the current matrix.
*/
- virtual void setMatrix(const SkMatrix& matrix);
+ void setMatrix(const SkMatrix& matrix);
/** Helper for setMatrix(identity). Sets the current matrix to identity.
*/
@@ -1212,6 +1212,13 @@ protected:
virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags);
virtual void willRestore();
+ virtual void didTranslate(SkScalar, SkScalar);
+ virtual void didScale(SkScalar, SkScalar);
+ virtual void didRotate(SkScalar);
+ virtual void didSkew(SkScalar, SkScalar);
+ virtual void didConcat(const SkMatrix&);
+ virtual void didSetMatrix(const SkMatrix&);
+
virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&);
enum ClipEdgeStyle {
« no previous file with comments | « experimental/PdfViewer/SkNulCanvas.h ('k') | include/utils/SkDeferredCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698