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

Side by Side Diff: src/utils/SkNWayCanvas.cpp

Issue 183453002: add new onClip* methods to SkCanvas (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: remove debug 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/utils/SkLuaCanvas.cpp ('k') | src/utils/SkNoSaveLayerCanvas.h » ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 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 #include "SkNWayCanvas.h" 8 #include "SkNWayCanvas.h"
9 9
10 SkNWayCanvas::SkNWayCanvas(int width, int height) 10 SkNWayCanvas::SkNWayCanvas(int width, int height)
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 void SkNWayCanvas::setMatrix(const SkMatrix& matrix) { 125 void SkNWayCanvas::setMatrix(const SkMatrix& matrix) {
126 Iter iter(fList); 126 Iter iter(fList);
127 while (iter.next()) { 127 while (iter.next()) {
128 iter->setMatrix(matrix); 128 iter->setMatrix(matrix);
129 } 129 }
130 this->INHERITED::setMatrix(matrix); 130 this->INHERITED::setMatrix(matrix);
131 } 131 }
132 132
133 bool SkNWayCanvas::clipRect(const SkRect& rect, SkRegion::Op op, bool doAA) { 133 void SkNWayCanvas::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle edgeStyle) {
134 Iter iter(fList); 134 Iter iter(fList);
135 while (iter.next()) { 135 while (iter.next()) {
136 iter->clipRect(rect, op, doAA); 136 iter->clipRect(rect, op, kSoft_ClipEdgeStyle == edgeStyle);
137 } 137 }
138 return this->INHERITED::clipRect(rect, op, doAA); 138 this->INHERITED::onClipRect(rect, op, edgeStyle);
139 } 139 }
140 140
141 bool SkNWayCanvas::clipRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA) { 141 void SkNWayCanvas::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeSt yle edgeStyle) {
142 Iter iter(fList); 142 Iter iter(fList);
143 while (iter.next()) { 143 while (iter.next()) {
144 iter->clipRRect(rrect, op, doAA); 144 iter->clipRRect(rrect, op, kSoft_ClipEdgeStyle == edgeStyle);
145 } 145 }
146 return this->INHERITED::clipRRect(rrect, op, doAA); 146 this->INHERITED::onClipRRect(rrect, op, edgeStyle);
147 } 147 }
148 148
149 bool SkNWayCanvas::clipPath(const SkPath& path, SkRegion::Op op, bool doAA) { 149 void SkNWayCanvas::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle) {
150 Iter iter(fList); 150 Iter iter(fList);
151 while (iter.next()) { 151 while (iter.next()) {
152 iter->clipPath(path, op, doAA); 152 iter->clipPath(path, op, kSoft_ClipEdgeStyle == edgeStyle);
153 } 153 }
154 return this->INHERITED::clipPath(path, op, doAA); 154 this->INHERITED::onClipPath(path, op, edgeStyle);
155 } 155 }
156 156
157 bool SkNWayCanvas::clipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 157 void SkNWayCanvas::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
158 Iter iter(fList); 158 Iter iter(fList);
159 while (iter.next()) { 159 while (iter.next()) {
160 iter->clipRegion(deviceRgn, op); 160 iter->clipRegion(deviceRgn, op);
161 } 161 }
162 return this->INHERITED::clipRegion(deviceRgn, op); 162 this->INHERITED::onClipRegion(deviceRgn, op);
163 } 163 }
164 164
165 void SkNWayCanvas::clear(SkColor color) { 165 void SkNWayCanvas::clear(SkColor color) {
166 Iter iter(fList); 166 Iter iter(fList);
167 while (iter.next()) { 167 while (iter.next()) {
168 iter->clear(color); 168 iter->clear(color);
169 } 169 }
170 } 170 }
171 171
172 void SkNWayCanvas::drawPaint(const SkPaint& paint) { 172 void SkNWayCanvas::drawPaint(const SkPaint& paint) {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 iter->addComment(kywd, value); 350 iter->addComment(kywd, value);
351 } 351 }
352 } 352 }
353 353
354 void SkNWayCanvas::endCommentGroup() { 354 void SkNWayCanvas::endCommentGroup() {
355 Iter iter(fList); 355 Iter iter(fList);
356 while (iter.next()) { 356 while (iter.next()) {
357 iter->endCommentGroup(); 357 iter->endCommentGroup();
358 } 358 }
359 } 359 }
OLDNEW
« no previous file with comments | « src/utils/SkLuaCanvas.cpp ('k') | src/utils/SkNoSaveLayerCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698