OLD | NEW |
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 #if defined(OS_WIN) | 5 #if defined(OS_WIN) |
6 #include <windows.h> | 6 #include <windows.h> |
7 #endif | 7 #endif |
8 | 8 |
9 #include "content/common/gpu/gpu_channel.h" | 9 #include "content/common/gpu/gpu_channel.h" |
10 | 10 |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 void GpuChannel::DestroySoon() { | 351 void GpuChannel::DestroySoon() { |
352 MessageLoop::current()->PostTask( | 352 MessageLoop::current()->PostTask( |
353 FROM_HERE, base::Bind(&GpuChannel::OnDestroy, this)); | 353 FROM_HERE, base::Bind(&GpuChannel::OnDestroy, this)); |
354 } | 354 } |
355 | 355 |
356 int GpuChannel::GenerateRouteID() { | 356 int GpuChannel::GenerateRouteID() { |
357 static int last_id = 0; | 357 static int last_id = 0; |
358 return ++last_id; | 358 return ++last_id; |
359 } | 359 } |
360 | 360 |
361 void GpuChannel::AddRoute(int32 route_id, IPC::Channel::Listener* listener) { | 361 void GpuChannel::AddRoute(int32 route_id, IPC::Listener* listener) { |
362 router_.AddRoute(route_id, listener); | 362 router_.AddRoute(route_id, listener); |
363 } | 363 } |
364 | 364 |
365 void GpuChannel::RemoveRoute(int32 route_id) { | 365 void GpuChannel::RemoveRoute(int32 route_id) { |
366 router_.RemoveRoute(route_id); | 366 router_.RemoveRoute(route_id); |
367 } | 367 } |
368 | 368 |
369 void GpuChannel::SetPreemptByCounter( | 369 void GpuChannel::SetPreemptByCounter( |
370 scoped_refptr<gpu::RefCountedCounter> preempt_by_counter) { | 370 scoped_refptr<gpu::RefCountedCounter> preempt_by_counter) { |
371 preempt_by_counter_ = preempt_by_counter; | 371 preempt_by_counter_ = preempt_by_counter; |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 // In case the renderer is currently blocked waiting for a sync reply from | 528 // In case the renderer is currently blocked waiting for a sync reply from |
529 // the stub, we need to make sure to reschedule the GpuChannel here. | 529 // the stub, we need to make sure to reschedule the GpuChannel here. |
530 if (need_reschedule) | 530 if (need_reschedule) |
531 OnScheduled(); | 531 OnScheduled(); |
532 } | 532 } |
533 | 533 |
534 if (reply_message) | 534 if (reply_message) |
535 Send(reply_message); | 535 Send(reply_message); |
536 } | 536 } |
537 | 537 |
OLD | NEW |