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()); |
} |