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

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

Issue 10967034: Issue-141903: Rename "descheduled" trace event for gpu swap to something understandable (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed AUTHORS entry per trybot failure. Created 8 years, 2 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 | « AUTHORS ('k') | 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"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 if (rescheduled_count_ > 0) { 122 if (rescheduled_count_ > 0) {
123 --rescheduled_count_; 123 --rescheduled_count_;
124 return; 124 return;
125 } else { 125 } else {
126 --unscheduled_count_; 126 --unscheduled_count_;
127 } 127 }
128 128
129 DCHECK_GE(unscheduled_count_, 0); 129 DCHECK_GE(unscheduled_count_, 0);
130 130
131 if (unscheduled_count_ == 0) { 131 if (unscheduled_count_ == 0) {
132 TRACE_EVENT_ASYNC_END1("gpu", "Descheduled", this, "GpuScheduler", this); 132 TRACE_EVENT_ASYNC_END1("gpu", "ProcessingSwap", this,
133 "GpuScheduler", this);
133 // When the scheduler transitions from the unscheduled to the scheduled 134 // When the scheduler transitions from the unscheduled to the scheduled
134 // state, cancel the task that would reschedule it after a timeout. 135 // state, cancel the task that would reschedule it after a timeout.
135 reschedule_task_factory_.InvalidateWeakPtrs(); 136 reschedule_task_factory_.InvalidateWeakPtrs();
136 137
137 if (!scheduled_callback_.is_null()) 138 if (!scheduled_callback_.is_null())
138 scheduled_callback_.Run(); 139 scheduled_callback_.Run();
139 } 140 }
140 } else { 141 } else {
141 if (unscheduled_count_ == 0) { 142 if (unscheduled_count_ == 0) {
142 TRACE_EVENT_ASYNC_BEGIN1("gpu", "Descheduled", this, 143 TRACE_EVENT_ASYNC_BEGIN1("gpu", "ProcessingSwap", this,
143 "GpuScheduler", this); 144 "GpuScheduler", this);
144 #if defined(OS_WIN) 145 #if defined(OS_WIN)
145 // When the scheduler transitions from scheduled to unscheduled, post a 146 // When the scheduler transitions from scheduled to unscheduled, post a
146 // delayed task that it will force it back into a scheduled state after a 147 // delayed task that it will force it back into a scheduled state after a
147 // timeout. 148 // timeout.
148 MessageLoop::current()->PostDelayedTask( 149 MessageLoop::current()->PostDelayedTask(
149 FROM_HERE, 150 FROM_HERE,
150 base::Bind(&GpuScheduler::RescheduleTimeOut, 151 base::Bind(&GpuScheduler::RescheduleTimeOut,
151 reschedule_task_factory_.GetWeakPtr()), 152 reschedule_task_factory_.GetWeakPtr()),
152 base::TimeDelta::FromMilliseconds(kRescheduleTimeOutDelay)); 153 base::TimeDelta::FromMilliseconds(kRescheduleTimeOutDelay));
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } 262 }
262 263
263 GpuScheduler::UnscheduleFence::UnscheduleFence( 264 GpuScheduler::UnscheduleFence::UnscheduleFence(
264 gfx::GLFence* fence_, base::Closure task_): fence(fence_), task(task_) { 265 gfx::GLFence* fence_, base::Closure task_): fence(fence_), task(task_) {
265 } 266 }
266 267
267 GpuScheduler::UnscheduleFence::~UnscheduleFence() { 268 GpuScheduler::UnscheduleFence::~UnscheduleFence() {
268 } 269 }
269 270
270 } // namespace gpu 271 } // namespace gpu
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698