OLD | NEW |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2007 The Android Open Source Project | 3 * Copyright 2007 The Android Open Source Project |
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 | 9 |
10 #ifndef SkPicture_DEFINED | 10 #ifndef SkPicture_DEFINED |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
190 #endif | 190 #endif |
191 | 191 |
192 class DeletionListener : public SkRefCnt { | 192 class DeletionListener : public SkRefCnt { |
193 public: | 193 public: |
194 virtual void onDeletion(uint32_t pictureID) = 0; | 194 virtual void onDeletion(uint32_t pictureID) = 0; |
195 }; | 195 }; |
196 | 196 |
197 // Takes ref on listener. | 197 // Takes ref on listener. |
198 void addDeletionListener(DeletionListener* listener) const; | 198 void addDeletionListener(DeletionListener* listener) const; |
199 | 199 |
200 | |
200 private: | 201 private: |
201 // V2 : adds SkPixelRef's generation ID. | 202 // V2 : adds SkPixelRef's generation ID. |
202 // V3 : PictInfo tag at beginning, and EOF tag at the end | 203 // V3 : PictInfo tag at beginning, and EOF tag at the end |
203 // V4 : move SkPictInfo to be the header | 204 // V4 : move SkPictInfo to be the header |
204 // V5 : don't read/write FunctionPtr on cross-process (we can detect that) | 205 // V5 : don't read/write FunctionPtr on cross-process (we can detect that) |
205 // V6 : added serialization of SkPath's bounds (and packed its flags tighter ) | 206 // V6 : added serialization of SkPath's bounds (and packed its flags tighter ) |
206 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect) | 207 // V7 : changed drawBitmapRect(IRect) to drawBitmapRectToRect(Rect) |
207 // V8 : Add an option for encoding bitmaps | 208 // V8 : Add an option for encoding bitmaps |
208 // V9 : Allow the reader and writer of an SKP disagree on whether to support | 209 // V9 : Allow the reader and writer of an SKP disagree on whether to support |
209 // SK_SUPPORT_HINTING_SCALE_FACTOR | 210 // SK_SUPPORT_HINTING_SCALE_FACTOR |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
286 friend class SkPicturePlayback; // to get fData & OperationList | 287 friend class SkPicturePlayback; // to get fData & OperationList |
287 friend class SkPictureReplacementPlayback; // to access OperationList | 288 friend class SkPictureReplacementPlayback; // to access OperationList |
288 | 289 |
289 typedef SkRefCnt INHERITED; | 290 typedef SkRefCnt INHERITED; |
290 | 291 |
291 // Takes ownership of the SkRecord, refs the (optional) BBH. | 292 // Takes ownership of the SkRecord, refs the (optional) BBH. |
292 SkPicture(int width, int height, SkRecord*, SkBBoxHierarchy*); | 293 SkPicture(int width, int height, SkRecord*, SkBBoxHierarchy*); |
293 | 294 |
294 SkAutoTDelete<SkRecord> fRecord; | 295 SkAutoTDelete<SkRecord> fRecord; |
295 SkAutoTUnref<SkBBoxHierarchy> fBBH; | 296 SkAutoTUnref<SkBBoxHierarchy> fBBH; |
296 bool fRecordWillPlayBackBitmaps; // TODO: const | 297 |
298 struct Analysis { | |
299 Analysis() | |
300 : fWillPlaybackBitmaps(false) | |
301 , fSuitableForGpuRasterization(false) { } | |
302 Analysis(const SkRecord&); | |
303 | |
304 bool fWillPlaybackBitmaps; | |
305 bool fSuitableForGpuRasterization; | |
306 }; | |
mtklein
2014/08/18 19:22:14
if you're feeling super snazzy
} const fAnalysis;
tomhudson
2014/08/18 21:37:00
Done.
| |
307 | |
308 const Analysis fAnalysis; | |
297 }; | 309 }; |
298 | 310 |
299 #endif | 311 #endif |
OLD | NEW |