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

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: rebase 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
« no previous file with comments | « content/renderer/android/synchronous_compositor_output_surface.cc ('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 "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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « content/renderer/android/synchronous_compositor_output_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698