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

Unified Diff: cc/layers/surface_layer.cc

Issue 2425923003: Replaced is_null() with is_valid in SurfaceId and related classes. (Closed)
Patch Set: Removed added printf statements; LocalFrameId::is_valid() no longer checks if nonce is 0. Created 4 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
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
+ DCHECK(destroy_sequence_.is_valid());
std::unique_ptr<SatisfySwapPromise> satisfy(
new SatisfySwapPromise(destroy_sequence_, satisfy_callback_));
layer_tree_host()->GetSwapPromiseManager()->QueueSwapPromise(

Powered by Google App Engine
This is Rietveld 408576698