OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |