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

Unified Diff: cc/surfaces/surface.cc

Issue 1304063014: cc: Plumbing for BeginFrameSource based on Surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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.cc
diff --git a/cc/surfaces/surface.cc b/cc/surfaces/surface.cc
index 16987cb84e49b356bd2cf4afa0fd255f9ddf82a6..853d37b5990bb79eaacbef1b72191955c5b8e394 100644
--- a/cc/surfaces/surface.cc
+++ b/cc/surfaces/surface.cc
@@ -22,7 +22,9 @@ Surface::Surface(SurfaceId id, SurfaceFactory* factory)
: surface_id_(id),
factory_(factory->AsWeakPtr()),
frame_index_(kFrameIndexStart),
- destroyed_(false) {}
+ destroyed_(false) {
+ factory_->client()->SetBeginFrameSource(surface_id_, NULL);
+}
Surface::~Surface() {
ClearCopyRequests();
@@ -35,6 +37,8 @@ Surface::~Surface() {
}
if (!draw_callback_.is_null())
draw_callback_.Run(SurfaceDrawStatus::DRAW_SKIPPED);
+
+ factory_->client()->SetBeginFrameSource(surface_id_, NULL);
}
void Surface::QueueFrame(scoped_ptr<CompositorFrame> frame,

Powered by Google App Engine
This is Rietveld 408576698