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 SkDrawCommand::SkDrawCommand(OpType type) | 17 SkDrawCommand::SkDrawCommand(OpType type) |
18 : fOpType(type) | 18 : fOpType(type) |
19 , fOffset(0) | |
20 , fVisible(true) { | 19 , fVisible(true) { |
21 } | 20 } |
22 | 21 |
23 SkDrawCommand::~SkDrawCommand() { | 22 SkDrawCommand::~SkDrawCommand() { |
24 fInfo.deleteAll(); | 23 fInfo.deleteAll(); |
25 } | 24 } |
26 | 25 |
27 const char* SkDrawCommand::GetCommandString(OpType type) { | 26 const char* SkDrawCommand::GetCommandString(OpType type) { |
28 switch (type) { | 27 switch (type) { |
29 case kBeginCommentGroup_OpType: return "BeginCommentGroup"; | 28 case kBeginCommentGroup_OpType: return "BeginCommentGroup"; |
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 | 894 |
896 void SkSetMatrixCommand::setUserMatrix(const SkMatrix& userMatrix) { | 895 void SkSetMatrixCommand::setUserMatrix(const SkMatrix& userMatrix) { |
897 fUserMatrix = userMatrix; | 896 fUserMatrix = userMatrix; |
898 } | 897 } |
899 | 898 |
900 void SkSetMatrixCommand::execute(SkCanvas* canvas) const { | 899 void SkSetMatrixCommand::execute(SkCanvas* canvas) const { |
901 SkMatrix temp = SkMatrix::Concat(fUserMatrix, fMatrix); | 900 SkMatrix temp = SkMatrix::Concat(fUserMatrix, fMatrix); |
902 canvas->setMatrix(temp); | 901 canvas->setMatrix(temp); |
903 } | 902 } |
904 | 903 |
OLD | NEW |