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

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

Issue 1189833005: Revert of Support impl-side painting in Mandoline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/view_manager/gles2/command_buffer_impl.h" 5 #include "components/view_manager/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/view_manager/gles2/command_buffer_driver.h" 9 #include "components/view_manager/gles2/command_buffer_driver.h"
10 #include "components/view_manager/gles2/command_buffer_impl_observer.h" 10 #include "components/view_manager/gles2/command_buffer_impl_observer.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 driver_task_runner_->PostTask( 130 driver_task_runner_->PostTask(
131 FROM_HERE, base::Bind(&gpu::SyncPointManager::RetireSyncPoint, 131 FROM_HERE, base::Bind(&gpu::SyncPointManager::RetireSyncPoint,
132 sync_point_manager_, sync_point)); 132 sync_point_manager_, sync_point));
133 } 133 }
134 134
135 void CommandBufferImpl::Echo(const mojo::Callback<void()>& callback) { 135 void CommandBufferImpl::Echo(const mojo::Callback<void()>& callback) {
136 driver_task_runner_->PostTaskAndReply(FROM_HERE, base::Bind(&base::DoNothing), 136 driver_task_runner_->PostTaskAndReply(FROM_HERE, base::Bind(&base::DoNothing),
137 base::Bind(&RunCallback, callback)); 137 base::Bind(&RunCallback, callback));
138 } 138 }
139 139
140 void CommandBufferImpl::CreateImage(int32_t id,
141 mojo::ScopedHandle memory_handle,
142 int32 type,
143 mojo::SizePtr size,
144 int32_t format,
145 int32_t internal_format) {
146 driver_task_runner_->PostTask(
147 FROM_HERE, base::Bind(&CommandBufferDriver::CreateImage,
148 base::Unretained(driver_.get()), id,
149 base::Passed(&memory_handle), type,
150 base::Passed(&size), format, internal_format));
151 }
152
153 void CommandBufferImpl::DestroyImage(int32_t id) {
154 driver_task_runner_->PostTask(
155 FROM_HERE, base::Bind(&CommandBufferDriver::DestroyImage,
156 base::Unretained(driver_.get()), id));
157 }
158
159 CommandBufferImpl::~CommandBufferImpl() { 140 CommandBufferImpl::~CommandBufferImpl() {
160 if (observer_) 141 if (observer_)
161 observer_->OnCommandBufferImplDestroyed(); 142 observer_->OnCommandBufferImplDestroyed();
162 driver_task_runner_->PostTask( 143 driver_task_runner_->PostTask(
163 FROM_HERE, base::Bind(&DestroyDriver, base::Passed(&driver_))); 144 FROM_HERE, base::Bind(&DestroyDriver, base::Passed(&driver_)));
164 } 145 }
165 146
166 void CommandBufferImpl::BindToRequest( 147 void CommandBufferImpl::BindToRequest(
167 mojo::InterfaceRequest<mojo::CommandBuffer> request) { 148 mojo::InterfaceRequest<mojo::CommandBuffer> request) {
168 binding_.Bind(request.Pass()); 149 binding_.Bind(request.Pass());
(...skipping 13 matching lines...) Expand all
182 163
183 void CommandBufferImpl::UpdateVSyncParameters(base::TimeTicks timebase, 164 void CommandBufferImpl::UpdateVSyncParameters(base::TimeTicks timebase,
184 base::TimeDelta interval) { 165 base::TimeDelta interval) {
185 if (!viewport_parameter_listener_) 166 if (!viewport_parameter_listener_)
186 return; 167 return;
187 viewport_parameter_listener_->OnVSyncParametersUpdated( 168 viewport_parameter_listener_->OnVSyncParametersUpdated(
188 timebase.ToInternalValue(), interval.ToInternalValue()); 169 timebase.ToInternalValue(), interval.ToInternalValue());
189 } 170 }
190 171
191 } // namespace gles2 172 } // namespace gles2
OLDNEW
« no previous file with comments | « components/view_manager/gles2/command_buffer_impl.h ('k') | components/view_manager/gles2/mojo_gpu_memory_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698