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

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

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/gpu_impl.h ('k') | mojo/services/native_viewport/main.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 "mojo/services/gles2/gpu_impl.h" 5 #include "mojo/services/gles2/gpu_impl.h"
6 6
7 #include "gpu/command_buffer/service/mailbox_manager.h" 7 #include "gpu/command_buffer/service/mailbox_manager.h"
8 #include "mojo/converters/geometry/geometry_type_converters.h" 8 #include "mojo/converters/geometry/geometry_type_converters.h"
9 #include "mojo/services/gles2/command_buffer_impl.h" 9 #include "mojo/services/gles2/command_buffer_impl.h"
10 #include "ui/gl/gl_share_group.h" 10 #include "ui/gl/gl_share_group.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 13
14 GpuImpl::GpuImpl( 14 GpuImpl::GpuImpl(
15 InterfaceRequest<Gpu> request,
15 const scoped_refptr<gfx::GLShareGroup>& share_group, 16 const scoped_refptr<gfx::GLShareGroup>& share_group,
16 const scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager) 17 const scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager)
17 : share_group_(share_group), mailbox_manager_(mailbox_manager) { 18 : share_group_(share_group),
19 mailbox_manager_(mailbox_manager),
20 binding_(this, request.Pass()) {
18 } 21 }
19 22
20 GpuImpl::~GpuImpl() { 23 GpuImpl::~GpuImpl() {
21 } 24 }
22 25
23 void GpuImpl::CreateOnscreenGLES2Context( 26 void GpuImpl::CreateOnscreenGLES2Context(
24 uint64_t native_viewport_id, 27 uint64_t native_viewport_id,
25 SizePtr size, 28 SizePtr size,
26 InterfaceRequest<CommandBuffer> command_buffer_request) { 29 InterfaceRequest<CommandBuffer> request) {
27 gfx::AcceleratedWidget widget = bit_cast<gfx::AcceleratedWidget>( 30 gfx::AcceleratedWidget widget = bit_cast<gfx::AcceleratedWidget>(
28 static_cast<uintptr_t>(native_viewport_id)); 31 static_cast<uintptr_t>(native_viewport_id));
29 BindToRequest(new CommandBufferImpl(widget, 32 new CommandBufferImpl(request.Pass(), widget, size.To<gfx::Size>(),
30 size.To<gfx::Size>(), 33 share_group_.get(), mailbox_manager_.get());
31 share_group_.get(),
32 mailbox_manager_.get()),
33 &command_buffer_request);
34 } 34 }
35 35
36 void GpuImpl::CreateOffscreenGLES2Context( 36 void GpuImpl::CreateOffscreenGLES2Context(
37 InterfaceRequest<CommandBuffer> command_buffer_request) { 37 InterfaceRequest<CommandBuffer> request) {
38 BindToRequest( 38 new CommandBufferImpl(request.Pass(), share_group_.get(),
39 new CommandBufferImpl(share_group_.get(), mailbox_manager_.get()), 39 mailbox_manager_.get());
40 &command_buffer_request);
41 } 40 }
42 41
43 } // namespace mojo 42 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/gles2/gpu_impl.h ('k') | mojo/services/native_viewport/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698