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

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: fix webview Created 5 years, 2 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
« no previous file with comments | « cc/surfaces/onscreen_display_client.cc ('k') | cc/surfaces/surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface.h
diff --git a/cc/surfaces/surface.h b/cc/surfaces/surface.h
index 8ef332ecb79756735b8f6760d23b34d954d973cd..18ca7442af6b4cd74a5a0d47e6a89b5be4af426b 100644
--- a/cc/surfaces/surface.h
+++ b/cc/surfaces/surface.h
@@ -6,6 +6,7 @@
#define CC_SURFACES_SURFACE_H_
#include <map>
+#include <set>
#include <vector>
#include "base/callback.h"
@@ -80,8 +81,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 +96,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::set<BeginFrameSource*> begin_frame_sources_;
+
std::vector<SurfaceId> referenced_surfaces_;
DrawCallback draw_callback_;
« no previous file with comments | « cc/surfaces/onscreen_display_client.cc ('k') | cc/surfaces/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698