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; |
} |