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

Side by Side Diff: mojo/gles2/command_buffer_client_impl.cc

Issue 272323003: Mojo: Implement support for |Foo&| mojom syntax (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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
« no previous file with comments | « mojo/examples/sample_app/sample_app.cc ('k') | mojo/mojo_public.gypi » ('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/gles2/command_buffer_client_impl.h" 5 #include "mojo/gles2/command_buffer_client_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/process/process_handle.h" 10 #include "base/process/process_handle.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 CommandBufferDelegate::~CommandBufferDelegate() {} 44 CommandBufferDelegate::~CommandBufferDelegate() {}
45 45
46 void CommandBufferDelegate::ContextLost() {} 46 void CommandBufferDelegate::ContextLost() {}
47 void CommandBufferDelegate::DrawAnimationFrame() {} 47 void CommandBufferDelegate::DrawAnimationFrame() {}
48 48
49 CommandBufferClientImpl::CommandBufferClientImpl( 49 CommandBufferClientImpl::CommandBufferClientImpl(
50 CommandBufferDelegate* delegate, 50 CommandBufferDelegate* delegate,
51 MojoAsyncWaiter* async_waiter, 51 MojoAsyncWaiter* async_waiter,
52 ScopedMessagePipeHandle command_buffer_handle) 52 ScopedMessagePipeHandle command_buffer_handle)
53 : delegate_(delegate), 53 : delegate_(delegate),
54 command_buffer_(MakeProxy<mojo::CommandBuffer>(
55 command_buffer_handle.Pass(), async_waiter)),
56 shared_state_(NULL), 54 shared_state_(NULL),
57 last_put_offset_(-1), 55 last_put_offset_(-1),
58 next_transfer_buffer_id_(0), 56 next_transfer_buffer_id_(0),
59 initialize_result_(false), 57 initialize_result_(false),
60 async_waiter_(async_waiter) { 58 async_waiter_(async_waiter) {
59 command_buffer_.Bind(command_buffer_handle.Pass(), async_waiter);
61 command_buffer_.set_error_handler(this); 60 command_buffer_.set_error_handler(this);
62 command_buffer_.set_client(this); 61 command_buffer_.set_client(this);
63 } 62 }
64 63
65 CommandBufferClientImpl::~CommandBufferClientImpl() {} 64 CommandBufferClientImpl::~CommandBufferClientImpl() {}
66 65
67 bool CommandBufferClientImpl::Initialize() { 66 bool CommandBufferClientImpl::Initialize() {
68 const size_t kSharedStateSize = sizeof(gpu::CommandBufferSharedState); 67 const size_t kSharedStateSize = sizeof(gpu::CommandBufferSharedState);
69 void* memory = NULL; 68 void* memory = NULL;
70 mojo::ScopedSharedBufferHandle duped; 69 mojo::ScopedSharedBufferHandle duped;
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 return; 266 return;
268 } 267 }
269 } 268 }
270 269
271 void CommandBufferClientImpl::DrawAnimationFrame() { 270 void CommandBufferClientImpl::DrawAnimationFrame() {
272 delegate_->DrawAnimationFrame(); 271 delegate_->DrawAnimationFrame();
273 } 272 }
274 273
275 } // namespace gles2 274 } // namespace gles2
276 } // namespace mojo 275 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/examples/sample_app/sample_app.cc ('k') | mojo/mojo_public.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698