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

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

Issue 927443006: remove unneeded preroll (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/SkImage.h ('k') | include/core/SkShader.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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 * Serialize to a buffer. 164 * Serialize to a buffer.
165 */ 165 */
166 void flatten(SkWriteBuffer&) const; 166 void flatten(SkWriteBuffer&) const;
167 167
168 /** 168 /**
169 * Returns true if any bitmaps may be produced when this SkPicture 169 * Returns true if any bitmaps may be produced when this SkPicture
170 * is replayed. 170 * is replayed.
171 */ 171 */
172 bool willPlayBackBitmaps() const; 172 bool willPlayBackBitmaps() const;
173 173
174 /**
175 * This is a general hint that the picture will (soon) be drawn into a SkCa nvas with
176 * corresponding attributes (e.g. clip, matrix, props). No drawing occurs, but some
177 * expensive operations may be run (e.g. image decoding).
178 *
179 * Any of the parameters may be NULL.
180 *
181 * @param srcBounds If not NULL, this is the subset of the picture (in the same coordinates
182 * as the picture's bounds) that preroll() should focus on .
183 * @param initialMatrix If not NULL, this is the initialMatrix that is expe cted when the
184 * picture is actually drawn.
185 * @param props If not NULL, these are the expected props when the picture is actually drawn.
186 */
187 void preroll(const SkRect* srcBounds, const SkMatrix* initialMatrix, const S kSurfaceProps*,
188 void* gpuCacheAccessor) const;
189
190 /** Return true if the SkStream/Buffer represents a serialized picture, and 174 /** Return true if the SkStream/Buffer represents a serialized picture, and
191 fills out SkPictInfo. After this function returns, the data source is no t 175 fills out SkPictInfo. After this function returns, the data source is no t
192 rewound so it will have to be manually reset before passing to 176 rewound so it will have to be manually reset before passing to
193 CreateFromStream or CreateFromBuffer. Note, CreateFromStream and 177 CreateFromStream or CreateFromBuffer. Note, CreateFromStream and
194 CreateFromBuffer perform this check internally so these entry points are 178 CreateFromBuffer perform this check internally so these entry points are
195 intended for stand alone tools. 179 intended for stand alone tools.
196 If false is returned, SkPictInfo is unmodified. 180 If false is returned, SkPictInfo is unmodified.
197 */ 181 */
198 static bool InternalOnly_StreamIsSKP(SkStream*, SkPictInfo*); 182 static bool InternalOnly_StreamIsSKP(SkStream*, SkPictInfo*);
199 static bool InternalOnly_BufferIsSKP(SkReadBuffer*, SkPictInfo*); 183 static bool InternalOnly_BufferIsSKP(SkReadBuffer*, SkPictInfo*);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 307
324 friend class SkPictureRecorder; // SkRecord-based constructor. 308 friend class SkPictureRecorder; // SkRecord-based constructor.
325 friend class GrLayerHoister; // access to fRecord 309 friend class GrLayerHoister; // access to fRecord
326 friend class ReplaceDraw; 310 friend class ReplaceDraw;
327 friend class SkPictureUtils; 311 friend class SkPictureUtils;
328 friend class SkRecordedDrawable; 312 friend class SkRecordedDrawable;
329 }; 313 };
330 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); 314 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize);
331 315
332 #endif 316 #endif
OLDNEW
« no previous file with comments | « include/core/SkImage.h ('k') | include/core/SkShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698