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

Side by Side Diff: cc/surfaces/deferred_gpu_command_service.h

Issue 2498053004: Add InProcessContextProvider and update InProcessCommandBuffer (Closed)
Patch Set: 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
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 CC_SURFACES_DEFERRED_GPU_COMMAND_SERVICE_H_
6 #define CC_SURFACES_DEFERRED_GPU_COMMAND_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 cc {
13
14 class DeferredGpuCommandService
piman 2016/11/15 21:57:32 nit: names... nothing "deferred" about this really
Fady Samuel 2016/11/16 00:33:35 Done.
15 : public gpu::InProcessCommandBuffer::Service,
16 public base::RefCountedThreadSafe<DeferredGpuCommandService> {
17 public:
18 DeferredGpuCommandService(gpu::SyncPointManager* sync_point_manager,
19 gpu::gles2::MailboxManager* mailbox_manager,
20 scoped_refptr<gl::GLShareGroup> share_group);
21
22 // gpu::InProcessCommandBuffer::Service implementation.
23 void ScheduleTask(const base::Closure& task) override;
24 void ScheduleDelayedWork(const base::Closure& task) override;
25 bool UseVirtualizedGLContexts() override;
26 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache()
27 override;
28 scoped_refptr<gpu::gles2::FramebufferCompletenessCache>
29 framebuffer_completeness_cache() override;
30 gpu::SyncPointManager* sync_point_manager() override;
31 void AddRef() const override;
32 void Release() const override;
33 const scoped_refptr<gl::GLShareGroup>& GetShareGroup() const override;
34 bool BlockThreadOnWaitSyncToken() const override;
35
36 private:
37 friend class base::RefCountedThreadSafe<DeferredGpuCommandService>;
38
39 ~DeferredGpuCommandService() override;
40
41 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
42
43 base::Lock tasks_lock_;
44 std::queue<base::Closure> tasks_;
piman 2016/11/15 21:57:32 nit: those aren't used.
Fady Samuel 2016/11/16 00:33:35 Done.
45
46 gpu::SyncPointManager* sync_point_manager_;
47 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_;
48 scoped_refptr<gpu::gles2::FramebufferCompletenessCache>
49 framebuffer_completeness_cache_;
50 scoped_refptr<gl::GLShareGroup> share_group_;
51
52 DISALLOW_COPY_AND_ASSIGN(DeferredGpuCommandService);
53 };
54
55 } // namespace cc
56
57 #endif // CC_SURFACES_DEFERRED_GPU_COMMAND_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698