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

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

Issue 1348363003: content/gpu: Simplify stub scheduling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gpu_channel_stream
Patch Set: fix android compile error sigh 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
« no previous file with comments | « components/mus/gles2/command_buffer_driver.cc ('k') | content/common/gpu/gpu_channel.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_local.h" 5 #include "components/mus/gles2/command_buffer_local.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "components/mus/gles2/command_buffer_local_client.h" 8 #include "components/mus/gles2/command_buffer_local_client.h"
9 #include "components/mus/gles2/gpu_memory_tracker.h" 9 #include "components/mus/gles2/gpu_memory_tracker.h"
10 #include "components/mus/gles2/mojo_gpu_memory_buffer.h" 10 #include "components/mus/gles2/mojo_gpu_memory_buffer.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 bool CommandBufferLocal::OnWaitSyncPoint(uint32_t sync_point) { 244 bool CommandBufferLocal::OnWaitSyncPoint(uint32_t sync_point) {
245 if (!sync_point) 245 if (!sync_point)
246 return true; 246 return true;
247 if (gpu_state_->sync_point_manager()->IsSyncPointRetired(sync_point)) 247 if (gpu_state_->sync_point_manager()->IsSyncPointRetired(sync_point))
248 return true; 248 return true;
249 scheduler_->SetScheduled(false); 249 scheduler_->SetScheduled(false);
250 gpu_state_->sync_point_manager()->AddSyncPointCallback( 250 gpu_state_->sync_point_manager()->AddSyncPointCallback(
251 sync_point, base::Bind(&CommandBufferLocal::OnSyncPointRetired, 251 sync_point, base::Bind(&CommandBufferLocal::OnSyncPointRetired,
252 weak_factory_.GetWeakPtr())); 252 weak_factory_.GetWeakPtr()));
253 return scheduler_->IsScheduled(); 253 return scheduler_->scheduled();
254 } 254 }
255 255
256 void CommandBufferLocal::OnParseError() { 256 void CommandBufferLocal::OnParseError() {
257 gpu::CommandBuffer::State state = command_buffer_->GetLastState(); 257 gpu::CommandBuffer::State state = command_buffer_->GetLastState();
258 OnContextLost(state.context_lost_reason); 258 OnContextLost(state.context_lost_reason);
259 } 259 }
260 260
261 void CommandBufferLocal::OnContextLost(uint32_t reason) { 261 void CommandBufferLocal::OnContextLost(uint32_t reason) {
262 if (client_) 262 if (client_)
263 client_->DidLoseContext(); 263 client_->DidLoseContext();
264 } 264 }
265 265
266 void CommandBufferLocal::OnSyncPointRetired() { 266 void CommandBufferLocal::OnSyncPointRetired() {
267 scheduler_->SetScheduled(true); 267 scheduler_->SetScheduled(true);
268 } 268 }
269 269
270 } // namespace mus 270 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/gles2/command_buffer_driver.cc ('k') | content/common/gpu/gpu_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698