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

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

Issue 2000423007: Expose SkPicture::numSlowPaths() in the public API. Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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/SkBigPicture.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 #ifndef SkPicture_DEFINED 8 #ifndef SkPicture_DEFINED
9 #define SkPicture_DEFINED 9 #define SkPicture_DEFINED
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Sent via SkMessageBus from destructor. 161 // Sent via SkMessageBus from destructor.
162 struct DeletionMessage { int32_t fUniqueID; }; // TODO: -> uint32_t? 162 struct DeletionMessage { int32_t fUniqueID; }; // TODO: -> uint32_t?
163 163
164 // Returns NULL if this is not an SkBigPicture. 164 // Returns NULL if this is not an SkBigPicture.
165 virtual const SkBigPicture* asSkBigPicture() const { return NULL; } 165 virtual const SkBigPicture* asSkBigPicture() const { return NULL; }
166 166
167 // Global setting to enable or disable security precautions for serializatio n. 167 // Global setting to enable or disable security precautions for serializatio n.
168 static void SetPictureIOSecurityPrecautionsEnabled_Dangerous(bool set); 168 static void SetPictureIOSecurityPrecautionsEnabled_Dangerous(bool set);
169 static bool PictureIOSecurityPrecautionsEnabled(); 169 static bool PictureIOSecurityPrecautionsEnabled();
170 170
171 // Number of drawpath and clippath calls which may be slow to draw on the GP U without MSAA.
172 virtual int numSlowPaths() const = 0;
173
171 #ifdef SK_SUPPORT_LEGACY_PICTURE_PTR 174 #ifdef SK_SUPPORT_LEGACY_PICTURE_PTR
172 static SkPicture* CreateFromStream(SkStream* stream, InstallPixelRefProc pro c) { 175 static SkPicture* CreateFromStream(SkStream* stream, InstallPixelRefProc pro c) {
173 return MakeFromStream(stream, proc).release(); 176 return MakeFromStream(stream, proc).release();
174 } 177 }
175 static SkPicture* CreateFromStream(SkStream* stream) { 178 static SkPicture* CreateFromStream(SkStream* stream) {
176 return MakeFromStream(stream).release(); 179 return MakeFromStream(stream).release();
177 } 180 }
178 static SkPicture* CreateFromBuffer(SkReadBuffer& rbuf) { 181 static SkPicture* CreateFromBuffer(SkReadBuffer& rbuf) {
179 return MakeFromBuffer(rbuf).release(); 182 return MakeFromBuffer(rbuf).release();
180 } 183 }
181 #endif 184 #endif
182 185
183 private: 186 private:
184 // Subclass whitelist. 187 // Subclass whitelist.
185 SkPicture(); 188 SkPicture();
186 friend class SkBigPicture; 189 friend class SkBigPicture;
187 friend class SkEmptyPicture; 190 friend class SkEmptyPicture;
188 template <typename> friend class SkMiniPicture; 191 template <typename> friend class SkMiniPicture;
189 192
190 void serialize(SkWStream*, SkPixelSerializer*, SkRefCntSet* typefaces) const ; 193 void serialize(SkWStream*, SkPixelSerializer*, SkRefCntSet* typefaces) const ;
191 static sk_sp<SkPicture> MakeFromStream(SkStream*, InstallPixelRefProc, SkTyp efacePlayback*); 194 static sk_sp<SkPicture> MakeFromStream(SkStream*, InstallPixelRefProc, SkTyp efacePlayback*);
192 friend class SkPictureData; 195 friend class SkPictureData;
193 196
194 virtual int numSlowPaths() const = 0;
195 friend class SkPictureGpuAnalyzer;
196 friend struct SkPathCounter; 197 friend struct SkPathCounter;
197 198
198 // V35: Store SkRect (rather then width & height) in header 199 // V35: Store SkRect (rather then width & height) in header
199 // V36: Remove (obsolete) alphatype from SkColorTable 200 // V36: Remove (obsolete) alphatype from SkColorTable
200 // V37: Added shadow only option to SkDropShadowImageFilter (last version to record CLEAR) 201 // V37: Added shadow only option to SkDropShadowImageFilter (last version to record CLEAR)
201 // V38: Added PictureResolution option to SkPictureImageFilter 202 // V38: Added PictureResolution option to SkPictureImageFilter
202 // V39: Added FilterLevel option to SkPictureImageFilter 203 // V39: Added FilterLevel option to SkPictureImageFilter
203 // V40: Remove UniqueID serialization from SkImageFilter. 204 // V40: Remove UniqueID serialization from SkImageFilter.
204 // V41: Added serialization of SkBitmapSource's filterQuality parameter 205 // V41: Added serialization of SkBitmapSource's filterQuality parameter
205 // V42: Added a bool to SkPictureShader serialization to indicate did-we-ser ialize-a-picture? 206 // V42: Added a bool to SkPictureShader serialization to indicate did-we-ser ialize-a-picture?
(...skipping 19 matching lines...) Expand all
225 const SkPictureData*, 226 const SkPictureData*,
226 const SkReadBuffer* buffer); 227 const SkReadBuffer* buffer);
227 228
228 SkPictInfo createHeader() const; 229 SkPictInfo createHeader() const;
229 SkPictureData* backport() const; 230 SkPictureData* backport() const;
230 231
231 mutable uint32_t fUniqueID; 232 mutable uint32_t fUniqueID;
232 }; 233 };
233 234
234 #endif 235 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkBigPicture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698