| 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 , fDst(dst) | 395 , fDst(dst) |
| 396 , fConstraint(constraint) { | 396 , fConstraint(constraint) { |
| 397 | 397 |
| 398 if (src) { | 398 if (src) { |
| 399 fSrc.set(*src); | 399 fSrc.set(*src); |
| 400 } | 400 } |
| 401 | 401 |
| 402 if (paint) { | 402 if (paint) { |
| 403 fPaint.set(*paint); | 403 fPaint.set(*paint); |
| 404 } | 404 } |
| 405 |
| 406 fInfo.push(SkObjectParser::ImageToString(image)); |
| 407 if (src) { |
| 408 fInfo.push(SkObjectParser::RectToString(*src, "Src: ")); |
| 409 } |
| 410 fInfo.push(SkObjectParser::RectToString(dst, "Dst: ")); |
| 411 if (paint) { |
| 412 fInfo.push(SkObjectParser::PaintToString(*paint)); |
| 413 } |
| 414 fInfo.push(SkObjectParser::IntToString(fConstraint, "Constraint: ")); |
| 405 } | 415 } |
| 406 | 416 |
| 407 void SkDrawImageRectCommand::execute(SkCanvas* canvas) const { | 417 void SkDrawImageRectCommand::execute(SkCanvas* canvas) const { |
| 408 canvas->legacy_drawImageRect(fImage, fSrc.getMaybeNull(), fDst, fPaint.getMa
ybeNull(), fConstraint); | 418 canvas->legacy_drawImageRect(fImage, fSrc.getMaybeNull(), fDst, fPaint.getMa
ybeNull(), fConstraint); |
| 409 } | 419 } |
| 410 | 420 |
| 411 bool SkDrawImageRectCommand::render(SkCanvas* canvas) const { | 421 bool SkDrawImageRectCommand::render(SkCanvas* canvas) const { |
| 412 SkAutoCanvasRestore acr(canvas, true); | 422 SkAutoCanvasRestore acr(canvas, true); |
| 413 canvas->clear(0xFFFFFFFF); | 423 canvas->clear(0xFFFFFFFF); |
| 414 | 424 |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 | 957 |
| 948 void SkSetMatrixCommand::setUserMatrix(const SkMatrix& userMatrix) { | 958 void SkSetMatrixCommand::setUserMatrix(const SkMatrix& userMatrix) { |
| 949 fUserMatrix = userMatrix; | 959 fUserMatrix = userMatrix; |
| 950 } | 960 } |
| 951 | 961 |
| 952 void SkSetMatrixCommand::execute(SkCanvas* canvas) const { | 962 void SkSetMatrixCommand::execute(SkCanvas* canvas) const { |
| 953 SkMatrix temp = SkMatrix::Concat(fUserMatrix, fMatrix); | 963 SkMatrix temp = SkMatrix::Concat(fUserMatrix, fMatrix); |
| 954 canvas->setMatrix(temp); | 964 canvas->setMatrix(temp); |
| 955 } | 965 } |
| 956 | 966 |
| OLD | NEW |