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

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

Issue 1135363002: Defer execution of SkPicture::Analysis::Analysis Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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/SkPicture.cpp » ('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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 intended for stand alone tools. 161 intended for stand alone tools.
162 If false is returned, SkPictInfo is unmodified. 162 If false is returned, SkPictInfo is unmodified.
163 */ 163 */
164 static bool InternalOnly_StreamIsSKP(SkStream*, SkPictInfo*); 164 static bool InternalOnly_StreamIsSKP(SkStream*, SkPictInfo*);
165 static bool InternalOnly_BufferIsSKP(SkReadBuffer*, SkPictInfo*); 165 static bool InternalOnly_BufferIsSKP(SkReadBuffer*, SkPictInfo*);
166 166
167 /** Return true if the picture is suitable for rendering on the GPU. 167 /** Return true if the picture is suitable for rendering on the GPU.
168 */ 168 */
169 169
170 #if SK_SUPPORT_GPU 170 #if SK_SUPPORT_GPU
171 bool suitableForGpuRasterization(GrContext*, const char ** = NULL) const; 171 bool suitableForGpuRasterization(GrContext*, const char ** = NULL);
172 #endif 172 #endif
173 173
174 /** Return the approximate number of operations in this picture. This 174 /** Return the approximate number of operations in this picture. This
175 * number may be greater or less than the number of SkCanvas calls 175 * number may be greater or less than the number of SkCanvas calls
176 * recorded: some calls may be recorded as more than one operation, or some 176 * recorded: some calls may be recorded as more than one operation, or some
177 * calls may be optimized away. 177 * calls may be optimized away.
178 */ 178 */
179 int approximateOpCount() const; 179 int approximateOpCount() const;
180 180
181 /** Return true if this picture contains text. 181 /** Return true if this picture contains text.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 int drawableCount() const; 281 int drawableCount() const;
282 // will return NULL if drawableCount() returns 0 282 // will return NULL if drawableCount() returns 0
283 SkPicture const* const* drawablePicts() const; 283 SkPicture const* const* drawablePicts() const;
284 284
285 struct PathCounter; 285 struct PathCounter;
286 286
287 struct Analysis { 287 struct Analysis {
288 Analysis() {} // Only used by SkPictureData codepath. 288 Analysis() {} // Only used by SkPictureData codepath.
289 explicit Analysis(const SkRecord&); 289 explicit Analysis(const SkRecord&);
290 290
291 bool isAnalyzed() const {return fIsAnalyzed;}
292 void performAnalysis(const SkRecord&);
291 bool suitableForGpuRasterization(const char** reason, int sampleCount) c onst; 293 bool suitableForGpuRasterization(const char** reason, int sampleCount) c onst;
292 294
293 uint8_t fNumSlowPathsAndDashEffects; 295 uint8_t fNumSlowPathsAndDashEffects;
294 bool fWillPlaybackBitmaps : 1; 296 bool fWillPlaybackBitmaps : 1;
295 bool fHasText : 1; 297 bool fHasText : 1;
298 bool fIsAnalyzed : 1;
296 } fAnalysis; 299 } fAnalysis;
297 300
298 friend class SkPictureRecorder; // SkRecord-based constructor. 301 friend class SkPictureRecorder; // SkRecord-based constructor.
299 friend class GrLayerHoister; // access to fRecord 302 friend class GrLayerHoister; // access to fRecord
300 friend class ReplaceDraw; 303 friend class ReplaceDraw;
301 friend class SkPictureUtils; 304 friend class SkPictureUtils;
302 friend class SkRecordedDrawable; 305 friend class SkRecordedDrawable;
303 }; 306 };
304 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 88, SkPictureSize); 307 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 88, SkPictureSize);
305 308
306 #endif 309 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698