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

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

Issue 1409393007: [SkDebugger] Show detailed drawImage info (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 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
« 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 return true; 380 return true;
381 } 381 }
382 382
383 SkDrawImageCommand::SkDrawImageCommand(const SkImage* image, SkScalar left, SkSc alar top, 383 SkDrawImageCommand::SkDrawImageCommand(const SkImage* image, SkScalar left, SkSc alar top,
384 const SkPaint* paint) 384 const SkPaint* paint)
385 : INHERITED(kDrawImage_OpType) 385 : INHERITED(kDrawImage_OpType)
386 , fImage(SkRef(image)) 386 , fImage(SkRef(image))
387 , fLeft(left) 387 , fLeft(left)
388 , fTop(top) { 388 , fTop(top) {
389 389
390 fInfo.push(SkObjectParser::ImageToString(image));
391 fInfo.push(SkObjectParser::ScalarToString(left, "Left: "));
392 fInfo.push(SkObjectParser::ScalarToString(top, "Top: "));
393
390 if (paint) { 394 if (paint) {
391 fPaint.set(*paint); 395 fPaint.set(*paint);
396 fInfo.push(SkObjectParser::PaintToString(*paint));
392 } 397 }
393 } 398 }
394 399
395 void SkDrawImageCommand::execute(SkCanvas* canvas) const { 400 void SkDrawImageCommand::execute(SkCanvas* canvas) const {
396 canvas->drawImage(fImage, fLeft, fTop, fPaint.getMaybeNull()); 401 canvas->drawImage(fImage, fLeft, fTop, fPaint.getMaybeNull());
397 } 402 }
398 403
399 bool SkDrawImageCommand::render(SkCanvas* canvas) const { 404 bool SkDrawImageCommand::render(SkCanvas* canvas) const {
400 SkAutoCanvasRestore acr(canvas, true); 405 SkAutoCanvasRestore acr(canvas, true);
401 canvas->clear(0xFFFFFFFF); 406 canvas->clear(0xFFFFFFFF);
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 982
978 void SkSetMatrixCommand::setUserMatrix(const SkMatrix& userMatrix) { 983 void SkSetMatrixCommand::setUserMatrix(const SkMatrix& userMatrix) {
979 fUserMatrix = userMatrix; 984 fUserMatrix = userMatrix;
980 } 985 }
981 986
982 void SkSetMatrixCommand::execute(SkCanvas* canvas) const { 987 void SkSetMatrixCommand::execute(SkCanvas* canvas) const {
983 SkMatrix temp = SkMatrix::Concat(fUserMatrix, fMatrix); 988 SkMatrix temp = SkMatrix::Concat(fUserMatrix, fMatrix);
984 canvas->setMatrix(temp); 989 canvas->setMatrix(temp);
985 } 990 }
986 991
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