| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 SkFlattenableSerialization_DEFINED | 8 #ifndef SkFlattenableSerialization_DEFINED |
| 9 #define SkFlattenableSerialization_DEFINED | 9 #define SkFlattenableSerialization_DEFINED |
| 10 | 10 |
| 11 #include "SkTypes.h" | 11 #include "SkTypes.h" |
| 12 | 12 |
| 13 class SkData; | 13 class SkData; |
| 14 class SkFlattenable; | 14 class SkFlattenable; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * These utility functions are used by the chromium codebase to safely | 17 * These utility functions are used by the chromium codebase to safely |
| 18 * serialize and deserialize SkFlattenable objects. These aren't made for | 18 * serialize and deserialize SkFlattenable objects. These aren't made for |
| 19 * optimal speed, but rather designed with security in mind in order to | 19 * optimal speed, but rather designed with security in mind in order to |
| 20 * prevent Skia from being an entry point for potential attacks. | 20 * prevent Skia from being an entry point for potential attacks. |
| 21 */ | 21 */ |
| 22 SK_API SkData* SkValidatingSerializeFlattenable(SkFlattenable*); | 22 SK_API SkData* SkValidatingSerializeFlattenable(SkFlattenable*); |
| 23 SK_API SkFlattenable* SkValidatingDeserializeFlattenable(const void* data, size_
t size); | 23 SK_API SkFlattenable* SkValidatingDeserializeFlattenable(const void* data, size_
t size); |
| 24 | 24 |
| 25 // Temporary fix for canary build |
| 26 #define SkSerializeFlattenable SkValidatingSerializeFlattenable |
| 27 #define SkDeserializeFlattenable SkValidatingDeserializeFlattenable |
| 28 |
| 25 #endif | 29 #endif |
| OLD | NEW |