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

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

Issue 1419403002: Fix up the clip mask manager's creation of paths (w.r.t. volatility) (Closed) Base URL: https://skia.googlesource.com/skia.git@mdb-simplify-cmm
Patch Set: Update to be independant of other CL Created 5 years, 1 month 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
« no previous file with comments | « no previous file | src/gpu/GrClipMaskManager.cpp » ('j') | 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 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkAtomics.h" 8 #include "SkAtomics.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkClipStack.h" 10 #include "SkClipStack.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 fPath.set(path); 129 fPath.set(path);
130 fPath.get()->setIsVolatile(true); 130 fPath.get()->setIsVolatile(true);
131 fType = kPath_Type; 131 fType = kPath_Type;
132 this->initCommon(saveCount, op, doAA); 132 this->initCommon(saveCount, op, doAA);
133 } 133 }
134 134
135 void SkClipStack::Element::asPath(SkPath* path) const { 135 void SkClipStack::Element::asPath(SkPath* path) const {
136 switch (fType) { 136 switch (fType) {
137 case kEmpty_Type: 137 case kEmpty_Type:
138 path->reset(); 138 path->reset();
139 path->setIsVolatile(true);
139 break; 140 break;
140 case kRect_Type: 141 case kRect_Type:
141 path->reset(); 142 path->reset();
142 path->addRect(this->getRect()); 143 path->addRect(this->getRect());
144 path->setIsVolatile(true);
143 break; 145 break;
144 case kRRect_Type: 146 case kRRect_Type:
145 path->reset(); 147 path->reset();
146 path->addRRect(fRRect); 148 path->addRRect(fRRect);
149 path->setIsVolatile(true);
147 break; 150 break;
148 case kPath_Type: 151 case kPath_Type:
149 *path = *fPath.get(); 152 *path = *fPath.get();
150 break; 153 break;
151 } 154 }
152 path->setIsVolatile(true); 155 path->setIsVolatile(true);
153 } 156 }
154 157
155 void SkClipStack::Element::setEmpty() { 158 void SkClipStack::Element::setEmpty() {
156 fType = kEmpty_Type; 159 fType = kEmpty_Type;
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 909
907 void SkClipStack::dump() const { 910 void SkClipStack::dump() const {
908 B2TIter iter(*this); 911 B2TIter iter(*this);
909 const Element* e; 912 const Element* e;
910 while ((e = iter.next())) { 913 while ((e = iter.next())) {
911 e->dump(); 914 e->dump();
912 SkDebugf("\n"); 915 SkDebugf("\n");
913 } 916 }
914 } 917 }
915 #endif 918 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698