OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 The Android Open Source Project |
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 SkPicture_DEFINED | 8 #ifndef SkPicture_DEFINED |
9 #define SkPicture_DEFINED | 9 #define SkPicture_DEFINED |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 class SkPixelSerializer; | 21 class SkPixelSerializer; |
22 class SkStream; | 22 class SkStream; |
23 class SkWStream; | 23 class SkWStream; |
24 struct SkPictInfo; | 24 struct SkPictInfo; |
25 | 25 |
26 /** \class SkPicture | 26 /** \class SkPicture |
27 | 27 |
28 An SkPicture records drawing commands made to a canvas to be played back at
a later time. | 28 An SkPicture records drawing commands made to a canvas to be played back at
a later time. |
29 This base class handles serialization and a few other miscellany. | 29 This base class handles serialization and a few other miscellany. |
30 */ | 30 */ |
31 // TODO(mtklein): logically this could be : public SkRefCnt, but that exposes | 31 class SK_API SkPicture : public SkRefCnt { |
32 // some ref-count adoption bugs in Blink. Keeping this using SkNVRefCnt | |
33 // happens to stifle them for now. skia:3847 | |
34 class SK_API SkPicture : public SkNVRefCnt<SkPicture> { | |
35 public: | 32 public: |
36 virtual ~SkPicture(); | 33 virtual ~SkPicture(); |
37 | 34 |
38 /** | 35 /** |
39 * Function signature defining a function that sets up an SkBitmap from enc
oded data. On | 36 * Function signature defining a function that sets up an SkBitmap from enc
oded data. On |
40 * success, the SkBitmap should have its Config, width, height, rowBytes an
d pixelref set. | 37 * success, the SkBitmap should have its Config, width, height, rowBytes an
d pixelref set. |
41 * If the installed pixelref has decoded the data into pixels, then the src
buffer need not be | 38 * If the installed pixelref has decoded the data into pixels, then the src
buffer need not be |
42 * copied. If the pixelref defers the actual decode until its lockPixels()
is called, then it | 39 * copied. If the pixelref defers the actual decode until its lockPixels()
is called, then it |
43 * must make a copy of the src buffer. | 40 * must make a copy of the src buffer. |
44 * @param src Encoded data. | 41 * @param src Encoded data. |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 static bool IsValidPictInfo(const SkPictInfo& info); | 181 static bool IsValidPictInfo(const SkPictInfo& info); |
185 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); | 182 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); |
186 | 183 |
187 SkPictInfo createHeader() const; | 184 SkPictInfo createHeader() const; |
188 SkPictureData* backport() const; | 185 SkPictureData* backport() const; |
189 | 186 |
190 mutable uint32_t fUniqueID; | 187 mutable uint32_t fUniqueID; |
191 }; | 188 }; |
192 | 189 |
193 #endif | 190 #endif |
OLD | NEW |