Index: cc/layers/layer.cc |
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc |
index 7d683bd2c065be64c7ef417a403d8abb4a18e9d6..7c19d2a4a1769cd0bb2f63b7375e97d8dc43043e 100644 |
--- a/cc/layers/layer.cc |
+++ b/cc/layers/layer.cc |
@@ -95,6 +95,7 @@ Layer::Layer() |
force_render_surface_for_testing_(false), |
subtree_property_changed_(false), |
layer_property_changed_(false), |
+ may_contain_video_(false), |
safe_opaque_background_color_(0), |
draw_blend_mode_(SkXfermode::kSrcOver_Mode), |
num_unclipped_descendants_(0) {} |
@@ -1144,6 +1145,7 @@ void Layer::PushPropertiesTo(LayerImpl* layer) { |
// property trees. So, it is enough to check it only for the current layer. |
if (subtree_property_changed_ || layer_property_changed_) |
layer->NoteLayerPropertyChanged(); |
+ layer->set_may_contain_video(may_contain_video_); |
layer->SetMasksToBounds(inputs_.masks_to_bounds); |
layer->set_main_thread_scrolling_reasons( |
inputs_.main_thread_scrolling_reasons); |
@@ -1598,6 +1600,13 @@ void Layer::SetLayerPropertyChanged() { |
SetNeedsPushProperties(); |
} |
+void Layer::SetMayContainVideo(bool yes) { |
+ if (may_contain_video_ == yes) |
+ return; |
+ may_contain_video_ = yes; |
+ SetNeedsPushProperties(); |
+} |
+ |
bool Layer::FilterIsAnimating() const { |
return GetAnimationHost()->IsAnimatingFilterProperty( |
element_id(), GetElementTypeForAnimation()); |