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 #ifndef SkPictureRecord_DEFINED | 8 #ifndef SkPictureRecord_DEFINED |
9 #define SkPictureRecord_DEFINED | 9 #define SkPictureRecord_DEFINED |
10 | 10 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 void addText(const void* text, size_t byteLength); | 187 void addText(const void* text, size_t byteLength); |
188 void addTextBlob(const SkTextBlob* blob); | 188 void addTextBlob(const SkTextBlob* blob); |
189 | 189 |
190 int find(const SkBitmap& bitmap); | 190 int find(const SkBitmap& bitmap); |
191 | 191 |
192 protected: | 192 protected: |
193 void validate(size_t initialOffset, size_t size) const { | 193 void validate(size_t initialOffset, size_t size) const { |
194 SkASSERT(fWriter.bytesWritten() == initialOffset + size); | 194 SkASSERT(fWriter.bytesWritten() == initialOffset + size); |
195 } | 195 } |
196 | 196 |
197 virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE; | 197 virtual SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) S
K_OVERRIDE; |
198 const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE { | 198 const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE { |
199 return NULL; | 199 return NULL; |
200 } | 200 } |
201 | 201 |
202 virtual void willSave() SK_OVERRIDE; | 202 virtual void willSave() SK_OVERRIDE; |
203 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; | 203 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; |
204 virtual void willRestore() SK_OVERRIDE; | 204 virtual void willRestore() SK_OVERRIDE; |
205 | 205 |
206 virtual void didConcat(const SkMatrix&) SK_OVERRIDE; | 206 virtual void didConcat(const SkMatrix&) SK_OVERRIDE; |
207 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE; | 207 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 bool fOptsEnabled; | 295 bool fOptsEnabled; |
296 int fInitialSaveCount; | 296 int fInitialSaveCount; |
297 | 297 |
298 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c
onstructor | 298 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c
onstructor |
299 friend class SkPictureTester; // for unit testing | 299 friend class SkPictureTester; // for unit testing |
300 | 300 |
301 typedef SkCanvas INHERITED; | 301 typedef SkCanvas INHERITED; |
302 }; | 302 }; |
303 | 303 |
304 #endif | 304 #endif |
OLD | NEW |