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

Side by Side Diff: src/utils/debugger/SkDebugCanvas.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/debugger/SkDebugCanvas.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 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 9
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 499
500 void SkDebugCanvas::drawPicture(SkPicture& picture) { 500 void SkDebugCanvas::drawPicture(SkPicture& picture) {
501 this->addDrawCommand(new SkDrawPictureCommand(picture)); 501 this->addDrawCommand(new SkDrawPictureCommand(picture));
502 } 502 }
503 503
504 void SkDebugCanvas::drawPoints(PointMode mode, size_t count, 504 void SkDebugCanvas::drawPoints(PointMode mode, size_t count,
505 const SkPoint pts[], const SkPaint& paint) { 505 const SkPoint pts[], const SkPaint& paint) {
506 this->addDrawCommand(new SkDrawPointsCommand(mode, count, pts, paint)); 506 this->addDrawCommand(new SkDrawPointsCommand(mode, count, pts, paint));
507 } 507 }
508 508
509 void SkDebugCanvas::onDrawPosText(const void* text, size_t byteLength, const SkP oint pos[], 509 void SkDebugCanvas::drawPosText(const void* text, size_t byteLength,
510 const SkPaint& paint) { 510 const SkPoint pos[], const SkPaint& paint) {
511 this->addDrawCommand(new SkDrawPosTextCommand(text, byteLength, pos, paint)) ; 511 this->addDrawCommand(new SkDrawPosTextCommand(text, byteLength, pos, paint)) ;
512 } 512 }
513 513
514 void SkDebugCanvas::onDrawPosTextH(const void* text, size_t byteLength, const Sk Scalar xpos[], 514 void SkDebugCanvas::drawPosTextH(const void* text, size_t byteLength,
515 SkScalar constY, const SkPaint& paint) { 515 const SkScalar xpos[], SkScalar constY, const SkPaint& paint) {
516 this->addDrawCommand( 516 this->addDrawCommand(
517 new SkDrawPosTextHCommand(text, byteLength, xpos, constY, paint)); 517 new SkDrawPosTextHCommand(text, byteLength, xpos, constY, paint));
518 } 518 }
519 519
520 void SkDebugCanvas::drawRect(const SkRect& rect, const SkPaint& paint) { 520 void SkDebugCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
521 // NOTE(chudy): Messing up when renamed to DrawRect... Why? 521 // NOTE(chudy): Messing up when renamed to DrawRect... Why?
522 addDrawCommand(new SkDrawRectCommand(rect, paint)); 522 addDrawCommand(new SkDrawRectCommand(rect, paint));
523 } 523 }
524 524
525 void SkDebugCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) { 525 void SkDebugCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
526 this->addDrawCommand(new SkDrawRRectCommand(rrect, paint)); 526 this->addDrawCommand(new SkDrawRRectCommand(rrect, paint));
527 } 527 }
528 528
529 void SkDebugCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, 529 void SkDebugCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inner,
530 const SkPaint& paint) { 530 const SkPaint& paint) {
531 this->addDrawCommand(new SkDrawDRRectCommand(outer, inner, paint)); 531 this->addDrawCommand(new SkDrawDRRectCommand(outer, inner, paint));
532 } 532 }
533 533
534 void SkDebugCanvas::drawSprite(const SkBitmap& bitmap, int left, int top, 534 void SkDebugCanvas::drawSprite(const SkBitmap& bitmap, int left, int top,
535 const SkPaint* paint = NULL) { 535 const SkPaint* paint = NULL) {
536 this->addDrawCommand(new SkDrawSpriteCommand(bitmap, left, top, paint)); 536 this->addDrawCommand(new SkDrawSpriteCommand(bitmap, left, top, paint));
537 } 537 }
538 538
539 void SkDebugCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, 539 void SkDebugCanvas::drawText(const void* text, size_t byteLength, SkScalar x,
540 const SkPaint& paint) { 540 SkScalar y, const SkPaint& paint) {
541 this->addDrawCommand(new SkDrawTextCommand(text, byteLength, x, y, paint)); 541 this->addDrawCommand(new SkDrawTextCommand(text, byteLength, x, y, paint));
542 } 542 }
543 543
544 void SkDebugCanvas::onDrawTextOnPath(const void* text, size_t byteLength, const SkPath& path, 544 void SkDebugCanvas::drawTextOnPath(const void* text, size_t byteLength,
545 const SkMatrix* matrix, const SkPaint& pain t) { 545 const SkPath& path, const SkMatrix* matrix, const SkPaint& paint) {
546 this->addDrawCommand( 546 this->addDrawCommand(
547 new SkDrawTextOnPathCommand(text, byteLength, path, matrix, paint)); 547 new SkDrawTextOnPathCommand(text, byteLength, path, matrix, paint));
548 } 548 }
549 549
550 void SkDebugCanvas::drawVertices(VertexMode vmode, int vertexCount, 550 void SkDebugCanvas::drawVertices(VertexMode vmode, int vertexCount,
551 const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], 551 const SkPoint vertices[], const SkPoint texs[], const SkColor colors[],
552 SkXfermode*, const uint16_t indices[], int indexCount, 552 SkXfermode*, const uint16_t indices[], int indexCount,
553 const SkPaint& paint) { 553 const SkPaint& paint) {
554 this->addDrawCommand(new SkDrawVerticesCommand(vmode, vertexCount, vertices, 554 this->addDrawCommand(new SkDrawVerticesCommand(vmode, vertexCount, vertices,
555 texs, colors, NULL, indices, indexCount, paint)); 555 texs, colors, NULL, indices, indexCount, paint));
(...skipping 27 matching lines...) Expand all
583 583
584 void SkDebugCanvas::didSetMatrix(const SkMatrix& matrix) { 584 void SkDebugCanvas::didSetMatrix(const SkMatrix& matrix) {
585 this->addDrawCommand(new SkSetMatrixCommand(matrix)); 585 this->addDrawCommand(new SkSetMatrixCommand(matrix));
586 this->INHERITED::didSetMatrix(matrix); 586 this->INHERITED::didSetMatrix(matrix);
587 } 587 }
588 588
589 void SkDebugCanvas::toggleCommand(int index, bool toggle) { 589 void SkDebugCanvas::toggleCommand(int index, bool toggle) {
590 SkASSERT(index < fCommandVector.count()); 590 SkASSERT(index < fCommandVector.count());
591 fCommandVector[index]->setVisible(toggle); 591 fCommandVector[index]->setVisible(toggle);
592 } 592 }
OLDNEW
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698