Chromium Code Reviews| Index: cc/layers/surface_layer.cc |
| diff --git a/cc/layers/surface_layer.cc b/cc/layers/surface_layer.cc |
| index 984a56e684a02a41eb81d9ba55c193222bd10560..815c6471ebca3d40791dcea21ac0dbba15e81cb1 100644 |
| --- a/cc/layers/surface_layer.cc |
| +++ b/cc/layers/surface_layer.cc |
| @@ -57,7 +57,7 @@ SurfaceLayer::SurfaceLayer(const SatisfyCallback& satisfy_callback, |
| SurfaceLayer::~SurfaceLayer() { |
| DCHECK(!layer_tree_host()); |
| - DCHECK(destroy_sequence_.is_null()); |
| + DCHECK(!destroy_sequence_.is_valid()); |
| } |
| void SurfaceLayer::SetSurfaceId(const SurfaceId& surface_id, |
| @@ -79,7 +79,7 @@ std::unique_ptr<LayerImpl> SurfaceLayer::CreateLayerImpl( |
| } |
| bool SurfaceLayer::HasDrawableContent() const { |
| - return !surface_id_.is_null() && Layer::HasDrawableContent(); |
| + return surface_id_.is_valid() && Layer::HasDrawableContent(); |
| } |
| void SurfaceLayer::SetLayerTreeHost(LayerTreeHost* host) { |
| @@ -104,7 +104,7 @@ void SurfaceLayer::PushPropertiesTo(LayerImpl* layer) { |
| } |
| void SurfaceLayer::CreateNewDestroySequence() { |
| - DCHECK(destroy_sequence_.is_null()); |
| + DCHECK(!destroy_sequence_.is_valid()); |
| if (layer_tree_host()) { |
| destroy_sequence_ = layer_tree_host() |
| ->GetSurfaceSequenceGenerator() |
| @@ -116,7 +116,8 @@ void SurfaceLayer::CreateNewDestroySequence() { |
| void SurfaceLayer::SatisfyDestroySequence() { |
| if (!layer_tree_host()) |
| return; |
| - DCHECK(!destroy_sequence_.is_null()); |
| + // Sometime frame_sink_id_ is null |
|
piman
2016/11/08 23:16:34
What does this comment refer to? There's no frame_
Alex Z.
2016/11/09 15:29:15
Sorry about the confusion.
That was one of the not
|
| + DCHECK(destroy_sequence_.is_valid()); |
| std::unique_ptr<SatisfySwapPromise> satisfy( |
| new SatisfySwapPromise(destroy_sequence_, satisfy_callback_)); |
| layer_tree_host()->GetSwapPromiseManager()->QueueSwapPromise( |