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

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

Issue 2721763002: SetPreviousFrameSurface should copy latency info to the new surface (Closed)
Patch Set: c Created 3 years, 9 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
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 #ifndef CC_SURFACES_SURFACE_H_ 5 #ifndef CC_SURFACES_SURFACE_H_
6 #define CC_SURFACES_SURFACE_H_ 6 #define CC_SURFACES_SURFACE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void ActivatePendingFrame(); 125 void ActivatePendingFrame();
126 // Called when all of the surface's dependencies have been resolved. 126 // Called when all of the surface's dependencies have been resolved.
127 void ActivateFrame(CompositorFrame frame); 127 void ActivateFrame(CompositorFrame frame);
128 void UpdateBlockingSurfaces( 128 void UpdateBlockingSurfaces(
129 const base::Optional<CompositorFrame>& previous_pending_frame, 129 const base::Optional<CompositorFrame>& previous_pending_frame,
130 const CompositorFrame& current_frame); 130 const CompositorFrame& current_frame);
131 131
132 void UnrefFrameResources(const CompositorFrame& frame_data); 132 void UnrefFrameResources(const CompositorFrame& frame_data);
133 void ClearCopyRequests(); 133 void ClearCopyRequests();
134 134
135 void TakeLatencyInfoFromPendingFrame(
136 std::vector<ui::LatencyInfo>* latency_info);
137 void TakeLatencyInfoFromFrame(CompositorFrame* frame,
jbauman 2017/03/01 22:11:08 Make this static.
Saman Sami 2017/03/01 22:35:05 Done.
138 std::vector<ui::LatencyInfo>* latency_info);
139
135 SurfaceId surface_id_; 140 SurfaceId surface_id_;
136 SurfaceId previous_frame_surface_id_; 141 SurfaceId previous_frame_surface_id_;
137 base::WeakPtr<SurfaceFactory> factory_; 142 base::WeakPtr<SurfaceFactory> factory_;
138 // TODO(jamesr): Support multiple frames in flight. 143 // TODO(jamesr): Support multiple frames in flight.
139 base::Optional<CompositorFrame> pending_frame_; 144 base::Optional<CompositorFrame> pending_frame_;
140 base::Optional<CompositorFrame> active_frame_; 145 base::Optional<CompositorFrame> active_frame_;
141 int frame_index_; 146 int frame_index_;
142 bool destroyed_; 147 bool destroyed_;
143 std::vector<SurfaceSequence> destruction_dependencies_; 148 std::vector<SurfaceSequence> destruction_dependencies_;
144 149
145 // This surface may have multiple BeginFrameSources if it is 150 // This surface may have multiple BeginFrameSources if it is
146 // on multiple Displays. 151 // on multiple Displays.
147 std::set<BeginFrameSource*> begin_frame_sources_; 152 std::set<BeginFrameSource*> begin_frame_sources_;
148 153
149 SurfaceDependencies blocking_surfaces_; 154 SurfaceDependencies blocking_surfaces_;
150 base::ObserverList<PendingFrameObserver, true> observers_; 155 base::ObserverList<PendingFrameObserver, true> observers_;
151 156
152 DrawCallback draw_callback_; 157 DrawCallback draw_callback_;
153 158
154 DISALLOW_COPY_AND_ASSIGN(Surface); 159 DISALLOW_COPY_AND_ASSIGN(Surface);
155 }; 160 };
156 161
157 using PendingSurfaceSet = base::flat_set<Surface*>; 162 using PendingSurfaceSet = base::flat_set<Surface*>;
158 163
159 } // namespace cc 164 } // namespace cc
160 165
161 #endif // CC_SURFACES_SURFACE_H_ 166 #endif // CC_SURFACES_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698