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

Side by Side Diff: cc/surfaces/display.cc

Issue 1051273003: Revert of cc: Make scheduling be driven by vsync for android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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 | « cc/surfaces/display.h ('k') | cc/test/fake_layer_tree_host_impl_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "cc/surfaces/display.h" 5 #include "cc/surfaces/display.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "cc/debug/benchmark_instrumentation.h" 9 #include "cc/debug/benchmark_instrumentation.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 void Display::CommitVSyncParameters(base::TimeTicks timebase, 190 void Display::CommitVSyncParameters(base::TimeTicks timebase,
191 base::TimeDelta interval) { 191 base::TimeDelta interval) {
192 client_->CommitVSyncParameters(timebase, interval); 192 client_->CommitVSyncParameters(timebase, interval);
193 } 193 }
194 194
195 void Display::SetMemoryPolicy(const ManagedMemoryPolicy& policy) { 195 void Display::SetMemoryPolicy(const ManagedMemoryPolicy& policy) {
196 client_->SetMemoryPolicy(policy); 196 client_->SetMemoryPolicy(policy);
197 } 197 }
198 198
199 void Display::OnDraw() {
200 NOTREACHED();
201 }
202
203 void Display::OnSurfaceDamaged(SurfaceId surface_id, bool* changed) { 199 void Display::OnSurfaceDamaged(SurfaceId surface_id, bool* changed) {
204 if (aggregator_ && 200 if (aggregator_ &&
205 aggregator_->previous_contained_surfaces().count(surface_id)) { 201 aggregator_->previous_contained_surfaces().count(surface_id)) {
206 Surface* surface = manager_->GetSurfaceForId(surface_id); 202 Surface* surface = manager_->GetSurfaceForId(surface_id);
207 if (surface) { 203 if (surface) {
208 const CompositorFrame* current_frame = surface->GetEligibleFrame(); 204 const CompositorFrame* current_frame = surface->GetEligibleFrame();
209 if (!current_frame || !current_frame->delegated_frame_data || 205 if (!current_frame || !current_frame->delegated_frame_data ||
210 !current_frame->delegated_frame_data->resource_list.size()) 206 !current_frame->delegated_frame_data->resource_list.size())
211 aggregator_->ReleaseResources(surface_id); 207 aggregator_->ReleaseResources(surface_id);
212 } 208 }
(...skipping 11 matching lines...) Expand all
224 220
225 int Display::GetMaxFramesPending() { 221 int Display::GetMaxFramesPending() {
226 int max_frames_pending = 222 int max_frames_pending =
227 output_surface_ ? output_surface_->capabilities().max_frames_pending : 0; 223 output_surface_ ? output_surface_->capabilities().max_frames_pending : 0;
228 if (max_frames_pending <= 0) 224 if (max_frames_pending <= 0)
229 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING; 225 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING;
230 return max_frames_pending; 226 return max_frames_pending;
231 } 227 }
232 228
233 } // namespace cc 229 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/display.h ('k') | cc/test/fake_layer_tree_host_impl_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698