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

Unified Diff: sky/compositor/surface_holder.cc

Issue 753643002: Enable the Sky compositor again (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Moar comments Created 6 years, 1 month 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 | « sky/compositor/surface_holder.h ('k') | sky/viewer/document_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/compositor/surface_holder.cc
diff --git a/sky/compositor/surface_holder.cc b/sky/compositor/surface_holder.cc
index 5288efa517e457246a78b7bc06e76c6020ac17e4..de9662209b5f2ebcca2f9dad5de07816020cb28a 100644
--- a/sky/compositor/surface_holder.cc
+++ b/sky/compositor/surface_holder.cc
@@ -28,10 +28,14 @@ SurfaceHolder::SurfaceHolder(Client* client, mojo::Shell* shell)
}
SurfaceHolder::~SurfaceHolder() {
- if (surface_id_)
+ if (surface_ && surface_id_)
surface_->DestroySurface(surface_id_.Clone());
}
+bool SurfaceHolder::IsReadyForFrame() const {
+ return surface_;
+}
+
void SurfaceHolder::SubmitFrame(mojo::FramePtr frame) {
surface_->SubmitFrame(surface_id_.Clone(), frame.Pass());
}
« no previous file with comments | « sky/compositor/surface_holder.h ('k') | sky/viewer/document_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698