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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 kRestore_OpType, | 52 kRestore_OpType, |
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); |
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); |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 static SkSetMatrixCommand* fromJSON(Json::Value& command, UrlDataManager& ur
lDataManager); | 673 static SkSetMatrixCommand* fromJSON(Json::Value& command, UrlDataManager& ur
lDataManager); |
674 | 674 |
675 private: | 675 private: |
676 SkMatrix fUserMatrix; | 676 SkMatrix fUserMatrix; |
677 SkMatrix fMatrix; | 677 SkMatrix fMatrix; |
678 | 678 |
679 typedef SkDrawCommand INHERITED; | 679 typedef SkDrawCommand INHERITED; |
680 }; | 680 }; |
681 | 681 |
682 #endif | 682 #endif |
OLD | NEW |