| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BLIMP_ENGINE_RENDERER_ENGINE_IMAGE_SERIALIZATION_PROCESSOR_H_ | 5 #ifndef BLIMP_ENGINE_RENDERER_ENGINE_IMAGE_SERIALIZATION_PROCESSOR_H_ |
| 6 #define BLIMP_ENGINE_RENDERER_ENGINE_IMAGE_SERIALIZATION_PROCESSOR_H_ | 6 #define BLIMP_ENGINE_RENDERER_ENGINE_IMAGE_SERIALIZATION_PROCESSOR_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "blimp/common/blimp_common_export.h" | 11 #include "blimp/common/blimp_common_export.h" |
| 11 #include "blimp/engine/mojo/blob_channel.mojom.h" | 12 #include "blimp/engine/mojo/blob_channel.mojom.h" |
| 12 #include "cc/proto/image_serialization_processor.h" | 13 #include "cc/proto/image_serialization_processor.h" |
| 13 #include "third_party/skia/include/core/SkPicture.h" | 14 #include "third_party/skia/include/core/SkPicture.h" |
| 14 | 15 |
| 15 class SkPixelSerializer; | 16 class SkPixelSerializer; |
| 16 | 17 |
| 17 namespace content { | 18 namespace content { |
| 18 class RenderFrame; | 19 class RenderFrame; |
| 19 } // class content | 20 } // class content |
| 20 | 21 |
| 21 namespace blimp { | 22 namespace blimp { |
| 22 namespace engine { | 23 namespace engine { |
| 23 | 24 |
| 24 // EngineImageSerializationProcessor provides functionality to serialize and | 25 // EngineImageSerializationProcessor provides functionality to serialize and |
| 25 // deserialize Skia images. | 26 // deserialize Skia images. |
| 26 class BLIMP_COMMON_EXPORT EngineImageSerializationProcessor | 27 class BLIMP_COMMON_EXPORT EngineImageSerializationProcessor |
| 27 : public cc::ImageSerializationProcessor { | 28 : public cc::ImageSerializationProcessor { |
| 28 public: | 29 public: |
| 29 explicit EngineImageSerializationProcessor( | 30 explicit EngineImageSerializationProcessor( |
| 30 mojom::BlobChannelPtr blob_channel); | 31 mojom::BlobChannelPtr blob_channel); |
| 31 ~EngineImageSerializationProcessor(); | 32 ~EngineImageSerializationProcessor(); |
| 32 | 33 |
| 33 // cc::ImageSerializationProcessor implementation. | 34 // cc::ImageSerializationProcessor implementation. |
| 34 SkPixelSerializer* GetPixelSerializer() override; | 35 SkPixelSerializer* GetPixelSerializer() override; |
| 35 SkPicture::InstallPixelRefProc GetPixelDeserializer() override; | 36 SkPicture::InstallPixelRefProc GetPixelDeserializer() override; |
| 36 | 37 |
| 37 private: | 38 private: |
| 38 scoped_ptr<SkPixelSerializer> pixel_serializer_; | 39 std::unique_ptr<SkPixelSerializer> pixel_serializer_; |
| 39 mojom::BlobChannelPtr blob_channel_; | 40 mojom::BlobChannelPtr blob_channel_; |
| 40 | 41 |
| 41 DISALLOW_COPY_AND_ASSIGN(EngineImageSerializationProcessor); | 42 DISALLOW_COPY_AND_ASSIGN(EngineImageSerializationProcessor); |
| 42 }; | 43 }; |
| 43 | 44 |
| 44 } // namespace engine | 45 } // namespace engine |
| 45 } // namespace blimp | 46 } // namespace blimp |
| 46 | 47 |
| 47 #endif // BLIMP_ENGINE_RENDERER_ENGINE_IMAGE_SERIALIZATION_PROCESSOR_H_ | 48 #endif // BLIMP_ENGINE_RENDERER_ENGINE_IMAGE_SERIALIZATION_PROCESSOR_H_ |
| OLD | NEW |