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

Side by Side Diff: components/mus/gles2/command_buffer_impl.cc

Issue 1346113003: Mandoline: WebGL: Pass context creation attributes to GPU. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 3 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
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 "components/mus/gles2/command_buffer_impl.h" 5 #include "components/mus/gles2/command_buffer_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "components/mus/gles2/command_buffer_driver.h" 9 #include "components/mus/gles2/command_buffer_driver.h"
10 #include "components/mus/gles2/command_buffer_impl_observer.h" 10 #include "components/mus/gles2/command_buffer_impl_observer.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 gpu_state_->control_task_runner()->PostTask( 47 gpu_state_->control_task_runner()->PostTask(
48 FROM_HERE, 48 FROM_HERE,
49 base::Bind(&CommandBufferImpl::BindToRequest, 49 base::Bind(&CommandBufferImpl::BindToRequest,
50 weak_ptr_factory_.GetWeakPtr(), base::Passed(&request))); 50 weak_ptr_factory_.GetWeakPtr(), base::Passed(&request)));
51 } 51 }
52 52
53 void CommandBufferImpl::Initialize( 53 void CommandBufferImpl::Initialize(
54 mojo::CommandBufferSyncClientPtr sync_client, 54 mojo::CommandBufferSyncClientPtr sync_client,
55 mojo::CommandBufferSyncPointClientPtr sync_point_client, 55 mojo::CommandBufferSyncPointClientPtr sync_point_client,
56 mojo::CommandBufferLostContextObserverPtr loss_observer, 56 mojo::CommandBufferLostContextObserverPtr loss_observer,
57 mojo::ScopedSharedBufferHandle shared_state) { 57 mojo::ScopedSharedBufferHandle shared_state,
58 mojo::Array<int32_t> attribs) {
58 sync_point_client_ = sync_point_client.Pass(); 59 sync_point_client_ = sync_point_client.Pass();
59 driver_task_runner_->PostTask( 60 driver_task_runner_->PostTask(
60 FROM_HERE, 61 FROM_HERE,
61 base::Bind(&CommandBufferDriver::Initialize, 62 base::Bind(&CommandBufferDriver::Initialize,
62 base::Unretained(driver_.get()), base::Passed(&sync_client), 63 base::Unretained(driver_.get()), base::Passed(&sync_client),
63 base::Passed(&loss_observer), base::Passed(&shared_state))); 64 base::Passed(&loss_observer), base::Passed(&shared_state),
65 base::Passed(&attribs)));
64 } 66 }
65 67
66 void CommandBufferImpl::SetGetBuffer(int32_t buffer) { 68 void CommandBufferImpl::SetGetBuffer(int32_t buffer) {
67 driver_task_runner_->PostTask( 69 driver_task_runner_->PostTask(
68 FROM_HERE, base::Bind(&CommandBufferDriver::SetGetBuffer, 70 FROM_HERE, base::Bind(&CommandBufferDriver::SetGetBuffer,
69 base::Unretained(driver_.get()), buffer)); 71 base::Unretained(driver_.get()), buffer));
70 } 72 }
71 73
72 void CommandBufferImpl::Flush(int32_t put_offset) { 74 void CommandBufferImpl::Flush(int32_t put_offset) {
73 driver_task_runner_->PostTask( 75 driver_task_runner_->PostTask(
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Objects we own (such as CommandBufferDriver) need to be destroyed on the 163 // Objects we own (such as CommandBufferDriver) need to be destroyed on the
162 // thread we were created on. 164 // thread we were created on.
163 driver_task_runner_->DeleteSoon(FROM_HERE, this); 165 driver_task_runner_->DeleteSoon(FROM_HERE, this);
164 } 166 }
165 167
166 void CommandBufferImpl::DidLoseContext() { 168 void CommandBufferImpl::DidLoseContext() {
167 OnConnectionError(); 169 OnConnectionError();
168 } 170 }
169 171
170 } // namespace gles2 172 } // namespace gles2
OLDNEW
« no previous file with comments | « components/mus/gles2/command_buffer_impl.h ('k') | components/mus/public/interfaces/command_buffer.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698