OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SKDRAWCOMMAND_H_ | 8 #ifndef SKDRAWCOMMAND_H_ |
9 #define SKDRAWCOMMAND_H_ | 9 #define SKDRAWCOMMAND_H_ |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 kSave_OpType, | 53 kSave_OpType, |
54 kSaveLayer_OpType, | 54 kSaveLayer_OpType, |
55 kSetMatrix_OpType, | 55 kSetMatrix_OpType, |
56 | 56 |
57 kLast_OpType = kSetMatrix_OpType | 57 kLast_OpType = kSetMatrix_OpType |
58 }; | 58 }; |
59 | 59 |
60 static const int kOpTypeCount = kLast_OpType + 1; | 60 static const int kOpTypeCount = kLast_OpType + 1; |
61 | 61 |
62 static void WritePNG(const png_bytep rgba, png_uint_32 width, png_uint_32 he
ight, | 62 static void WritePNG(const png_bytep rgba, png_uint_32 width, png_uint_32 he
ight, |
63 SkWStream& out); | 63 SkWStream& out, bool isOpaque); |
64 | 64 |
65 SkDrawCommand(OpType opType); | 65 SkDrawCommand(OpType opType); |
66 | 66 |
67 virtual ~SkDrawCommand(); | 67 virtual ~SkDrawCommand(); |
68 | 68 |
69 virtual SkString toString() const; | 69 virtual SkString toString() const; |
70 | 70 |
71 virtual const char* toCString() const { | 71 virtual const char* toCString() const { |
72 return GetCommandString(fOpType); | 72 return GetCommandString(fOpType); |
73 } | 73 } |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 static SkSetMatrixCommand* fromJSON(Json::Value& command, UrlDataManager& ur
lDataManager); | 687 static SkSetMatrixCommand* fromJSON(Json::Value& command, UrlDataManager& ur
lDataManager); |
688 | 688 |
689 private: | 689 private: |
690 SkMatrix fUserMatrix; | 690 SkMatrix fUserMatrix; |
691 SkMatrix fMatrix; | 691 SkMatrix fMatrix; |
692 | 692 |
693 typedef SkDrawCommand INHERITED; | 693 typedef SkDrawCommand INHERITED; |
694 }; | 694 }; |
695 | 695 |
696 #endif | 696 #endif |
OLD | NEW |