| 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 #include "blimp/client/feature/compositor/client_image_serialization_processor.h
" | 5 #include "blimp/client/feature/compositor/client_image_serialization_processor.h
" |
| 6 | 6 |
| 7 #include <memory> |
| 8 |
| 9 #include "base/memory/ptr_util.h" |
| 10 #include "blimp/client/feature/compositor/blimp_client_picture_cache.h" |
| 7 #include "blimp/client/feature/compositor/blimp_image_decoder.h" | 11 #include "blimp/client/feature/compositor/blimp_image_decoder.h" |
| 8 #include "third_party/skia/include/core/SkPicture.h" | |
| 9 | 12 |
| 10 class SkPixelSerializer; | 13 class SkPixelSerializer; |
| 11 | 14 |
| 12 namespace blimp { | 15 namespace blimp { |
| 13 namespace client { | 16 namespace client { |
| 14 | 17 |
| 15 ClientImageSerializationProcessor::ClientImageSerializationProcessor() { | 18 ClientImageSerializationProcessor::ClientImageSerializationProcessor() {} |
| 16 pixel_deserializer_ = &BlimpImageDecoder; | |
| 17 } | |
| 18 | 19 |
| 19 ClientImageSerializationProcessor::~ClientImageSerializationProcessor() {} | 20 ClientImageSerializationProcessor::~ClientImageSerializationProcessor() {} |
| 20 | 21 |
| 21 SkPixelSerializer* ClientImageSerializationProcessor::GetPixelSerializer() { | 22 std::unique_ptr<cc::EnginePictureCache> |
| 23 ClientImageSerializationProcessor::CreateEnginePictureCache() { |
| 22 return nullptr; | 24 return nullptr; |
| 23 } | 25 } |
| 24 | 26 |
| 25 SkPicture::InstallPixelRefProc | 27 std::unique_ptr<cc::ClientPictureCache> |
| 26 ClientImageSerializationProcessor::GetPixelDeserializer() { | 28 ClientImageSerializationProcessor::CreateClientPictureCache() { |
| 27 return pixel_deserializer_; | 29 return base::WrapUnique(new BlimpClientPictureCache(&DecodeBlimpImage)); |
| 28 } | 30 } |
| 29 | 31 |
| 30 } // namespace client | 32 } // namespace client |
| 31 } // namespace blimp | 33 } // namespace blimp |
| OLD | NEW |