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

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

Issue 1130123006: Perform SkPicture analysis lazily. (Closed) Base URL: https://skia.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
11 11
12 #include "SkImageDecoder.h" 12 #include "SkImageDecoder.h"
13 #include "SkLazyPtr.h"
13 #include "SkRefCnt.h" 14 #include "SkRefCnt.h"
14 #include "SkTDArray.h" 15 #include "SkTDArray.h"
15 16
16 #if SK_SUPPORT_GPU 17 #if SK_SUPPORT_GPU
17 class GrContext; 18 class GrContext;
18 #endif 19 #endif
19 20
20 class SkBitmap; 21 class SkBitmap;
21 class SkBBoxHierarchy; 22 class SkBBoxHierarchy;
22 class SkCanvas; 23 class SkCanvas;
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 287
287 struct Analysis { 288 struct Analysis {
288 Analysis() {} // Only used by SkPictureData codepath. 289 Analysis() {} // Only used by SkPictureData codepath.
289 explicit Analysis(const SkRecord&); 290 explicit Analysis(const SkRecord&);
290 291
291 bool suitableForGpuRasterization(const char** reason, int sampleCount) c onst; 292 bool suitableForGpuRasterization(const char** reason, int sampleCount) c onst;
292 293
293 uint8_t fNumSlowPathsAndDashEffects; 294 uint8_t fNumSlowPathsAndDashEffects;
294 bool fWillPlaybackBitmaps : 1; 295 bool fWillPlaybackBitmaps : 1;
295 bool fHasText : 1; 296 bool fHasText : 1;
296 } fAnalysis; 297 };
298 SkLazyPtr<Analysis> fAnalysis;
299 const Analysis& analysis() const;
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