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

Side by Side Diff: tools/debugger/SkDebugCanvas.cpp

Issue 2105113002: add annotations to debugger (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixes Created 4 years, 5 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
« no previous file with comments | « tools/debugger/SkDebugCanvas.h ('k') | tools/debugger/SkDrawCommand.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 "SkCanvasPriv.h" 8 #include "SkCanvasPriv.h"
9 #include "SkClipStack.h" 9 #include "SkClipStack.h"
10 #include "SkDebugCanvas.h" 10 #include "SkDebugCanvas.h"
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 545
546 void SkDebugCanvas::onClipRegion(const SkRegion& region, SkRegion::Op op) { 546 void SkDebugCanvas::onClipRegion(const SkRegion& region, SkRegion::Op op) {
547 this->addDrawCommand(new SkClipRegionCommand(region, op)); 547 this->addDrawCommand(new SkClipRegionCommand(region, op));
548 } 548 }
549 549
550 void SkDebugCanvas::didConcat(const SkMatrix& matrix) { 550 void SkDebugCanvas::didConcat(const SkMatrix& matrix) {
551 this->addDrawCommand(new SkConcatCommand(matrix)); 551 this->addDrawCommand(new SkConcatCommand(matrix));
552 this->INHERITED::didConcat(matrix); 552 this->INHERITED::didConcat(matrix);
553 } 553 }
554 554
555 void SkDebugCanvas::onDrawAnnotation(const SkRect& rect, const char key[], SkDat a* value) {
556 this->addDrawCommand(new SkDrawAnnotationCommand(rect, key, sk_ref_sp(value) ));
557 }
558
555 void SkDebugCanvas::onDrawBitmap(const SkBitmap& bitmap, SkScalar left, 559 void SkDebugCanvas::onDrawBitmap(const SkBitmap& bitmap, SkScalar left,
556 SkScalar top, const SkPaint* paint) { 560 SkScalar top, const SkPaint* paint) {
557 this->addDrawCommand(new SkDrawBitmapCommand(bitmap, left, top, paint)); 561 this->addDrawCommand(new SkDrawBitmapCommand(bitmap, left, top, paint));
558 } 562 }
559 563
560 void SkDebugCanvas::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst, 564 void SkDebugCanvas::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst,
561 const SkPaint* paint, SrcRectConstraint con straint) { 565 const SkPaint* paint, SrcRectConstraint con straint) {
562 this->addDrawCommand(new SkDrawBitmapRectCommand(bitmap, src, dst, paint, 566 this->addDrawCommand(new SkDrawBitmapRectCommand(bitmap, src, dst, paint,
563 (SrcRectConstraint)constrai nt)); 567 (SrcRectConstraint)constrai nt));
564 } 568 }
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 } 807 }
804 808
805 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { 809 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) {
806 if (fCalledAddStackData) { 810 if (fCalledAddStackData) {
807 fClipStackData.appendf("<br>"); 811 fClipStackData.appendf("<br>");
808 addPathData(devPath, "pathOut"); 812 addPathData(devPath, "pathOut");
809 return true; 813 return true;
810 } 814 }
811 return false; 815 return false;
812 } 816 }
OLDNEW
« no previous file with comments | « tools/debugger/SkDebugCanvas.h ('k') | tools/debugger/SkDrawCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698