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

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

Issue 568763004: Support distributing vsync info with surfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/surfaces/display_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/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/compositor_frame_ack.h" 10 #include "cc/output/compositor_frame_ack.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 void Display::DidSwapBuffers() { 135 void Display::DidSwapBuffers() {
136 client_->DidSwapBuffers(); 136 client_->DidSwapBuffers();
137 } 137 }
138 138
139 void Display::DidSwapBuffersComplete() { 139 void Display::DidSwapBuffersComplete() {
140 client_->DidSwapBuffersComplete(); 140 client_->DidSwapBuffersComplete();
141 } 141 }
142 142
143 void Display::CommitVSyncParameters(base::TimeTicks timebase,
144 base::TimeDelta interval) {
145 client_->CommitVSyncParameters(timebase, interval);
146 }
147
143 void Display::OnSurfaceDamaged(SurfaceId surface) { 148 void Display::OnSurfaceDamaged(SurfaceId surface) {
144 if (aggregator_ && aggregator_->previous_contained_surfaces().count(surface)) 149 if (aggregator_ && aggregator_->previous_contained_surfaces().count(surface))
145 client_->DisplayDamaged(); 150 client_->DisplayDamaged();
146 } 151 }
147 152
148 SurfaceId Display::CurrentSurfaceId() { 153 SurfaceId Display::CurrentSurfaceId() {
149 return current_surface_id_; 154 return current_surface_id_;
150 } 155 }
151 156
152 int Display::GetMaxFramesPending() { 157 int Display::GetMaxFramesPending() {
153 if (!output_surface_) 158 if (!output_surface_)
154 return OutputSurface::DEFAULT_MAX_FRAMES_PENDING; 159 return OutputSurface::DEFAULT_MAX_FRAMES_PENDING;
155 return output_surface_->capabilities().max_frames_pending; 160 return output_surface_->capabilities().max_frames_pending;
156 } 161 }
157 162
158 } // namespace cc 163 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/display.h ('k') | cc/surfaces/display_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698