OLD | NEW |
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 #include "SkAtomics.h" | 8 #include "SkAtomics.h" |
9 #include "SkImageGenerator.h" | 9 #include "SkImageGenerator.h" |
10 #include "SkMessageBus.h" | 10 #include "SkMessageBus.h" |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 buffer.writeRect(info.fCullRect); | 212 buffer.writeRect(info.fCullRect); |
213 buffer.writeUInt(info.fFlags); | 213 buffer.writeUInt(info.fFlags); |
214 if (data) { | 214 if (data) { |
215 buffer.writeBool(true); | 215 buffer.writeBool(true); |
216 data->flatten(buffer); | 216 data->flatten(buffer); |
217 } else { | 217 } else { |
218 buffer.writeBool(false); | 218 buffer.writeBool(false); |
219 } | 219 } |
220 } | 220 } |
221 | 221 |
| 222 #ifdef SK_SUPPORT_LEGACY_PICTURE_GPUVETO |
222 bool SkPicture::suitableForGpuRasterization(GrContext*, const char** whyNot) con
st { | 223 bool SkPicture::suitableForGpuRasterization(GrContext*, const char** whyNot) con
st { |
223 if (this->numSlowPaths() > 5) { | 224 if (this->numSlowPaths() > 5) { |
224 if (whyNot) { *whyNot = "Too many slow paths (either concave or dashed).
"; } | 225 if (whyNot) { *whyNot = "Too many slow paths (either concave or dashed).
"; } |
225 return false; | 226 return false; |
226 } | 227 } |
227 return true; | 228 return true; |
228 } | 229 } |
| 230 #endif |
229 | 231 |
230 // Global setting to disable security precautions for serialization. | 232 // Global setting to disable security precautions for serialization. |
231 void SkPicture::SetPictureIOSecurityPrecautionsEnabled_Dangerous(bool set) { | 233 void SkPicture::SetPictureIOSecurityPrecautionsEnabled_Dangerous(bool set) { |
232 g_AllPictureIOSecurityPrecautionsEnabled = set; | 234 g_AllPictureIOSecurityPrecautionsEnabled = set; |
233 } | 235 } |
234 | 236 |
235 bool SkPicture::PictureIOSecurityPrecautionsEnabled() { | 237 bool SkPicture::PictureIOSecurityPrecautionsEnabled() { |
236 return g_AllPictureIOSecurityPrecautionsEnabled; | 238 return g_AllPictureIOSecurityPrecautionsEnabled; |
237 } | 239 } |
OLD | NEW |