| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CC_SURFACES_DISPLAY_SCHEDULER_H_ | 5 #ifndef CC_SURFACES_DISPLAY_SCHEDULER_H_ |
| 6 #define CC_SURFACES_DISPLAY_SCHEDULER_H_ | 6 #define CC_SURFACES_DISPLAY_SCHEDULER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/cancelable_callback.h" | 10 #include "base/cancelable_callback.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 void OnBeginFrameSourcePausedChanged(bool paused) override; | 63 void OnBeginFrameSourcePausedChanged(bool paused) override; |
| 64 | 64 |
| 65 // SurfaceObserver implementation. | 65 // SurfaceObserver implementation. |
| 66 void OnSurfaceCreated(const SurfaceInfo& surface_info) override; | 66 void OnSurfaceCreated(const SurfaceInfo& surface_info) override; |
| 67 void OnSurfaceDestroyed(const SurfaceId& surface_id) override; | 67 void OnSurfaceDestroyed(const SurfaceId& surface_id) override; |
| 68 bool OnSurfaceDamaged(const SurfaceId& surface_id, | 68 bool OnSurfaceDamaged(const SurfaceId& surface_id, |
| 69 const BeginFrameAck& ack) override; | 69 const BeginFrameAck& ack) override; |
| 70 void OnSurfaceDiscarded(const SurfaceId& surface_id) override; | 70 void OnSurfaceDiscarded(const SurfaceId& surface_id) override; |
| 71 void OnSurfaceDamageExpected(const SurfaceId& surface_id, | 71 void OnSurfaceDamageExpected(const SurfaceId& surface_id, |
| 72 const BeginFrameArgs& args) override; | 72 const BeginFrameArgs& args) override; |
| 73 void OnSurfaceWillDraw(const SurfaceId& surface_id) override; |
| 73 | 74 |
| 74 protected: | 75 protected: |
| 75 base::TimeTicks DesiredBeginFrameDeadlineTime(); | 76 base::TimeTicks DesiredBeginFrameDeadlineTime(); |
| 76 virtual void ScheduleBeginFrameDeadline(); | 77 virtual void ScheduleBeginFrameDeadline(); |
| 77 bool AttemptDrawAndSwap(); | 78 bool AttemptDrawAndSwap(); |
| 78 void OnBeginFrameDeadline(); | 79 void OnBeginFrameDeadline(); |
| 79 bool DrawAndSwap(); | 80 bool DrawAndSwap(); |
| 80 void StartObservingBeginFrames(); | 81 void StartObservingBeginFrames(); |
| 81 void StopObservingBeginFrames(); | 82 void StopObservingBeginFrames(); |
| 82 bool ShouldDraw(); | 83 bool ShouldDraw(); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 122 |
| 122 base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_; | 123 base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_; |
| 123 | 124 |
| 124 private: | 125 private: |
| 125 DISALLOW_COPY_AND_ASSIGN(DisplayScheduler); | 126 DISALLOW_COPY_AND_ASSIGN(DisplayScheduler); |
| 126 }; | 127 }; |
| 127 | 128 |
| 128 } // namespace cc | 129 } // namespace cc |
| 129 | 130 |
| 130 #endif // CC_SURFACES_DISPLAY_SCHEDULER_H_ | 131 #endif // CC_SURFACES_DISPLAY_SCHEDULER_H_ |
| OLD | NEW |