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

Side by Side Diff: content/renderer/android/synchronous_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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/android/synchronous_compositor_output_surface.h" 5 #include "content/renderer/android/synchronous_compositor_output_surface.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/context_provider.h" 10 #include "cc/output/context_provider.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 registered_(false), 72 registered_(false),
73 sync_client_(nullptr), 73 sync_client_(nullptr),
74 next_hardware_draw_needs_damage_(false), 74 next_hardware_draw_needs_damage_(false),
75 current_sw_canvas_(nullptr), 75 current_sw_canvas_(nullptr),
76 memory_policy_(0u), 76 memory_policy_(0u),
77 frame_swap_message_queue_(frame_swap_message_queue) { 77 frame_swap_message_queue_(frame_swap_message_queue) {
78 thread_checker_.DetachFromThread(); 78 thread_checker_.DetachFromThread();
79 DCHECK(registry_); 79 DCHECK(registry_);
80 capabilities_.adjust_deadline_for_parent = false; 80 capabilities_.adjust_deadline_for_parent = false;
81 capabilities_.delegated_rendering = true; 81 capabilities_.delegated_rendering = true;
82 capabilities_.max_frames_pending = 1;
83 memory_policy_.priority_cutoff_when_visible = 82 memory_policy_.priority_cutoff_when_visible =
84 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; 83 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE;
85 } 84 }
86 85
87 SynchronousCompositorOutputSurface::~SynchronousCompositorOutputSurface() {} 86 SynchronousCompositorOutputSurface::~SynchronousCompositorOutputSurface() {}
88 87
89 void SynchronousCompositorOutputSurface::SetSyncClient( 88 void SynchronousCompositorOutputSurface::SetSyncClient(
90 SynchronousCompositorOutputSurfaceClient* compositor) { 89 SynchronousCompositorOutputSurfaceClient* compositor) {
91 DCHECK(CalledOnValidThread()); 90 DCHECK(CalledOnValidThread());
92 sync_client_ = compositor; 91 sync_client_ = compositor;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 scoped_ptr<FrameSwapMessageQueue::SendMessageScope> send_message_scope = 268 scoped_ptr<FrameSwapMessageQueue::SendMessageScope> send_message_scope =
270 frame_swap_message_queue_->AcquireSendMessageScope(); 269 frame_swap_message_queue_->AcquireSendMessageScope();
271 frame_swap_message_queue_->DrainMessages(messages); 270 frame_swap_message_queue_->DrainMessages(messages);
272 } 271 }
273 272
274 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { 273 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const {
275 return thread_checker_.CalledOnValidThread(); 274 return thread_checker_.CalledOnValidThread();
276 } 275 }
277 276
278 } // namespace content 277 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698