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

Side by Side Diff: content/common/gpu/gpu_channel.cc

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: . 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
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 "content/common/gpu/gpu_channel.h" 5 #include "content/common/gpu/gpu_channel.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 sync_point_manager_(sync_point_manager), 284 sync_point_manager_(sync_point_manager),
285 task_runner_(task_runner), 285 task_runner_(task_runner),
286 a_stub_is_descheduled_(false), 286 a_stub_is_descheduled_(false),
287 future_sync_points_(future_sync_points) {} 287 future_sync_points_(future_sync_points) {}
288 288
289 GpuChannelMessageFilter::~GpuChannelMessageFilter() {} 289 GpuChannelMessageFilter::~GpuChannelMessageFilter() {}
290 290
291 void GpuChannelMessageFilter::OnFilterAdded(IPC::Sender* sender) { 291 void GpuChannelMessageFilter::OnFilterAdded(IPC::Sender* sender) {
292 DCHECK(!sender_); 292 DCHECK(!sender_);
293 sender_ = sender; 293 sender_ = sender;
294 timer_ = make_scoped_ptr(new base::OneShotTimer<GpuChannelMessageFilter>); 294 timer_ = make_scoped_ptr(new base::OneShotTimer);
295 for (scoped_refptr<IPC::MessageFilter>& filter : channel_filters_) { 295 for (scoped_refptr<IPC::MessageFilter>& filter : channel_filters_) {
296 filter->OnFilterAdded(sender_); 296 filter->OnFilterAdded(sender_);
297 } 297 }
298 } 298 }
299 299
300 void GpuChannelMessageFilter::OnFilterRemoved() { 300 void GpuChannelMessageFilter::OnFilterRemoved() {
301 DCHECK(sender_); 301 DCHECK(sender_);
302 for (scoped_refptr<IPC::MessageFilter>& filter : channel_filters_) { 302 for (scoped_refptr<IPC::MessageFilter>& filter : channel_filters_) {
303 filter->OnFilterRemoved(); 303 filter->OnFilterRemoved();
304 } 304 }
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 void GpuChannel::HandleUpdateValueState( 1157 void GpuChannel::HandleUpdateValueState(
1158 unsigned int target, const gpu::ValueState& state) { 1158 unsigned int target, const gpu::ValueState& state) {
1159 pending_valuebuffer_state_->UpdateState(target, state); 1159 pending_valuebuffer_state_->UpdateState(target, state);
1160 } 1160 }
1161 1161
1162 uint32_t GpuChannel::GetUnprocessedOrderNum() const { 1162 uint32_t GpuChannel::GetUnprocessedOrderNum() const {
1163 return message_queue_->GetUnprocessedOrderNum(); 1163 return message_queue_->GetUnprocessedOrderNum();
1164 } 1164 }
1165 1165
1166 } // namespace content 1166 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698