OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
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 SkPictureData_DEFINED | 8 #ifndef SkPictureData_DEFINED |
9 #define SkPictureData_DEFINED | 9 #define SkPictureData_DEFINED |
10 | 10 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 */ | 175 */ |
176 bool suitableForGpuRasterization(GrContext* context, const char **reason, | 176 bool suitableForGpuRasterization(GrContext* context, const char **reason, |
177 int sampleCount = 0) const; | 177 int sampleCount = 0) const; |
178 | 178 |
179 /** | 179 /** |
180 * Calls getRecommendedSampleCount with GrPixelConfig and dpi to calculate s
ampleCount | 180 * Calls getRecommendedSampleCount with GrPixelConfig and dpi to calculate s
ampleCount |
181 * and then calls the above version of suitableForGpuRasterization | 181 * and then calls the above version of suitableForGpuRasterization |
182 */ | 182 */ |
183 bool suitableForGpuRasterization(GrContext* context, const char **reason, | 183 bool suitableForGpuRasterization(GrContext* context, const char **reason, |
184 GrPixelConfig config, SkScalar dpi) const; | 184 GrPixelConfig config, SkScalar dpi) const; |
| 185 |
| 186 bool suitableForLayerOptimization() const; |
185 #endif | 187 #endif |
186 | 188 |
187 private: | 189 private: |
188 friend class SkPicture; // needed in SkPicture::clone (rm when it is removed
) | 190 friend class SkPicture; // needed in SkPicture::clone (rm when it is removed
) |
189 | 191 |
190 void init(); | 192 void init(); |
191 | 193 |
192 // these help us with reading/writing | 194 // these help us with reading/writing |
193 bool parseStreamTag(SkStream*, uint32_t tag, uint32_t size, SkPicture::Insta
llPixelRefProc); | 195 bool parseStreamTag(SkStream*, uint32_t tag, uint32_t size, SkPicture::Insta
llPixelRefProc); |
194 bool parseBufferTag(SkReadBuffer&, uint32_t tag, uint32_t size); | 196 bool parseBufferTag(SkReadBuffer&, uint32_t tag, uint32_t size); |
(...skipping 25 matching lines...) Expand all Loading... |
220 | 222 |
221 const SkPictInfo fInfo; | 223 const SkPictInfo fInfo; |
222 | 224 |
223 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); | 225 static void WriteFactories(SkWStream* stream, const SkFactorySet& rec); |
224 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); | 226 static void WriteTypefaces(SkWStream* stream, const SkRefCntSet& rec); |
225 | 227 |
226 void initForPlayback() const; | 228 void initForPlayback() const; |
227 }; | 229 }; |
228 | 230 |
229 #endif | 231 #endif |
OLD | NEW |