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

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

Issue 2278283003: Refactor client visibility handling (Closed)
Patch Set: fix compositor_unittests Created 4 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ 5 #ifndef CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_
6 #define CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ 6 #define CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 23 matching lines...) Expand all
34 34
35 class TestInProcessContextProvider : public ContextProvider { 35 class TestInProcessContextProvider : public ContextProvider {
36 public: 36 public:
37 explicit TestInProcessContextProvider( 37 explicit TestInProcessContextProvider(
38 TestInProcessContextProvider* shared_context); 38 TestInProcessContextProvider* shared_context);
39 39
40 bool BindToCurrentThread() override; 40 bool BindToCurrentThread() override;
41 gpu::gles2::GLES2Interface* ContextGL() override; 41 gpu::gles2::GLES2Interface* ContextGL() override;
42 gpu::ContextSupport* ContextSupport() override; 42 gpu::ContextSupport* ContextSupport() override;
43 class GrContext* GrContext() override; 43 class GrContext* GrContext() override;
44 ContextCacheController* CacheController() override;
44 void InvalidateGrContext(uint32_t state) override; 45 void InvalidateGrContext(uint32_t state) override;
45 base::Lock* GetLock() override; 46 base::Lock* GetLock() override;
46 gpu::Capabilities ContextCapabilities() override; 47 gpu::Capabilities ContextCapabilities() override;
47 void DeleteCachedResources() override;
48 void SetLostContextCallback( 48 void SetLostContextCallback(
49 const LostContextCallback& lost_context_callback) override; 49 const LostContextCallback& lost_context_callback) override;
50 50
51 protected: 51 protected:
52 friend class base::RefCountedThreadSafe<TestInProcessContextProvider>; 52 friend class base::RefCountedThreadSafe<TestInProcessContextProvider>;
53 ~TestInProcessContextProvider() override; 53 ~TestInProcessContextProvider() override;
54 54
55 private: 55 private:
56 TestGpuMemoryBufferManager gpu_memory_buffer_manager_; 56 TestGpuMemoryBufferManager gpu_memory_buffer_manager_;
57 TestImageFactory image_factory_; 57 TestImageFactory image_factory_;
58 std::unique_ptr<gpu::GLInProcessContext> context_; 58 std::unique_ptr<gpu::GLInProcessContext> context_;
59 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; 59 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_;
60 std::unique_ptr<ContextCacheController> cache_controller_;
60 base::Lock context_lock_; 61 base::Lock context_lock_;
61 }; 62 };
62 63
63 } // namespace cc 64 } // namespace cc
64 65
65 #endif // CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_ 66 #endif // CC_TEST_TEST_IN_PROCESS_CONTEXT_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698