Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: blimp/client/feature/compositor/client_image_serialization_processor.cc

Issue 1982893002: [blimp] Add SkPicture caching support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git merge origin/master Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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(&BlimpImageDecoder));
vmpstr 2016/06/01 00:10:56 BlimpImageDecoder is a function? If so, it should
nyquist 2016/06/04 00:24:57 Done.
28 } 30 }
29 31
30 } // namespace client 32 } // namespace client
31 } // namespace blimp 33 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698