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

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

Issue 16443007: Rewrite scoped_ptr<T>(NULL) to use the default ctor in gpu/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/time.h" 12 #include "base/time.h"
13 #include "ui/gl/gl_bindings.h" 13 #include "ui/gl/gl_bindings.h"
14 #include "ui/gl/gl_fence.h" 14 #include "ui/gl/gl_fence.h"
15 #include "ui/gl/gl_switches.h" 15 #include "ui/gl/gl_switches.h"
16 16
17 #if defined(OS_WIN) 17 #if defined(OS_WIN)
18 #include "base/win/windows_version.h" 18 #include "base/win/windows_version.h"
19 #endif 19 #endif
20 20
21 using ::base::SharedMemory; 21 using ::base::SharedMemory;
22 22
23 namespace gpu { 23 namespace gpu {
24 24
25 namespace { 25 namespace {
26 const int64 kRescheduleTimeOutDelay = 1000; 26 const int64 kRescheduleTimeOutDelay = 1000;
27 const int64 kUnscheduleFenceTimeOutDelay = 10000; 27 const int64 kUnscheduleFenceTimeOutDelay = 10000;
28 } 28 }
29 29
30 GpuScheduler::GpuScheduler( 30 GpuScheduler::GpuScheduler(CommandBuffer* command_buffer,
31 CommandBuffer* command_buffer, 31 AsyncAPIInterface* handler,
32 AsyncAPIInterface* handler, 32 gles2::GLES2Decoder* decoder)
33 gles2::GLES2Decoder* decoder)
34 : command_buffer_(command_buffer), 33 : command_buffer_(command_buffer),
35 handler_(handler), 34 handler_(handler),
36 decoder_(decoder), 35 decoder_(decoder),
37 parser_(NULL),
38 unscheduled_count_(0), 36 unscheduled_count_(0),
39 rescheduled_count_(0), 37 rescheduled_count_(0),
40 reschedule_task_factory_(this), 38 reschedule_task_factory_(this),
41 was_preempted_(false) { 39 was_preempted_(false) {}
42 }
43 40
44 GpuScheduler::~GpuScheduler() { 41 GpuScheduler::~GpuScheduler() {
45 } 42 }
46 43
47 void GpuScheduler::PutChanged() { 44 void GpuScheduler::PutChanged() {
48 TRACE_EVENT1( 45 TRACE_EVENT1(
49 "gpu", "GpuScheduler:PutChanged", 46 "gpu", "GpuScheduler:PutChanged",
50 "decoder", decoder_ ? decoder_->GetLogger()->GetLogPrefix() : "None"); 47 "decoder", decoder_ ? decoder_->GetLogger()->GetLogPrefix() : "None");
51 48
52 CommandBuffer::State state = command_buffer_->GetState(); 49 CommandBuffer::State state = command_buffer_->GetState();
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 base::Closure task_) 301 base::Closure task_)
305 : fence(fence_), 302 : fence(fence_),
306 issue_time(base::Time::Now()), 303 issue_time(base::Time::Now()),
307 task(task_) { 304 task(task_) {
308 } 305 }
309 306
310 GpuScheduler::UnscheduleFence::~UnscheduleFence() { 307 GpuScheduler::UnscheduleFence::~UnscheduleFence() {
311 } 308 }
312 309
313 } // namespace gpu 310 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698