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

Unified Diff: src/core/SkBBoxHierarchyRecord.cpp

Issue 194713008: De-virtualize SkCanvas save/restore. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rebased 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/SkBBoxHierarchyRecord.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBBoxHierarchyRecord.cpp
diff --git a/src/core/SkBBoxHierarchyRecord.cpp b/src/core/SkBBoxHierarchyRecord.cpp
index 5d310be7bcd3d28a74a1ef823ac019306e7fddd3..e1be2e1972b5e12f6d6fccf4826900060fdf5724 100644
--- a/src/core/SkBBoxHierarchyRecord.cpp
+++ b/src/core/SkBBoxHierarchyRecord.cpp
@@ -26,20 +26,21 @@ void SkBBoxHierarchyRecord::handleBBox(const SkRect& bounds) {
fBoundingHierarchy->insert(draw, r, true);
}
-int SkBBoxHierarchyRecord::save(SaveFlags flags) {
+void SkBBoxHierarchyRecord::willSave(SaveFlags flags) {
fStateTree->appendSave();
- return INHERITED::save(flags);
+ this->INHERITED::willSave(flags);
}
-int SkBBoxHierarchyRecord::saveLayer(const SkRect* bounds, const SkPaint* paint,
- SaveFlags flags) {
+SkCanvas::SaveLayerStrategy SkBBoxHierarchyRecord::willSaveLayer(const SkRect* bounds,
+ const SkPaint* paint,
+ SaveFlags flags) {
fStateTree->appendSaveLayer(this->writeStream().bytesWritten());
- return INHERITED::saveLayer(bounds, paint, flags);
+ return this->INHERITED::willSaveLayer(bounds, paint, flags);
}
-void SkBBoxHierarchyRecord::restore() {
+void SkBBoxHierarchyRecord::willRestore() {
fStateTree->appendRestore();
- INHERITED::restore();
+ this->INHERITED::willRestore();
}
bool SkBBoxHierarchyRecord::translate(SkScalar dx, SkScalar dy) {
« no previous file with comments | « src/core/SkBBoxHierarchyRecord.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698