| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifndef SkOrderedReadBuffer_DEFINED | 9 #ifndef SkOrderedReadBuffer_DEFINED |
| 10 #define SkOrderedReadBuffer_DEFINED | 10 #define SkOrderedReadBuffer_DEFINED |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // helpers to get info about arrays and binary data | 66 // helpers to get info about arrays and binary data |
| 67 virtual uint32_t getArrayCount() SK_OVERRIDE; | 67 virtual uint32_t getArrayCount() SK_OVERRIDE; |
| 68 | 68 |
| 69 virtual void readBitmap(SkBitmap* bitmap) SK_OVERRIDE; | 69 virtual void readBitmap(SkBitmap* bitmap) SK_OVERRIDE; |
| 70 virtual SkTypeface* readTypeface() SK_OVERRIDE; | 70 virtual SkTypeface* readTypeface() SK_OVERRIDE; |
| 71 | 71 |
| 72 void setBitmapStorage(SkBitmapHeapReader* bitmapStorage) { | 72 void setBitmapStorage(SkBitmapHeapReader* bitmapStorage) { |
| 73 SkRefCnt_SafeAssign(fBitmapStorage, bitmapStorage); | 73 SkRefCnt_SafeAssign(fBitmapStorage, bitmapStorage); |
| 74 } | 74 } |
| 75 | 75 |
| 76 /** |
| 77 * Return a pointer to the bitmap storage. Does not affect its ref count. |
| 78 */ |
| 79 SkBitmapHeapReader* getBitmapStorage() { |
| 80 return fBitmapStorage; |
| 81 } |
| 82 |
| 76 void setTypefaceArray(SkTypeface* array[], int count) { | 83 void setTypefaceArray(SkTypeface* array[], int count) { |
| 77 fTFArray = array; | 84 fTFArray = array; |
| 78 fTFCount = count; | 85 fTFCount = count; |
| 79 } | 86 } |
| 80 | 87 |
| 81 /** | 88 /** |
| 82 * Call this with a pre-loaded array of Factories, in the same order as | 89 * Call this with a pre-loaded array of Factories, in the same order as |
| 83 * were created/written by the writer. SkPicture uses this. | 90 * were created/written by the writer. SkPicture uses this. |
| 84 */ | 91 */ |
| 85 void setFactoryPlayback(SkFlattenable::Factory array[], int count) { | 92 void setFactoryPlayback(SkFlattenable::Factory array[], int count) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 SkTDArray<SkFlattenable::Factory>* fFactoryTDArray; | 126 SkTDArray<SkFlattenable::Factory>* fFactoryTDArray; |
| 120 SkFlattenable::Factory* fFactoryArray; | 127 SkFlattenable::Factory* fFactoryArray; |
| 121 int fFactoryCount; | 128 int fFactoryCount; |
| 122 | 129 |
| 123 SkPicture::InstallPixelRefProc fBitmapDecoder; | 130 SkPicture::InstallPixelRefProc fBitmapDecoder; |
| 124 | 131 |
| 125 typedef SkFlattenableReadBuffer INHERITED; | 132 typedef SkFlattenableReadBuffer INHERITED; |
| 126 }; | 133 }; |
| 127 | 134 |
| 128 #endif // SkOrderedReadBuffer_DEFINED | 135 #endif // SkOrderedReadBuffer_DEFINED |
| OLD | NEW |