| Index: cc/trees/layer_tree_host_common.cc
|
| diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
|
| index 77b327b59b16814ecb6a4f7edc788ab83cb267f8..143969b8e50b1b50adf8e13934f8ae9e88a627e6 100644
|
| --- a/cc/trees/layer_tree_host_common.cc
|
| +++ b/cc/trees/layer_tree_host_common.cc
|
| @@ -243,11 +243,14 @@ gfx::Rect LayerTreeHostCommon::CalculateVisibleRect(
|
| target_surface_rect, layer_bound_rect, layer_in_surface_space, transform);
|
| }
|
|
|
| -template <typename LayerType>
|
| -static inline bool IsRootLayer(LayerType* layer) {
|
| +static inline bool IsRootLayer(const Layer* layer) {
|
| return !layer->parent();
|
| }
|
|
|
| +static inline bool IsRootLayer(const LayerImpl* layer) {
|
| + return layer->layer_tree_impl()->IsRootLayer(layer);
|
| +}
|
| +
|
| template <typename LayerType>
|
| static inline bool LayerIsInExisting3DRenderingContext(LayerType* layer) {
|
| return layer->Is3dSorted() && layer->parent() &&
|
| @@ -321,7 +324,7 @@ static bool LayerShouldBeSkipped(LayerImpl* layer,
|
|
|
| LayerImpl* backface_test_layer = layer;
|
| if (layer->use_parent_backface_visibility()) {
|
| - DCHECK(layer->parent());
|
| + DCHECK(!IsRootLayer(layer));
|
| DCHECK(!layer->parent()->use_parent_backface_visibility());
|
| backface_test_layer = layer->parent();
|
| }
|
| @@ -710,7 +713,7 @@ void CalculateRenderTarget(LayerImpl* layer,
|
| layer;
|
|
|
| } else {
|
| - DCHECK(layer->parent());
|
| + DCHECK(!IsRootLayer(layer));
|
| layer->draw_properties().render_target = layer->parent()->render_target();
|
| }
|
|
|
|
|