diff options
author | nyquist <nyquist@chromium.org> | 2016-02-11 16:15:04 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-12 00:16:29 +0000 |
commit | 16febb404edc59fb8dbb13a13c68ccecfb5a0bf1 (patch) | |
tree | 882135af7b509fdc7ccebb66193039c421871711 /cc/proto | |
parent | 23258d3c881e5c053f7bb687a13f860ea55364ef (diff) | |
download | chromium_src-16febb404edc59fb8dbb13a13c68ccecfb5a0bf1.zip chromium_src-16febb404edc59fb8dbb13a13c68ccecfb5a0bf1.tar.gz chromium_src-16febb404edc59fb8dbb13a13c68ccecfb5a0bf1.tar.bz2 |
Add framework for (de)serialization of images in SkPicture
This CL adds Plumbing for picture serialization and deserialization
from //blimp to DrawingDisplayItem.
BUG=577262
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1675763002
Cr-Commit-Position: refs/heads/master@{#375053}
Diffstat (limited to 'cc/proto')
-rw-r--r-- | cc/proto/image_serialization_processor.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cc/proto/image_serialization_processor.h b/cc/proto/image_serialization_processor.h new file mode 100644 index 0000000..75b9936 --- /dev/null +++ b/cc/proto/image_serialization_processor.h @@ -0,0 +1,30 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CC_PROTO_IMAGE_SERIALIZATION_PROCESSOR_H_ +#define CC_PROTO_IMAGE_SERIALIZATION_PROCESSOR_H_ + +#include "third_party/skia/include/core/SkPicture.h" +#include "third_party/skia/include/core/SkPixelSerializer.h" + +class SkPixelSerializer; + +namespace cc { + +// ImageSerializationProcessor provides functionality to serialize and +// deserialize Skia images. +class ImageSerializationProcessor { + public: + // The serializer returned from this function can be used to pass in to + // SkPicture::serialize(...) for serializing the SkPicture to a stream. + virtual SkPixelSerializer* GetPixelSerializer() = 0; + + // Returns a function pointer valid to use for deserializing images when using + // SkPicture::CreateFromStream to create an SkPicture from a stream. + virtual SkPicture::InstallPixelRefProc GetPixelDeserializer() = 0; +}; + +} // namespace cc + +#endif // CC_PROTO_IMAGE_SERIALIZATION_PROCESSOR_H_ |