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

Unified Diff: src/core/SkPictureStateTree.cpp

Issue 211173005: Minor cleanup (moved out of main CL) (Closed) Base URL: http://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/SkCanvas.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureStateTree.cpp
===================================================================
--- src/core/SkPictureStateTree.cpp (revision 13942)
+++ src/core/SkPictureStateTree.cpp (working copy)
@@ -104,11 +104,17 @@
if (fPlaybackIndex >= fDraws->count()) {
// restore back to where we started
fCanvas->setMatrix(fPlaybackMatrix);
- if (fCurrentNode->fFlags & Node::kSaveLayer_Flag) { fCanvas->restore(); }
+ if (fCurrentNode->fFlags & Node::kSaveLayer_Flag) {
+ fCanvas->restore();
+ }
fCurrentNode = fCurrentNode->fParent;
while (NULL != fCurrentNode) {
- if (fCurrentNode->fFlags & Node::kSave_Flag) { fCanvas->restore(); }
- if (fCurrentNode->fFlags & Node::kSaveLayer_Flag) { fCanvas->restore(); }
+ if (fCurrentNode->fFlags & Node::kSave_Flag) {
+ fCanvas->restore();
+ }
+ if (fCurrentNode->fFlags & Node::kSaveLayer_Flag) {
+ fCanvas->restore();
+ }
fCurrentNode = fCurrentNode->fParent;
}
return kDrawComplete;
@@ -137,8 +143,12 @@
uint16_t currentLevel = tmp->fLevel;
uint16_t targetLevel = ancestor->fLevel;
if (currentLevel >= targetLevel) {
- if (tmp != fCurrentNode && tmp->fFlags & Node::kSave_Flag) { fCanvas->restore(); }
- if (tmp->fFlags & Node::kSaveLayer_Flag) { fCanvas->restore(); }
+ if (tmp != fCurrentNode && tmp->fFlags & Node::kSave_Flag) {
+ fCanvas->restore();
+ }
+ if (tmp->fFlags & Node::kSaveLayer_Flag) {
+ fCanvas->restore();
+ }
tmp = tmp->fParent;
}
if (currentLevel <= targetLevel) {
@@ -148,8 +158,12 @@
}
if (ancestor->fFlags & Node::kSave_Flag) {
- if (fCurrentNode != ancestor) { fCanvas->restore(); }
- if (targetNode != ancestor) { fCanvas->save(SkCanvas::kClip_SaveFlag); }
+ if (fCurrentNode != ancestor) {
+ fCanvas->restore();
+ }
+ if (targetNode != ancestor) {
+ fCanvas->save(SkCanvas::kClip_SaveFlag);
+ }
}
fCurrentNode = ancestor;
}
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698