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

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

Issue 1462643002: [debugger] Add visualization of center rect for drawBitmapNine calls (Closed) Base URL: https://skia.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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 if (paint) { 329 if (paint) {
330 fInfo.push(SkObjectParser::PaintToString(*paint)); 330 fInfo.push(SkObjectParser::PaintToString(*paint));
331 } 331 }
332 } 332 }
333 333
334 void SkDrawBitmapNineCommand::execute(SkCanvas* canvas) const { 334 void SkDrawBitmapNineCommand::execute(SkCanvas* canvas) const {
335 canvas->drawBitmapNine(fBitmap, fCenter, fDst, fPaintPtr); 335 canvas->drawBitmapNine(fBitmap, fCenter, fDst, fPaintPtr);
336 } 336 }
337 337
338 bool SkDrawBitmapNineCommand::render(SkCanvas* canvas) const { 338 bool SkDrawBitmapNineCommand::render(SkCanvas* canvas) const {
339 render_bitmap(canvas, fBitmap); 339 SkRect tmp = SkRect::Make(fCenter);
340 render_bitmap(canvas, fBitmap, &tmp);
340 return true; 341 return true;
341 } 342 }
342 343
343 SkDrawBitmapRectCommand::SkDrawBitmapRectCommand(const SkBitmap& bitmap, const S kRect* src, 344 SkDrawBitmapRectCommand::SkDrawBitmapRectCommand(const SkBitmap& bitmap, const S kRect* src,
344 const SkRect& dst, const SkPain t* paint, 345 const SkRect& dst, const SkPain t* paint,
345 SkCanvas::SrcRectConstraint con straint) 346 SkCanvas::SrcRectConstraint con straint)
346 : INHERITED(kDrawBitmapRect_OpType) { 347 : INHERITED(kDrawBitmapRect_OpType) {
347 fBitmap = bitmap; 348 fBitmap = bitmap;
348 if (src) { 349 if (src) {
349 fSrc = *src; 350 fSrc = *src;
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 983
983 void SkSetMatrixCommand::setUserMatrix(const SkMatrix& userMatrix) { 984 void SkSetMatrixCommand::setUserMatrix(const SkMatrix& userMatrix) {
984 fUserMatrix = userMatrix; 985 fUserMatrix = userMatrix;
985 } 986 }
986 987
987 void SkSetMatrixCommand::execute(SkCanvas* canvas) const { 988 void SkSetMatrixCommand::execute(SkCanvas* canvas) const {
988 SkMatrix temp = SkMatrix::Concat(fUserMatrix, fMatrix); 989 SkMatrix temp = SkMatrix::Concat(fUserMatrix, fMatrix);
989 canvas->setMatrix(temp); 990 canvas->setMatrix(temp);
990 } 991 }
991 992
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