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

Side by Side Diff: gpu/command_buffer/service/gpu_scheduler.cc

Issue 253943002: Remove CommandBuffer::GetState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: I forgot Poland^Wmojo Created 6 years, 7 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "gpu/command_buffer/service/gpu_scheduler.h" 5 #include "gpu/command_buffer/service/gpu_scheduler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 29 matching lines...) Expand all
40 was_preempted_(false) {} 40 was_preempted_(false) {}
41 41
42 GpuScheduler::~GpuScheduler() { 42 GpuScheduler::~GpuScheduler() {
43 } 43 }
44 44
45 void GpuScheduler::PutChanged() { 45 void GpuScheduler::PutChanged() {
46 TRACE_EVENT1( 46 TRACE_EVENT1(
47 "gpu", "GpuScheduler:PutChanged", 47 "gpu", "GpuScheduler:PutChanged",
48 "decoder", decoder_ ? decoder_->GetLogger()->GetLogPrefix() : "None"); 48 "decoder", decoder_ ? decoder_->GetLogger()->GetLogPrefix() : "None");
49 49
50 CommandBuffer::State state = command_buffer_->GetState(); 50 CommandBuffer::State state = command_buffer_->GetLastState();
51 51
52 // If there is no parser, exit. 52 // If there is no parser, exit.
53 if (!parser_.get()) { 53 if (!parser_.get()) {
54 DCHECK_EQ(state.get_offset, state.put_offset); 54 DCHECK_EQ(state.get_offset, state.put_offset);
55 return; 55 return;
56 } 56 }
57 57
58 parser_->set_put(state.put_offset); 58 parser_->set_put(state.put_offset);
59 if (state.error != error::kNoError) 59 if (state.error != error::kNoError)
60 return; 60 return;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 base::Closure task_) 303 base::Closure task_)
304 : fence(fence_), 304 : fence(fence_),
305 issue_time(base::Time::Now()), 305 issue_time(base::Time::Now()),
306 task(task_) { 306 task(task_) {
307 } 307 }
308 308
309 GpuScheduler::UnscheduleFence::~UnscheduleFence() { 309 GpuScheduler::UnscheduleFence::~UnscheduleFence() {
310 } 310 }
311 311
312 } // namespace gpu 312 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/command_buffer_service_unittest.cc ('k') | gpu/command_buffer/service/gpu_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698