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

Unified Diff: cc/surfaces/surface.h

Issue 1304063014: cc: Plumbing for BeginFrameSource based on Surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More use-after-free. Attempt to fix mojo. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: cc/surfaces/surface.h
diff --git a/cc/surfaces/surface.h b/cc/surfaces/surface.h
index 8ef332ecb79756735b8f6760d23b34d954d973cd..cd82f435e98611e45dcf167cb429a3dacc2e9a4b 100644
--- a/cc/surfaces/surface.h
+++ b/cc/surfaces/surface.h
@@ -80,8 +80,12 @@ class CC_SURFACES_EXPORT Surface {
bool destroyed() const { return destroyed_; }
void set_destroyed(bool destroyed) { destroyed_ = destroyed; }
+ void AddBeginFrameSource(BeginFrameSource* begin_frame_source);
+ void RemoveBeginFrameSource(BeginFrameSource* begin_frame_source);
+
private:
void ClearCopyRequests();
+ void UpdatePrimaryBeginFrameSource();
SurfaceId surface_id_;
base::WeakPtr<SurfaceFactory> factory_;
@@ -91,6 +95,10 @@ class CC_SURFACES_EXPORT Surface {
bool destroyed_;
std::vector<SurfaceSequence> destruction_dependencies_;
+ // This surface may have multiple BeginFrameSources if it is
+ // on multiple Displays.
+ std::vector<BeginFrameSource*> begin_frame_sources_;
mithro-old 2015/10/01 03:00:23 Can we just use an order set type here rather then
brianderson 2015/10/07 20:54:48 Done.
+
std::vector<SurfaceId> referenced_surfaces_;
DrawCallback draw_callback_;

Powered by Google App Engine
This is Rietveld 408576698