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

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

Issue 480723002: Revert of Mojo multiple command buffer support and sample (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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 #include "mojo/services/native_viewport/gpu_impl.h"
6
7 #include "gpu/command_buffer/service/mailbox_manager.h"
8 #include "mojo/services/gles2/command_buffer_impl.h"
9 #include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
10 #include "ui/gl/gl_share_group.h"
11
12 namespace mojo {
13
14 GpuImpl::GpuImpl(
15 const scoped_refptr<gfx::GLShareGroup>& share_group,
16 const scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager)
17 : share_group_(share_group), mailbox_manager_(mailbox_manager) {
18 }
19
20 GpuImpl::~GpuImpl() {
21 }
22
23 void GpuImpl::CreateOnscreenGLES2Context(
24 uint64_t native_viewport_id,
25 SizePtr size,
26 InterfaceRequest<CommandBuffer> command_buffer_request) {
27 BindToRequest(new CommandBufferImpl(reinterpret_cast<gfx::AcceleratedWidget>(
28 native_viewport_id),
29 size.To<gfx::Size>(),
30 share_group_.get(),
31 mailbox_manager_.get()),
32 &command_buffer_request);
33 }
34
35 void GpuImpl::CreateOffscreenGLES2Context(
36 InterfaceRequest<CommandBuffer> command_buffer_request) {
37 BindToRequest(
38 new CommandBufferImpl(share_group_.get(), mailbox_manager_.get()),
39 &command_buffer_request);
40 }
41
42 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/native_viewport/gpu_impl.h ('k') | mojo/services/native_viewport/native_viewport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698