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

Side by Side Diff: gpu/ipc/gpu_in_process_thread_service.h

Issue 2498053004: Add InProcessContextProvider and update InProcessCommandBuffer (Closed)
Patch Set: Revert experiments and fix android_webview Created 4 years, 1 month 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
« no previous file with comments | « gpu/ipc/gl_in_process_context.cc ('k') | gpu/ipc/gpu_in_process_thread_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef GPU_IPC_GPU_IN_PROCESS_THREAD_SERVICE_H_
6 #define GPU_IPC_GPU_IN_PROCESS_THREAD_SERVICE_H_
7
8 #include "gpu/command_buffer/service/mailbox_manager.h"
9 #include "gpu/ipc/in_process_command_buffer.h"
10 #include "ui/gl/gl_share_group.h"
11
12 namespace gpu {
13
14 // Default Service class when a null service is used.
15 class GpuInProcessThreadService
16 : public gpu::InProcessCommandBuffer::Service,
17 public base::RefCountedThreadSafe<GpuInProcessThreadService> {
18 public:
19 GpuInProcessThreadService(
20 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
21 gpu::SyncPointManager* sync_point_manager,
22 gpu::gles2::MailboxManager* mailbox_manager,
23 scoped_refptr<gl::GLShareGroup> share_group);
24
25 // gpu::InProcessCommandBuffer::Service implementation.
26 void ScheduleTask(const base::Closure& task) override;
27 void ScheduleDelayedWork(const base::Closure& task) override;
28 bool UseVirtualizedGLContexts() override;
29 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache()
30 override;
31 scoped_refptr<gpu::gles2::FramebufferCompletenessCache>
32 framebuffer_completeness_cache() override;
33 gpu::SyncPointManager* sync_point_manager() override;
34 void AddRef() const override;
35 void Release() const override;
36 bool BlockThreadOnWaitSyncToken() const override;
37
38 private:
39 friend class base::RefCountedThreadSafe<GpuInProcessThreadService>;
40
41 ~GpuInProcessThreadService() override;
42
43 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
44
45 gpu::SyncPointManager* sync_point_manager_; // Non-owning.
46 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_;
47 scoped_refptr<gpu::gles2::FramebufferCompletenessCache>
48 framebuffer_completeness_cache_;
49
50 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThreadService);
51 };
52
53 } // namespace gpu
54
55 #endif // GPU_IPC_GPU_IN_PROCESS_THREAD_SERVICE_H_
OLDNEW
« no previous file with comments | « gpu/ipc/gl_in_process_context.cc ('k') | gpu/ipc/gpu_in_process_thread_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698