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

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

Issue 1308273011: Handle zero-length encoded images gracefully during deserialization (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: generator comments Created 5 years, 3 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 | « no previous file | src/core/SkPictureData.cpp » ('j') | src/core/SkPictureData.cpp » ('J')
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 #ifndef SkPicture_DEFINED 8 #ifndef SkPicture_DEFINED
9 #define SkPicture_DEFINED 9 #define SkPicture_DEFINED
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 /** Return a cull rect for this picture. 96 /** Return a cull rect for this picture.
97 Ops recorded into this picture that attempt to draw outside the cull mig ht not be drawn. 97 Ops recorded into this picture that attempt to draw outside the cull mig ht not be drawn.
98 */ 98 */
99 virtual SkRect cullRect() const = 0; 99 virtual SkRect cullRect() const = 0;
100 100
101 /** Returns a non-zero value unique among all pictures. */ 101 /** Returns a non-zero value unique among all pictures. */
102 uint32_t uniqueID() const; 102 uint32_t uniqueID() const;
103 103
104 /** 104 /**
105 * Serialize to a stream. If non NULL, serializer will be used to serialize 105 * Serialize to a stream. If non NULL, serializer will be used to serialize
106 * any bitmaps in the picture. 106 * bitmaps and images in the picture.
scroggo 2015/09/04 18:48:20 I like that we turn bitmaps into images! I was thi
107 *
108 * TODO: Use serializer to serialize SkImages as well.
109 */ 107 */
110 void serialize(SkWStream*, SkPixelSerializer* = NULL) const; 108 void serialize(SkWStream*, SkPixelSerializer* = NULL) const;
111 109
112 /** 110 /**
113 * Serialize to a buffer. 111 * Serialize to a buffer.
114 */ 112 */
115 void flatten(SkWriteBuffer&) const; 113 void flatten(SkWriteBuffer&) const;
116 114
117 /** 115 /**
118 * Returns true if any bitmaps may be produced when this SkPicture 116 * Returns true if any bitmaps may be produced when this SkPicture
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 static bool IsValidPictInfo(const SkPictInfo& info); 195 static bool IsValidPictInfo(const SkPictInfo& info);
198 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); 196 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*);
199 197
200 SkPictInfo createHeader() const; 198 SkPictInfo createHeader() const;
201 SkPictureData* backport() const; 199 SkPictureData* backport() const;
202 200
203 mutable uint32_t fUniqueID; 201 mutable uint32_t fUniqueID;
204 }; 202 };
205 203
206 #endif 204 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPictureData.cpp » ('j') | src/core/SkPictureData.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698