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

Side by Side Diff: mojo/services/gles2/gpu_impl.h

Issue 734273002: Cleanse mojo/services/gles2 of InterfaceImpl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Moar interface request Created 6 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 | « mojo/services/gles2/command_buffer_impl.cc ('k') | mojo/services/gles2/gpu_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "base/macros.h" 5 #include "base/macros.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "mojo/public/cpp/bindings/interface_impl.h"
8 #include "mojo/public/cpp/bindings/interface_request.h" 7 #include "mojo/public/cpp/bindings/interface_request.h"
8 #include "mojo/public/cpp/bindings/strong_binding.h"
9 #include "mojo/services/public/interfaces/geometry/geometry.mojom.h" 9 #include "mojo/services/public/interfaces/geometry/geometry.mojom.h"
10 #include "mojo/services/public/interfaces/gpu/command_buffer.mojom.h" 10 #include "mojo/services/public/interfaces/gpu/command_buffer.mojom.h"
11 #include "mojo/services/public/interfaces/gpu/gpu.mojom.h" 11 #include "mojo/services/public/interfaces/gpu/gpu.mojom.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class GLShareGroup; 14 class GLShareGroup;
15 } 15 }
16 16
17 namespace gpu { 17 namespace gpu {
18 namespace gles2 { 18 namespace gles2 {
19 class MailboxManager; 19 class MailboxManager;
20 } 20 }
21 } 21 }
22 22
23 namespace mojo { 23 namespace mojo {
24 24
25 class GpuImpl : public InterfaceImpl<Gpu> { 25 class GpuImpl : public Gpu {
26 public: 26 public:
27 GpuImpl(const scoped_refptr<gfx::GLShareGroup>& share_group, 27 GpuImpl(InterfaceRequest<Gpu> request,
28 const scoped_refptr<gfx::GLShareGroup>& share_group,
28 const scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager); 29 const scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager);
29 30
30 ~GpuImpl() override; 31 ~GpuImpl() override;
31 32
32 void CreateOnscreenGLES2Context( 33 void CreateOnscreenGLES2Context(
33 uint64_t native_viewport_id, 34 uint64_t native_viewport_id,
34 SizePtr size, 35 SizePtr size,
35 InterfaceRequest<CommandBuffer> command_buffer_request) override; 36 InterfaceRequest<CommandBuffer> command_buffer_request) override;
36 37
37 void CreateOffscreenGLES2Context( 38 void CreateOffscreenGLES2Context(
38 InterfaceRequest<CommandBuffer> command_buffer_request) override; 39 InterfaceRequest<CommandBuffer> command_buffer_request) override;
39 40
40 private: 41 private:
41 // We need to share these across all CommandBuffer instances so that contexts 42 // We need to share these across all CommandBuffer instances so that contexts
42 // they create can share resources with each other via mailboxes. 43 // they create can share resources with each other via mailboxes.
43 scoped_refptr<gfx::GLShareGroup> share_group_; 44 scoped_refptr<gfx::GLShareGroup> share_group_;
44 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; 45 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_;
45 46
47 StrongBinding<Gpu> binding_;
48
46 DISALLOW_COPY_AND_ASSIGN(GpuImpl); 49 DISALLOW_COPY_AND_ASSIGN(GpuImpl);
47 }; 50 };
48 51
49 } // namespace mojo 52 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/gles2/command_buffer_impl.cc ('k') | mojo/services/gles2/gpu_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698