OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 8 |
9 | 9 |
10 #ifndef SkGPipe_DEFINED | 10 #ifndef SkGPipe_DEFINED |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 void setCanvas(SkGPipeCanvas*); | 92 void setCanvas(SkGPipeCanvas*); |
93 | 93 |
94 SkGPipeCanvas* fCanvas; | 94 SkGPipeCanvas* fCanvas; |
95 }; | 95 }; |
96 | 96 |
97 class SkGPipeWriter { | 97 class SkGPipeWriter { |
98 public: | 98 public: |
99 SkGPipeWriter(); | 99 SkGPipeWriter(); |
100 ~SkGPipeWriter(); | 100 ~SkGPipeWriter(); |
101 | 101 |
102 bool isRecording() const { return NULL != fCanvas; } | 102 bool isRecording() const { return SkToBool(fCanvas); } |
103 | 103 |
104 enum Flags { | 104 enum Flags { |
105 /** | 105 /** |
106 * Tells the writer that the reader will be in a different process, so | 106 * Tells the writer that the reader will be in a different process, so |
107 * (for example) we cannot put function pointers in the stream. | 107 * (for example) we cannot put function pointers in the stream. |
108 */ | 108 */ |
109 kCrossProcess_Flag = 1 << 0, | 109 kCrossProcess_Flag = 1 << 0, |
110 | 110 |
111 /** | 111 /** |
112 * Only meaningful if kCrossProcess_Flag is set. Tells the writer that | 112 * Only meaningful if kCrossProcess_Flag is set. Tells the writer that |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 private: | 159 private: |
160 enum { | 160 enum { |
161 kDefaultRecordingCanvasSize = 32767, | 161 kDefaultRecordingCanvasSize = 32767, |
162 }; | 162 }; |
163 | 163 |
164 SkGPipeCanvas* fCanvas; | 164 SkGPipeCanvas* fCanvas; |
165 SkWriter32 fWriter; | 165 SkWriter32 fWriter; |
166 }; | 166 }; |
167 | 167 |
168 #endif | 168 #endif |
OLD | NEW |