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

Side by Side Diff: src/core/SkPictureStateTree.cpp

Issue 250803006: Re-add SkPictureStateTree::Iterator::draw() SaveFlags. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkPictureStateTree.h" 9 #include "SkPictureStateTree.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 fCurrentNode = fCurrentNode->fParent; 118 fCurrentNode = fCurrentNode->fParent;
119 } 119 }
120 return kDrawComplete; 120 return kDrawComplete;
121 } 121 }
122 122
123 Draw* draw = static_cast<Draw*>((*fDraws)[fPlaybackIndex]); 123 Draw* draw = static_cast<Draw*>((*fDraws)[fPlaybackIndex]);
124 Node* targetNode = draw->fNode; 124 Node* targetNode = draw->fNode;
125 125
126 if (fSave) { 126 if (fSave) {
127 fCanvas->save(); 127 // FIXME: the save below depends on soon-to-be-deprecated
128 // SaveFlags behavior: it relies on matrix changes persisting
129 // after restore.
130 fCanvas->save(SkCanvas::kClip_SaveFlag);
128 fSave = false; 131 fSave = false;
129 } 132 }
130 133
131 if (fCurrentNode != targetNode) { 134 if (fCurrentNode != targetNode) {
132 // If we're not at the target and we don't have a list of nodes to get t here, we need to 135 // If we're not at the target and we don't have a list of nodes to get t here, we need to
133 // figure out the path from our current node, to the target 136 // figure out the path from our current node, to the target
134 if (fNodes.count() == 0) { 137 if (fNodes.count() == 0) {
135 // Trace back up to a common ancestor, restoring to get our current state to match that 138 // Trace back up to a common ancestor, restoring to get our current state to match that
136 // of the ancestor, and saving a list of nodes whose state we need t o apply to get to 139 // of the ancestor, and saving a list of nodes whose state we need t o apply to get to
137 // the target (we can restore up to the ancestor immediately, but we 'll need to return 140 // the target (we can restore up to the ancestor immediately, but we 'll need to return
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 if (fCurrentMatrix != draw->fMatrix) { 197 if (fCurrentMatrix != draw->fMatrix) {
195 SkMatrix tmp = *draw->fMatrix; 198 SkMatrix tmp = *draw->fMatrix;
196 tmp.postConcat(fPlaybackMatrix); 199 tmp.postConcat(fPlaybackMatrix);
197 fCanvas->setMatrix(tmp); 200 fCanvas->setMatrix(tmp);
198 fCurrentMatrix = draw->fMatrix; 201 fCurrentMatrix = draw->fMatrix;
199 } 202 }
200 203
201 ++fPlaybackIndex; 204 ++fPlaybackIndex;
202 return draw->fOffset; 205 return draw->fOffset;
203 } 206 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698