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 #include "content/renderer/gpu/compositor_output_surface.h" | 5 #include "content/renderer/gpu/compositor_output_surface.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 frame_swap_message_queue_(swap_frame_message_queue), | 43 frame_swap_message_queue_(swap_frame_message_queue), |
44 routing_id_(routing_id), | 44 routing_id_(routing_id), |
45 #if defined(OS_ANDROID) | 45 #if defined(OS_ANDROID) |
46 prefers_smoothness_(false), | 46 prefers_smoothness_(false), |
47 main_thread_runner_(base::MessageLoop::current()->task_runner()), | 47 main_thread_runner_(base::MessageLoop::current()->task_runner()), |
48 #endif | 48 #endif |
49 layout_test_mode_(RenderThreadImpl::current()->layout_test_mode()), | 49 layout_test_mode_(RenderThreadImpl::current()->layout_test_mode()), |
50 weak_ptrs_(this) { | 50 weak_ptrs_(this) { |
51 DCHECK(output_surface_filter_.get()); | 51 DCHECK(output_surface_filter_.get()); |
52 DCHECK(frame_swap_message_queue_.get()); | 52 DCHECK(frame_swap_message_queue_.get()); |
53 capabilities_.max_frames_pending = 1; | |
54 message_sender_ = RenderThreadImpl::current()->sync_message_filter(); | 53 message_sender_ = RenderThreadImpl::current()->sync_message_filter(); |
55 DCHECK(message_sender_.get()); | 54 DCHECK(message_sender_.get()); |
56 } | 55 } |
57 | 56 |
58 CompositorOutputSurface::~CompositorOutputSurface() {} | 57 CompositorOutputSurface::~CompositorOutputSurface() {} |
59 | 58 |
60 bool CompositorOutputSurface::BindToClient( | 59 bool CompositorOutputSurface::BindToClient( |
61 cc::OutputSurfaceClient* client) { | 60 cc::OutputSurfaceClient* client) { |
62 if (!cc::OutputSurface::BindToClient(client)) | 61 if (!cc::OutputSurface::BindToClient(client)) |
63 return false; | 62 return false; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 main_thread_runner_->PostTask(FROM_HERE, | 221 main_thread_runner_->PostTask(FROM_HERE, |
223 base::Bind(&SetThreadPriorityToIdle)); | 222 base::Bind(&SetThreadPriorityToIdle)); |
224 } else { | 223 } else { |
225 main_thread_runner_->PostTask(FROM_HERE, | 224 main_thread_runner_->PostTask(FROM_HERE, |
226 base::Bind(&SetThreadPriorityToDefault)); | 225 base::Bind(&SetThreadPriorityToDefault)); |
227 } | 226 } |
228 #endif | 227 #endif |
229 } | 228 } |
230 | 229 |
231 } // namespace content | 230 } // namespace content |
OLD | NEW |