| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |