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

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

Issue 247983003: Revert of make drawText calls non-virtual, to ease SkFont and TextBlob (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 | « src/utils/SkLuaCanvas.cpp ('k') | src/utils/SkProxyCanvas.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 /* 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 227
228 void SkNWayCanvas::drawSprite(const SkBitmap& bitmap, int x, int y, 228 void SkNWayCanvas::drawSprite(const SkBitmap& bitmap, int x, int y,
229 const SkPaint* paint) { 229 const SkPaint* paint) {
230 Iter iter(fList); 230 Iter iter(fList);
231 while (iter.next()) { 231 while (iter.next()) {
232 iter->drawSprite(bitmap, x, y, paint); 232 iter->drawSprite(bitmap, x, y, paint);
233 } 233 }
234 } 234 }
235 235
236 void SkNWayCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, S kScalar y, 236 void SkNWayCanvas::drawText(const void* text, size_t byteLength, SkScalar x,
237 const SkPaint& paint) { 237 SkScalar y, const SkPaint& paint) {
238 Iter iter(fList); 238 Iter iter(fList);
239 while (iter.next()) { 239 while (iter.next()) {
240 iter->drawText(text, byteLength, x, y, paint); 240 iter->drawText(text, byteLength, x, y, paint);
241 } 241 }
242 } 242 }
243 243
244 void SkNWayCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPo int pos[], 244 void SkNWayCanvas::drawPosText(const void* text, size_t byteLength,
245 const SkPaint& paint) { 245 const SkPoint pos[], const SkPaint& paint) {
246 Iter iter(fList); 246 Iter iter(fList);
247 while (iter.next()) { 247 while (iter.next()) {
248 iter->drawPosText(text, byteLength, pos, paint); 248 iter->drawPosText(text, byteLength, pos, paint);
249 } 249 }
250 } 250 }
251 251
252 void SkNWayCanvas::onDrawPosTextH(const void* text, size_t byteLength, const SkS calar xpos[], 252 void SkNWayCanvas::drawPosTextH(const void* text, size_t byteLength,
253 SkScalar constY, const SkPaint& paint) { 253 const SkScalar xpos[], SkScalar constY,
254 const SkPaint& paint) {
254 Iter iter(fList); 255 Iter iter(fList);
255 while (iter.next()) { 256 while (iter.next()) {
256 iter->drawPosTextH(text, byteLength, xpos, constY, paint); 257 iter->drawPosTextH(text, byteLength, xpos, constY, paint);
257 } 258 }
258 } 259 }
259 260
260 void SkNWayCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const S kPath& path, 261 void SkNWayCanvas::drawTextOnPath(const void* text, size_t byteLength,
261 const SkMatrix* matrix, const SkPaint& paint ) { 262 const SkPath& path, const SkMatrix* matrix,
263 const SkPaint& paint) {
262 Iter iter(fList); 264 Iter iter(fList);
263 while (iter.next()) { 265 while (iter.next()) {
264 iter->drawTextOnPath(text, byteLength, path, matrix, paint); 266 iter->drawTextOnPath(text, byteLength, path, matrix, paint);
265 } 267 }
266 } 268 }
267 269
268 void SkNWayCanvas::drawPicture(SkPicture& picture) { 270 void SkNWayCanvas::drawPicture(SkPicture& picture) {
269 Iter iter(fList); 271 Iter iter(fList);
270 while (iter.next()) { 272 while (iter.next()) {
271 iter->drawPicture(picture); 273 iter->drawPicture(picture);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 iter->addComment(kywd, value); 322 iter->addComment(kywd, value);
321 } 323 }
322 } 324 }
323 325
324 void SkNWayCanvas::endCommentGroup() { 326 void SkNWayCanvas::endCommentGroup() {
325 Iter iter(fList); 327 Iter iter(fList);
326 while (iter.next()) { 328 while (iter.next()) {
327 iter->endCommentGroup(); 329 iter->endCommentGroup();
328 } 330 }
329 } 331 }
OLDNEW
« no previous file with comments | « src/utils/SkLuaCanvas.cpp ('k') | src/utils/SkProxyCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698