| 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" |
| 11 #include "SkObjectParser.h" | 11 #include "SkObjectParser.h" |
| 12 #include "SkPicture.h" | 12 #include "SkPicture.h" |
| 13 #include "SkTextBlob.h" | 13 #include "SkTextBlob.h" |
| 14 | 14 |
| 15 // TODO(chudy): Refactor into non subclass model. | 15 // TODO(chudy): Refactor into non subclass model. |
| 16 | 16 |
| 17 const char* SkDrawCommand::kDrawRectString = "DrawRect"; | |
| 18 const char* SkDrawCommand::kClipRectString = "ClipRect"; | |
| 19 | |
| 20 SkDrawCommand::SkDrawCommand(OpType type) | 17 SkDrawCommand::SkDrawCommand(OpType type) |
| 21 : fOpType(type) | 18 : fOpType(type) |
| 22 , fOffset(0) | 19 , fOffset(0) |
| 23 , fVisible(true) { | 20 , fVisible(true) { |
| 24 } | 21 } |
| 25 | 22 |
| 26 SkDrawCommand::~SkDrawCommand() { | 23 SkDrawCommand::~SkDrawCommand() { |
| 27 fInfo.deleteAll(); | 24 fInfo.deleteAll(); |
| 28 } | 25 } |
| 29 | 26 |
| (...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 | 895 |
| 899 void SkSetMatrixCommand::setUserMatrix(const SkMatrix& userMatrix) { | 896 void SkSetMatrixCommand::setUserMatrix(const SkMatrix& userMatrix) { |
| 900 fUserMatrix = userMatrix; | 897 fUserMatrix = userMatrix; |
| 901 } | 898 } |
| 902 | 899 |
| 903 void SkSetMatrixCommand::execute(SkCanvas* canvas) const { | 900 void SkSetMatrixCommand::execute(SkCanvas* canvas) const { |
| 904 SkMatrix temp = SkMatrix::Concat(fUserMatrix, fMatrix); | 901 SkMatrix temp = SkMatrix::Concat(fUserMatrix, fMatrix); |
| 905 canvas->setMatrix(temp); | 902 canvas->setMatrix(temp); |
| 906 } | 903 } |
| 907 | 904 |
| OLD | NEW |