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

Side by Side Diff: blimp/client/support/compositor/blimp_context_provider.h

Issue 2278283003: Refactor client visibility handling (Closed)
Patch Set: more fixes 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_CLIENT_SUPPORT_COMPOSITOR_BLIMP_CONTEXT_PROVIDER_H_ 5 #ifndef BLIMP_CLIENT_SUPPORT_COMPOSITOR_BLIMP_CONTEXT_PROVIDER_H_
6 #define BLIMP_CLIENT_SUPPORT_COMPOSITOR_BLIMP_CONTEXT_PROVIDER_H_ 6 #define BLIMP_CLIENT_SUPPORT_COMPOSITOR_BLIMP_CONTEXT_PROVIDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 19 matching lines...) Expand all
30 gfx::AcceleratedWidget widget, 30 gfx::AcceleratedWidget widget,
31 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager); 31 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager);
32 32
33 // cc::ContextProvider implementation. 33 // cc::ContextProvider implementation.
34 bool BindToCurrentThread() override; 34 bool BindToCurrentThread() override;
35 void DetachFromThread() override; 35 void DetachFromThread() override;
36 gpu::Capabilities ContextCapabilities() override; 36 gpu::Capabilities ContextCapabilities() override;
37 gpu::gles2::GLES2Interface* ContextGL() override; 37 gpu::gles2::GLES2Interface* ContextGL() override;
38 gpu::ContextSupport* ContextSupport() override; 38 gpu::ContextSupport* ContextSupport() override;
39 class GrContext* GrContext() override; 39 class GrContext* GrContext() override;
40 cc::ContextCacheController* CacheController() override;
40 void InvalidateGrContext(uint32_t state) override; 41 void InvalidateGrContext(uint32_t state) override;
41 base::Lock* GetLock() override; 42 base::Lock* GetLock() override;
42 void DeleteCachedResources() override;
43 void SetLostContextCallback( 43 void SetLostContextCallback(
44 const LostContextCallback& lost_context_callback) override; 44 const LostContextCallback& lost_context_callback) override;
45 45
46 protected: 46 protected:
47 BlimpContextProvider(gfx::AcceleratedWidget widget, 47 BlimpContextProvider(gfx::AcceleratedWidget widget,
48 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager); 48 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager);
49 ~BlimpContextProvider() override; 49 ~BlimpContextProvider() override;
50 50
51 private: 51 private:
52 void OnLostContext(); 52 void OnLostContext();
53 53
54 base::ThreadChecker main_thread_checker_; 54 base::ThreadChecker main_thread_checker_;
55 base::ThreadChecker context_thread_checker_; 55 base::ThreadChecker context_thread_checker_;
56 56
57 std::unique_ptr<gpu::GLInProcessContext> context_; 57 std::unique_ptr<gpu::GLInProcessContext> context_;
58 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; 58 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_;
59 std::unique_ptr<cc::ContextCacheController> cache_controller_;
59 60
60 LostContextCallback lost_context_callback_; 61 LostContextCallback lost_context_callback_;
61 62
62 DISALLOW_COPY_AND_ASSIGN(BlimpContextProvider); 63 DISALLOW_COPY_AND_ASSIGN(BlimpContextProvider);
63 }; 64 };
64 65
65 } // namespace client 66 } // namespace client
66 } // namespace blimp 67 } // namespace blimp
67 68
68 #endif // BLIMP_CLIENT_SUPPORT_COMPOSITOR_BLIMP_CONTEXT_PROVIDER_H_ 69 #endif // BLIMP_CLIENT_SUPPORT_COMPOSITOR_BLIMP_CONTEXT_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698