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

Side by Side Diff: src/utils/debugger/SkDrawCommand.cpp

Issue 786083002: Display text blob bounds in the debugger. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 6 years 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 | « no previous file | 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 "SkDrawCommand.h" 10 #include "SkDrawCommand.h"
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 : INHERITED(DRAW_TEXT_BLOB) 646 : INHERITED(DRAW_TEXT_BLOB)
647 , fBlob(blob) 647 , fBlob(blob)
648 , fXPos(x) 648 , fXPos(x)
649 , fYPos(y) 649 , fYPos(y)
650 , fPaint(paint) { 650 , fPaint(paint) {
651 651
652 blob->ref(); 652 blob->ref();
653 653
654 // FIXME: push blob info 654 // FIXME: push blob info
655 fInfo.push(SkObjectParser::ScalarToString(x, "XPOS: ")); 655 fInfo.push(SkObjectParser::ScalarToString(x, "XPOS: "));
656 fInfo.push(SkObjectParser::ScalarToString(x, "YPOS: ")); 656 fInfo.push(SkObjectParser::ScalarToString(y, "YPOS: "));
657 fInfo.push(SkObjectParser::RectToString(fBlob->bounds(), "Bounds: "));
657 fInfo.push(SkObjectParser::PaintToString(paint)); 658 fInfo.push(SkObjectParser::PaintToString(paint));
658 } 659 }
659 660
660 void SkDrawTextBlobCommand::execute(SkCanvas* canvas) const { 661 void SkDrawTextBlobCommand::execute(SkCanvas* canvas) const {
661 canvas->drawTextBlob(fBlob, fXPos, fYPos, fPaint); 662 canvas->drawTextBlob(fBlob, fXPos, fYPos, fPaint);
662 } 663 }
663 664
664 bool SkDrawTextBlobCommand::render(SkCanvas* canvas) const { 665 bool SkDrawTextBlobCommand::render(SkCanvas* canvas) const {
665 canvas->clear(SK_ColorWHITE); 666 canvas->clear(SK_ColorWHITE);
666 canvas->save(); 667 canvas->save();
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 p.setColor(SK_ColorCYAN); 1018 p.setColor(SK_ColorCYAN);
1018 p.setStyle(SkPaint::kStroke_Style); 1019 p.setStyle(SkPaint::kStroke_Style);
1019 canvas->drawRect(fCullRect, p); 1020 canvas->drawRect(fCullRect, p);
1020 } 1021 }
1021 1022
1022 SkPopCullCommand::SkPopCullCommand() : INHERITED(POP_CULL) { } 1023 SkPopCullCommand::SkPopCullCommand() : INHERITED(POP_CULL) { }
1023 1024
1024 void SkPopCullCommand::execute(SkCanvas* canvas) const { 1025 void SkPopCullCommand::execute(SkCanvas* canvas) const {
1025 canvas->popCull(); 1026 canvas->popCull();
1026 } 1027 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698