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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 void addTextBlob(const SkTextBlob* blob); | 140 void addTextBlob(const SkTextBlob* blob); |
141 | 141 |
142 int find(const SkBitmap& bitmap); | 142 int find(const SkBitmap& bitmap); |
143 | 143 |
144 protected: | 144 protected: |
145 void validate(size_t initialOffset, size_t size) const { | 145 void validate(size_t initialOffset, size_t size) const { |
146 SkASSERT(fWriter.bytesWritten() == initialOffset + size); | 146 SkASSERT(fWriter.bytesWritten() == initialOffset + size); |
147 } | 147 } |
148 | 148 |
149 SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override; | 149 SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override; |
150 const void* onPeekPixels(SkImageInfo*, size_t*) override { | 150 bool onPeekPixels(SkPixmap*) override { return false; } |
151 return NULL; | |
152 } | |
153 | 151 |
154 void willSave() override; | 152 void willSave() override; |
155 SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) ov
erride; | 153 SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) ov
erride; |
156 void willRestore() override; | 154 void willRestore() override; |
157 | 155 |
158 void didConcat(const SkMatrix&) override; | 156 void didConcat(const SkMatrix&) override; |
159 void didSetMatrix(const SkMatrix&) override; | 157 void didSetMatrix(const SkMatrix&) override; |
160 | 158 |
161 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; | 159 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; |
162 | 160 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 232 |
235 uint32_t fRecordFlags; | 233 uint32_t fRecordFlags; |
236 int fInitialSaveCount; | 234 int fInitialSaveCount; |
237 | 235 |
238 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c
onstructor | 236 friend class SkPictureData; // for SkPictureData's SkPictureRecord-based c
onstructor |
239 | 237 |
240 typedef SkCanvas INHERITED; | 238 typedef SkCanvas INHERITED; |
241 }; | 239 }; |
242 | 240 |
243 #endif | 241 #endif |
OLD | NEW |