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

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

Issue 65513003: Add missing functions to SkNWayCanvas (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« include/utils/SkNWayCanvas.h ('K') | « include/utils/SkNWayCanvas.h ('k') | 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 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 static SkBitmap make_noconfig_bm(int width, int height) { 10 static SkBitmap make_noconfig_bm(int width, int height) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 162
163 bool SkNWayCanvas::clipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 163 bool SkNWayCanvas::clipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
164 Iter iter(fList); 164 Iter iter(fList);
165 while (iter.next()) { 165 while (iter.next()) {
166 iter->clipRegion(deviceRgn, op); 166 iter->clipRegion(deviceRgn, op);
167 } 167 }
168 return this->INHERITED::clipRegion(deviceRgn, op); 168 return this->INHERITED::clipRegion(deviceRgn, op);
169 } 169 }
170 170
171 void SkNWayCanvas::clear(SkColor color) {
172 Iter iter(fList);
173 while (iter.next()) {
174 iter->clear(color);
175 }
176 }
177
171 void SkNWayCanvas::drawPaint(const SkPaint& paint) { 178 void SkNWayCanvas::drawPaint(const SkPaint& paint) {
172 Iter iter(fList); 179 Iter iter(fList);
173 while (iter.next()) { 180 while (iter.next()) {
174 iter->drawPaint(paint); 181 iter->drawPaint(paint);
175 } 182 }
176 } 183 }
177 184
178 void SkNWayCanvas::drawPoints(PointMode mode, size_t count, const SkPoint pts[], 185 void SkNWayCanvas::drawPoints(PointMode mode, size_t count, const SkPoint pts[],
179 const SkPaint& paint) { 186 const SkPaint& paint) {
180 Iter iter(fList); 187 Iter iter(fList);
181 while (iter.next()) { 188 while (iter.next()) {
182 iter->drawPoints(mode, count, pts, paint); 189 iter->drawPoints(mode, count, pts, paint);
183 } 190 }
184 } 191 }
185 192
193 void SkNWayCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
194 Iter iter(fList);
195 while (iter.next()) {
196 iter->drawRect(rect, paint);
197 }
198 }
199
186 void SkNWayCanvas::drawOval(const SkRect& rect, const SkPaint& paint) { 200 void SkNWayCanvas::drawOval(const SkRect& rect, const SkPaint& paint) {
187 Iter iter(fList); 201 Iter iter(fList);
188 while (iter.next()) { 202 while (iter.next()) {
189 iter->drawOval(rect, paint); 203 iter->drawOval(rect, paint);
190 } 204 }
191 } 205 }
192 206
193 void SkNWayCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
194 Iter iter(fList);
195 while (iter.next()) {
196 iter->drawRect(rect, paint);
197 }
198 }
199
200 void SkNWayCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) { 207 void SkNWayCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
201 Iter iter(fList); 208 Iter iter(fList);
202 while (iter.next()) { 209 while (iter.next()) {
203 iter->drawRRect(rrect, paint); 210 iter->drawRRect(rrect, paint);
204 } 211 }
205 } 212 }
206 213
207 void SkNWayCanvas::drawPath(const SkPath& path, const SkPaint& paint) { 214 void SkNWayCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
208 Iter iter(fList); 215 Iter iter(fList);
209 while (iter.next()) { 216 while (iter.next()) {
(...skipping 19 matching lines...) Expand all
229 } 236 }
230 237
231 void SkNWayCanvas::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, 238 void SkNWayCanvas::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
232 const SkPaint* paint) { 239 const SkPaint* paint) {
233 Iter iter(fList); 240 Iter iter(fList);
234 while (iter.next()) { 241 while (iter.next()) {
235 iter->drawBitmapMatrix(bitmap, m, paint); 242 iter->drawBitmapMatrix(bitmap, m, paint);
236 } 243 }
237 } 244 }
238 245
246 void SkNWayCanvas::drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
247 const SkRect& dst, const SkPaint* paint) {
248 Iter iter(fList);
249 while (iter.next()) {
250 iter->drawBitmapNine(bitmap, center, dst, paint);
251 }
252 }
253
239 void SkNWayCanvas::drawSprite(const SkBitmap& bitmap, int x, int y, 254 void SkNWayCanvas::drawSprite(const SkBitmap& bitmap, int x, int y,
240 const SkPaint* paint) { 255 const SkPaint* paint) {
241 Iter iter(fList); 256 Iter iter(fList);
242 while (iter.next()) { 257 while (iter.next()) {
243 iter->drawSprite(bitmap, x, y, paint); 258 iter->drawSprite(bitmap, x, y, paint);
244 } 259 }
245 } 260 }
246 261
247 void SkNWayCanvas::drawText(const void* text, size_t byteLength, SkScalar x, 262 void SkNWayCanvas::drawText(const void* text, size_t byteLength, SkScalar x,
248 SkScalar y, const SkPaint& paint) { 263 SkScalar y, const SkPaint& paint) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 const SkColor colors[], SkXfermode* xmode, 305 const SkColor colors[], SkXfermode* xmode,
291 const uint16_t indices[], int indexCount, 306 const uint16_t indices[], int indexCount,
292 const SkPaint& paint) { 307 const SkPaint& paint) {
293 Iter iter(fList); 308 Iter iter(fList);
294 while (iter.next()) { 309 while (iter.next()) {
295 iter->drawVertices(vmode, vertexCount, vertices, texs, colors, xmode, 310 iter->drawVertices(vmode, vertexCount, vertices, texs, colors, xmode,
296 indices, indexCount, paint); 311 indices, indexCount, paint);
297 } 312 }
298 } 313 }
299 314
315 void SkNWayCanvas::drawData(const void* data, size_t length) {
316 Iter iter(fList);
317 while (iter.next()) {
318 iter->drawData(data, length);
319 }
320 }
321
300 SkBounder* SkNWayCanvas::setBounder(SkBounder* bounder) { 322 SkBounder* SkNWayCanvas::setBounder(SkBounder* bounder) {
301 Iter iter(fList); 323 Iter iter(fList);
302 while (iter.next()) { 324 while (iter.next()) {
303 iter->setBounder(bounder); 325 iter->setBounder(bounder);
304 } 326 }
305 return this->INHERITED::setBounder(bounder); 327 return this->INHERITED::setBounder(bounder);
306 } 328 }
307 329
308 SkDrawFilter* SkNWayCanvas::setDrawFilter(SkDrawFilter* filter) { 330 SkDrawFilter* SkNWayCanvas::setDrawFilter(SkDrawFilter* filter) {
309 Iter iter(fList); 331 Iter iter(fList);
(...skipping 16 matching lines...) Expand all
326 iter->addComment(kywd, value); 348 iter->addComment(kywd, value);
327 } 349 }
328 } 350 }
329 351
330 void SkNWayCanvas::endCommentGroup() { 352 void SkNWayCanvas::endCommentGroup() {
331 Iter iter(fList); 353 Iter iter(fList);
332 while (iter.next()) { 354 while (iter.next()) {
333 iter->endCommentGroup(); 355 iter->endCommentGroup();
334 } 356 }
335 } 357 }
OLDNEW
« include/utils/SkNWayCanvas.h ('K') | « include/utils/SkNWayCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698