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

Side by Side Diff: cc/surfaces/display_scheduler.h

Issue 2938833002: Add SurfaceWillDraw notification (Closed)
Patch Set: add unit test to verify that OnSurfaceWillDraw is called only for surfaces added to the CompositorF… Created 3 years, 6 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 | « no previous file | cc/surfaces/display_scheduler.cc » ('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 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
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
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_
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/display_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698