| Index: cc/layers/picture_layer_impl.cc
|
| diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
|
| index a0800db7d713b361cfe153cc1db536a666a2f930..0ee38b2448811a183503a6fabf165ec4eb98ed5a 100644
|
| --- a/cc/layers/picture_layer_impl.cc
|
| +++ b/cc/layers/picture_layer_impl.cc
|
| @@ -101,8 +101,8 @@ void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
|
| LayerImpl::PushPropertiesTo(base_layer);
|
|
|
| // Twin relationships should never change once established.
|
| - DCHECK_IMPLIES(twin_layer_, twin_layer_ == layer_impl);
|
| - DCHECK_IMPLIES(twin_layer_, layer_impl->twin_layer_ == this);
|
| + DCHECK(!twin_layer_ || (twin_layer_ == layer_impl));
|
| + DCHECK(!twin_layer_ || (layer_impl->twin_layer_ == this));
|
| // The twin relationship does not need to exist before the first
|
| // PushPropertiesTo from pending to active layer since before that the active
|
| // layer can not have a pile or tilings, it has only been created and inserted
|
| @@ -113,7 +113,7 @@ void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
|
| layer_impl->SetNearestNeighbor(nearest_neighbor_);
|
|
|
| // Solid color layers have no tilings.
|
| - DCHECK_IMPLIES(raster_source_->IsSolidColor(), tilings_->num_tilings() == 0);
|
| + DCHECK(!raster_source_->IsSolidColor() || (tilings_->num_tilings() == 0));
|
| // The pending tree should only have a high res (and possibly low res) tiling.
|
| DCHECK_LE(tilings_->num_tilings(),
|
| layer_tree_impl()->create_low_res_tiling() ? 2u : 1u);
|
| @@ -124,8 +124,8 @@ void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
|
| DCHECK(invalidation_.IsEmpty());
|
|
|
| // After syncing a solid color layer, the active layer has no tilings.
|
| - DCHECK_IMPLIES(raster_source_->IsSolidColor(),
|
| - layer_impl->tilings_->num_tilings() == 0);
|
| + DCHECK(!raster_source_->IsSolidColor() ||
|
| + (layer_impl->tilings_->num_tilings() == 0));
|
|
|
| layer_impl->raster_page_scale_ = raster_page_scale_;
|
| layer_impl->raster_device_scale_ = raster_device_scale_;
|
| @@ -145,8 +145,8 @@ void PictureLayerImpl::AppendQuads(RenderPass* render_pass,
|
| AppendQuadsData* append_quads_data) {
|
| // The bounds and the pile size may differ if the pile wasn't updated (ie.
|
| // PictureLayer::Update didn't happen). In that case the pile will be empty.
|
| - DCHECK_IMPLIES(!raster_source_->GetSize().IsEmpty(),
|
| - bounds() == raster_source_->GetSize())
|
| + DCHECK(raster_source_->GetSize().IsEmpty() ||
|
| + (bounds() == raster_source_->GetSize()))
|
| << " bounds " << bounds().ToString() << " pile "
|
| << raster_source_->GetSize().ToString();
|
|
|
| @@ -509,8 +509,8 @@ void PictureLayerImpl::UpdateRasterSource(
|
| const PictureLayerTilingSet* pending_set) {
|
| // The bounds and the pile size may differ if the pile wasn't updated (ie.
|
| // PictureLayer::Update didn't happen). In that case the pile will be empty.
|
| - DCHECK_IMPLIES(!raster_source->GetSize().IsEmpty(),
|
| - bounds() == raster_source->GetSize())
|
| + DCHECK(raster_source->GetSize().IsEmpty() ||
|
| + (bounds() == raster_source->GetSize()))
|
| << " bounds " << bounds().ToString() << " pile "
|
| << raster_source->GetSize().ToString();
|
|
|
| @@ -525,9 +525,8 @@ void PictureLayerImpl::UpdateRasterSource(
|
| invalidation_.Swap(new_invalidation);
|
|
|
| bool can_have_tilings = CanHaveTilings();
|
| - DCHECK_IMPLIES(
|
| - pending_set,
|
| - can_have_tilings == GetPendingOrActiveTwinLayer()->CanHaveTilings());
|
| + DCHECK(!pending_set ||
|
| + (can_have_tilings == GetPendingOrActiveTwinLayer()->CanHaveTilings()));
|
|
|
| // Need to call UpdateTiles again if CanHaveTilings changed.
|
| if (could_have_tilings != can_have_tilings)
|
| @@ -757,8 +756,8 @@ void PictureLayerImpl::GetContentsResourceId(ResourceId* resource_id,
|
| gfx::Size* resource_size) const {
|
| // The bounds and the pile size may differ if the pile wasn't updated (ie.
|
| // PictureLayer::Update didn't happen). In that case the pile will be empty.
|
| - DCHECK_IMPLIES(!raster_source_->GetSize().IsEmpty(),
|
| - bounds() == raster_source_->GetSize())
|
| + DCHECK(raster_source_->GetSize().IsEmpty() ||
|
| + (bounds() == raster_source_->GetSize()))
|
| << " bounds " << bounds().ToString() << " pile "
|
| << raster_source_->GetSize().ToString();
|
| gfx::Rect content_rect(bounds());
|
|
|