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

Side by Side Diff: content/renderer/gpu/compositor_output_surface.cc

Issue 1435133004: cc: Clean up max frames/swaps pending usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK changes Created 5 years, 1 month 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/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
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 main_thread_runner_->PostTask(FROM_HERE, 217 main_thread_runner_->PostTask(FROM_HERE,
219 base::Bind(&SetThreadPriorityToIdle)); 218 base::Bind(&SetThreadPriorityToIdle));
220 } else { 219 } else {
221 main_thread_runner_->PostTask(FROM_HERE, 220 main_thread_runner_->PostTask(FROM_HERE,
222 base::Bind(&SetThreadPriorityToDefault)); 221 base::Bind(&SetThreadPriorityToDefault));
223 } 222 }
224 #endif 223 #endif
225 } 224 }
226 225
227 } // namespace content 226 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698