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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 void validate(size_t initialOffset, uint32_t size) const { | 215 void validate(size_t initialOffset, uint32_t size) const { |
216 SkASSERT(fWriter.bytesWritten() == initialOffset + size); | 216 SkASSERT(fWriter.bytesWritten() == initialOffset + size); |
217 } | 217 } |
218 #endif | 218 #endif |
219 | 219 |
220 protected: | 220 protected: |
221 virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE; | 221 virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE; |
222 const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE { | 222 const void* onPeekPixels(SkImageInfo*, size_t*) SK_OVERRIDE { |
223 return NULL; | 223 return NULL; |
224 } | 224 } |
| 225 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; |
225 | 226 |
226 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been | 227 // Return fontmetrics.fTop,fBottom in topbot[0,1], after they have been |
227 // tweaked by paint.computeFastBounds(). | 228 // tweaked by paint.computeFastBounds(). |
228 static void ComputeFontMetricsTopBottom(const SkPaint& paint, SkScalar topbo
t[2]); | 229 static void ComputeFontMetricsTopBottom(const SkPaint& paint, SkScalar topbo
t[2]); |
229 | 230 |
230 // Make sure that flat has fTopBot written. | 231 // Make sure that flat has fTopBot written. |
231 static void WriteTopBot(const SkPaint& paint, const SkFlatData& flat) { | 232 static void WriteTopBot(const SkPaint& paint, const SkFlatData& flat) { |
232 if (!flat.isTopBotWritten()) { | 233 if (!flat.isTopBotWritten()) { |
233 ComputeFontMetricsTopBottom(paint, flat.writableTopBot()); | 234 ComputeFontMetricsTopBottom(paint, flat.writableTopBot()); |
234 SkASSERT(flat.isTopBotWritten()); | 235 SkASSERT(flat.isTopBotWritten()); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 friend class SkPictureTester; // for unit testing | 288 friend class SkPictureTester; // for unit testing |
288 | 289 |
289 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE | 290 #ifdef SK_COLLAPSE_MATRIX_CLIP_STATE |
290 SkMatrixClipStateMgr fMCMgr; | 291 SkMatrixClipStateMgr fMCMgr; |
291 #endif | 292 #endif |
292 | 293 |
293 typedef SkCanvas INHERITED; | 294 typedef SkCanvas INHERITED; |
294 }; | 295 }; |
295 | 296 |
296 #endif | 297 #endif |
OLD | NEW |