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

Unified Diff: src/core/SkPictureRecord.cpp

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 | « src/core/SkPictureRecord.h ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureRecord.cpp
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index a85ea8de0b314354f31fbe2b1e7ce28920558448..55670baa7341e2d60c2ba29a486c6e2d3b95c24f 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -664,7 +664,7 @@ void SkPictureRecord::recordRestore(bool fillInSkips) {
this->validate(initialOffset, size);
}
-bool SkPictureRecord::translate(SkScalar dx, SkScalar dy) {
+void SkPictureRecord::didTranslate(SkScalar dx, SkScalar dy) {
#ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
fMCMgr.translate(dx, dy);
#else
@@ -675,10 +675,10 @@ bool SkPictureRecord::translate(SkScalar dx, SkScalar dy) {
this->addScalar(dy);
this->validate(initialOffset, size);
#endif
- return this->INHERITED::translate(dx, dy);
+ this->INHERITED::didTranslate(dx, dy);
}
-bool SkPictureRecord::scale(SkScalar sx, SkScalar sy) {
+void SkPictureRecord::didScale(SkScalar sx, SkScalar sy) {
#ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
fMCMgr.scale(sx, sy);
@@ -690,10 +690,10 @@ bool SkPictureRecord::scale(SkScalar sx, SkScalar sy) {
this->addScalar(sy);
this->validate(initialOffset, size);
#endif
- return this->INHERITED::scale(sx, sy);
+ this->INHERITED::didScale(sx, sy);
}
-bool SkPictureRecord::rotate(SkScalar degrees) {
+void SkPictureRecord::didRotate(SkScalar degrees) {
#ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
fMCMgr.rotate(degrees);
@@ -704,10 +704,10 @@ bool SkPictureRecord::rotate(SkScalar degrees) {
this->addScalar(degrees);
this->validate(initialOffset, size);
#endif
- return this->INHERITED::rotate(degrees);
+ this->INHERITED::didRotate(degrees);
}
-bool SkPictureRecord::skew(SkScalar sx, SkScalar sy) {
+void SkPictureRecord::didSkew(SkScalar sx, SkScalar sy) {
#ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
fMCMgr.skew(sx, sy);
@@ -719,17 +719,17 @@ bool SkPictureRecord::skew(SkScalar sx, SkScalar sy) {
this->addScalar(sy);
this->validate(initialOffset, size);
#endif
- return this->INHERITED::skew(sx, sy);
+ this->INHERITED::didSkew(sx, sy);
}
-bool SkPictureRecord::concat(const SkMatrix& matrix) {
+void SkPictureRecord::didConcat(const SkMatrix& matrix) {
#ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
fMCMgr.concat(matrix);
#else
this->recordConcat(matrix);
#endif
- return this->INHERITED::concat(matrix);
+ this->INHERITED::didConcat(matrix);
}
void SkPictureRecord::recordConcat(const SkMatrix& matrix) {
@@ -741,7 +741,7 @@ void SkPictureRecord::recordConcat(const SkMatrix& matrix) {
this->validate(initialOffset, size);
}
-void SkPictureRecord::setMatrix(const SkMatrix& matrix) {
+void SkPictureRecord::didSetMatrix(const SkMatrix& matrix) {
#ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
fMCMgr.setMatrix(matrix);
@@ -753,7 +753,7 @@ void SkPictureRecord::setMatrix(const SkMatrix& matrix) {
this->addMatrix(matrix);
this->validate(initialOffset, size);
#endif
- this->INHERITED::setMatrix(matrix);
+ this->INHERITED::didSetMatrix(matrix);
}
static bool regionOpExpands(SkRegion::Op op) {
« no previous file with comments | « src/core/SkPictureRecord.h ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698