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

Side by Side Diff: services/surfaces/surfaces_scheduler.cc

Issue 1123623003: Automatically redraw the display on resume. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Response to review Created 5 years, 7 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 | « services/native_viewport/onscreen_context_provider.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 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 "services/surfaces/surfaces_scheduler.h" 5 #include "services/surfaces/surfaces_scheduler.h"
6 6
7 #include "cc/surfaces/display.h" 7 #include "cc/surfaces/display.h"
8 8
9 namespace surfaces { 9 namespace surfaces {
10 10
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 void SurfacesScheduler::OnVSyncParametersUpdated(base::TimeTicks timebase, 32 void SurfacesScheduler::OnVSyncParametersUpdated(base::TimeTicks timebase,
33 base::TimeDelta interval) { 33 base::TimeDelta interval) {
34 scheduler_->CommitVSyncParameters(timebase, interval); 34 scheduler_->CommitVSyncParameters(timebase, interval);
35 } 35 }
36 36
37 void SurfacesScheduler::AddDisplay(cc::Display* display) { 37 void SurfacesScheduler::AddDisplay(cc::Display* display) {
38 DCHECK(displays_.find(display) == displays_.end()); 38 DCHECK(displays_.find(display) == displays_.end());
39 displays_.insert(display); 39 displays_.insert(display);
40
41 // A draw might be necessary (e.g., this display might be getting added on
42 // resumption from backgrounding).
43 SetNeedsDraw();
40 } 44 }
41 45
42 void SurfacesScheduler::RemoveDisplay(cc::Display* display) { 46 void SurfacesScheduler::RemoveDisplay(cc::Display* display) {
43 auto it = displays_.find(display); 47 auto it = displays_.find(display);
44 DCHECK(it != displays_.end()); 48 DCHECK(it != displays_.end());
45 displays_.erase(it); 49 displays_.erase(it);
46 } 50 }
47 51
48 void SurfacesScheduler::WillBeginImplFrame(const cc::BeginFrameArgs& args) { 52 void SurfacesScheduler::WillBeginImplFrame(const cc::BeginFrameArgs& args) {
49 } 53 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 108 }
105 109
106 void SurfacesScheduler::SendBeginFramesToChildren( 110 void SurfacesScheduler::SendBeginFramesToChildren(
107 const cc::BeginFrameArgs& args) { 111 const cc::BeginFrameArgs& args) {
108 } 112 }
109 113
110 void SurfacesScheduler::SendBeginMainFrameNotExpectedSoon() { 114 void SurfacesScheduler::SendBeginMainFrameNotExpectedSoon() {
111 } 115 }
112 116
113 } // namespace mojo 117 } // namespace mojo
OLDNEW
« no previous file with comments | « services/native_viewport/onscreen_context_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698