Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: include/core/SkPicture.h

Issue 849103004: Make SkStream *not* ref counted. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase, just in case. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/core/SkImageDecoder.h ('k') | include/core/SkStream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 8
9 #ifndef SkPicture_DEFINED 9 #ifndef SkPicture_DEFINED
10 #define SkPicture_DEFINED 10 #define SkPicture_DEFINED
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 * must make a copy of the src buffer. 73 * must make a copy of the src buffer.
74 * @param src Encoded data. 74 * @param src Encoded data.
75 * @param length Size of the encoded data, in bytes. 75 * @param length Size of the encoded data, in bytes.
76 * @param dst SkBitmap to install the pixel ref on. 76 * @param dst SkBitmap to install the pixel ref on.
77 * @param bool Whether or not a pixel ref was successfully installed. 77 * @param bool Whether or not a pixel ref was successfully installed.
78 */ 78 */
79 typedef bool (*InstallPixelRefProc)(const void* src, size_t length, SkBitmap * dst); 79 typedef bool (*InstallPixelRefProc)(const void* src, size_t length, SkBitmap * dst);
80 80
81 /** 81 /**
82 * Recreate a picture that was serialized into a stream. 82 * Recreate a picture that was serialized into a stream.
83 * @param SkStream Serialized picture data. 83 * @param SkStream Serialized picture data. Ownership is unchanged by this call.
84 * @param proc Function pointer for installing pixelrefs on SkBitmaps repre senting the 84 * @param proc Function pointer for installing pixelrefs on SkBitmaps repre senting the
85 * encoded bitmap data from the stream. 85 * encoded bitmap data from the stream.
86 * @return A new SkPicture representing the serialized data, or NULL if the stream is 86 * @return A new SkPicture representing the serialized data, or NULL if the stream is
87 * invalid. 87 * invalid.
88 */ 88 */
89 static SkPicture* CreateFromStream(SkStream*, 89 static SkPicture* CreateFromStream(SkStream*,
90 InstallPixelRefProc proc = &SkImageDecode r::DecodeMemory); 90 InstallPixelRefProc proc = &SkImageDecode r::DecodeMemory);
91 91
92 /** 92 /**
93 * Recreate a picture that was serialized into a buffer. If the creation re quires bitmap 93 * Recreate a picture that was serialized into a buffer. If the creation re quires bitmap
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 friend class SkPictureRecorder; // SkRecord-based constructor. 308 friend class SkPictureRecorder; // SkRecord-based constructor.
309 friend class GrLayerHoister; // access to fRecord 309 friend class GrLayerHoister; // access to fRecord
310 friend class ReplaceDraw; 310 friend class ReplaceDraw;
311 friend class SkPictureUtils; 311 friend class SkPictureUtils;
312 friend class SkRecordedDrawable; 312 friend class SkRecordedDrawable;
313 }; 313 };
314 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); 314 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize);
315 315
316 #endif 316 #endif
OLDNEW
« no previous file with comments | « include/core/SkImageDecoder.h ('k') | include/core/SkStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698