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

Side by Side Diff: content/common/gpu/client/context_provider_command_buffer.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_
6 #define CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // Gives the GL internal format that should be used for calling CopyTexImage2D 64 // Gives the GL internal format that should be used for calling CopyTexImage2D
65 // on the default framebuffer. 65 // on the default framebuffer.
66 uint32_t GetCopyTextureInternalFormat(); 66 uint32_t GetCopyTextureInternalFormat();
67 67
68 // cc::ContextProvider implementation. 68 // cc::ContextProvider implementation.
69 bool BindToCurrentThread() override; 69 bool BindToCurrentThread() override;
70 void DetachFromThread() override; 70 void DetachFromThread() override;
71 gpu::gles2::GLES2Interface* ContextGL() override; 71 gpu::gles2::GLES2Interface* ContextGL() override;
72 gpu::ContextSupport* ContextSupport() override; 72 gpu::ContextSupport* ContextSupport() override;
73 class GrContext* GrContext() override; 73 class GrContext* GrContext() override;
74 cc::ContextCacheController* CacheController() override;
74 void InvalidateGrContext(uint32_t state) override; 75 void InvalidateGrContext(uint32_t state) override;
75 base::Lock* GetLock() override; 76 base::Lock* GetLock() override;
76 gpu::Capabilities ContextCapabilities() override; 77 gpu::Capabilities ContextCapabilities() override;
77 void DeleteCachedResources() override;
78 void SetLostContextCallback( 78 void SetLostContextCallback(
79 const LostContextCallback& lost_context_callback) override; 79 const LostContextCallback& lost_context_callback) override;
80 80
81 // Set the default task runner for command buffers to use for handling IPCs. 81 // Set the default task runner for command buffers to use for handling IPCs.
82 // If not specified, this will be the ThreadTaskRunner for the thread on 82 // If not specified, this will be the ThreadTaskRunner for the thread on
83 // which BindToThread is called. 83 // which BindToThread is called.
84 void SetDefaultTaskRunner( 84 void SetDefaultTaskRunner(
85 scoped_refptr<base::SingleThreadTaskRunner> default_task_runner); 85 scoped_refptr<base::SingleThreadTaskRunner> default_task_runner);
86 86
87 protected: 87 protected:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 scoped_refptr<gpu::GpuChannelHost> channel_; 121 scoped_refptr<gpu::GpuChannelHost> channel_;
122 scoped_refptr<base::SingleThreadTaskRunner> default_task_runner_; 122 scoped_refptr<base::SingleThreadTaskRunner> default_task_runner_;
123 123
124 base::Lock context_lock_; // Referenced by command_buffer_. 124 base::Lock context_lock_; // Referenced by command_buffer_.
125 std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_; 125 std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_;
126 std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; 126 std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
127 std::unique_ptr<gpu::TransferBuffer> transfer_buffer_; 127 std::unique_ptr<gpu::TransferBuffer> transfer_buffer_;
128 std::unique_ptr<gpu::gles2::GLES2Implementation> gles2_impl_; 128 std::unique_ptr<gpu::gles2::GLES2Implementation> gles2_impl_;
129 std::unique_ptr<gpu::gles2::GLES2TraceImplementation> trace_impl_; 129 std::unique_ptr<gpu::gles2::GLES2TraceImplementation> trace_impl_;
130 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_; 130 std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_;
131 std::unique_ptr<cc::ContextCacheController> cache_controller_;
131 132
132 LostContextCallback lost_context_callback_; 133 LostContextCallback lost_context_callback_;
133 }; 134 };
134 135
135 } // namespace content 136 } // namespace content
136 137
137 #endif // CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_ 138 #endif // CONTENT_COMMON_GPU_CLIENT_CONTEXT_PROVIDER_COMMAND_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698