| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CC_PROTO_IMAGE_SERIALIZATION_PROCESSOR_H_ | |
| 6 #define CC_PROTO_IMAGE_SERIALIZATION_PROCESSOR_H_ | |
| 7 | |
| 8 #include "third_party/skia/include/core/SkPicture.h" | |
| 9 | |
| 10 class SkPixelSerializer; | |
| 11 | |
| 12 namespace cc { | |
| 13 | |
| 14 // ImageSerializationProcessor provides functionality to serialize and | |
| 15 // deserialize Skia images. | |
| 16 class ImageSerializationProcessor { | |
| 17 public: | |
| 18 // The serializer returned from this function can be used to pass in to | |
| 19 // SkPicture::serialize(...) for serializing the SkPicture to a stream. | |
| 20 virtual SkPixelSerializer* GetPixelSerializer() = 0; | |
| 21 | |
| 22 // Returns a function pointer valid to use for deserializing images when using | |
| 23 // SkPicture::CreateFromStream to create an SkPicture from a stream. | |
| 24 virtual SkPicture::InstallPixelRefProc GetPixelDeserializer() = 0; | |
| 25 }; | |
| 26 | |
| 27 } // namespace cc | |
| 28 | |
| 29 #endif // CC_PROTO_IMAGE_SERIALIZATION_PROCESSOR_H_ | |
| OLD | NEW |