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

Side by Side Diff: cc/test/fake_image_serialization_processor.h

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 #ifndef CC_TEST_FAKE_IMAGE_SERIALIZATION_PROCESSOR_H_ 5 #ifndef CC_TEST_FAKE_IMAGE_SERIALIZATION_PROCESSOR_H_
6 #define CC_TEST_FAKE_IMAGE_SERIALIZATION_PROCESSOR_H_ 6 #define CC_TEST_FAKE_IMAGE_SERIALIZATION_PROCESSOR_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h"
9 #include "cc/proto/image_serialization_processor.h" 10 #include "cc/proto/image_serialization_processor.h"
11 #include "cc/proto/picture_cache.h"
12 #include "cc/test/fake_picture_cache.h"
10 13
11 class SkPixelSerializer; 14 class SkPixelSerializer;
12 15
13 namespace cc { 16 namespace cc {
14 17
15 class FakeImageSerializationProcessor : public ImageSerializationProcessor { 18 class FakeImageSerializationProcessor : public ImageSerializationProcessor {
16 public: 19 public:
17 FakeImageSerializationProcessor(); 20 FakeImageSerializationProcessor();
18 ~FakeImageSerializationProcessor(); 21 ~FakeImageSerializationProcessor();
19 22
20 // ImageSerializationProcessor implementation. 23 // ImageSerializationProcessor implementation.
21 SkPixelSerializer* GetPixelSerializer() override; 24 std::unique_ptr<EnginePictureCache> CreateEnginePictureCache() override;
22 SkPicture::InstallPixelRefProc GetPixelDeserializer() override; 25 std::unique_ptr<ClientPictureCache> CreateClientPictureCache() override;
23 26
24 private: 27 private:
28 // A PictureCacheModel shared between both the engine and client cache.
29 std::unique_ptr<FakePictureCacheModel> picture_cache_model_;
30
25 DISALLOW_COPY_AND_ASSIGN(FakeImageSerializationProcessor); 31 DISALLOW_COPY_AND_ASSIGN(FakeImageSerializationProcessor);
26 }; 32 };
27 33
28 } // namespace cc 34 } // namespace cc
29 35
30 #endif // CC_TEST_FAKE_IMAGE_SERIALIZATION_PROCESSOR_H_ 36 #endif // CC_TEST_FAKE_IMAGE_SERIALIZATION_PROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698