Chromium Code Reviews| Index: cc/layers/layer_impl.cc |
| diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc |
| index 894daf1a27f04cd2b40dfc70436b806af3e59d65..32a8b6021d0f4ea583d8bdad92914216f3bcb923 100644 |
| --- a/cc/layers/layer_impl.cc |
| +++ b/cc/layers/layer_impl.cc |
| @@ -51,6 +51,8 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id) |
| masks_to_bounds_(false), |
| contents_opaque_(false), |
| opacity_(1.0), |
| + blend_mode_(SkXfermode::kSrcOver_Mode), |
| + is_root_for_isolated_group_(false), |
| preserves_3d_(false), |
| use_parent_backface_visibility_(false), |
| draw_checkerboard_for_missing_tiles_(false), |
| @@ -244,7 +246,8 @@ scoped_ptr<SharedQuadState> LayerImpl::CreateSharedQuadState() const { |
| draw_properties_.visible_content_rect, |
| draw_properties_.clip_rect, |
| draw_properties_.is_clipped, |
| - draw_properties_.opacity); |
| + draw_properties_.opacity, |
| + blend_mode_); |
| return state.Pass(); |
| } |
| @@ -522,6 +525,8 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) { |
| layer->SetTouchEventHandlerRegion(touch_event_handler_region_); |
| layer->SetContentsOpaque(contents_opaque_); |
| layer->SetOpacity(opacity_); |
| + layer->SetBlendMode(blend_mode_); |
| + layer->SetIsRootForIsolatedGroup(is_root_for_isolated_group_); |
| layer->SetPosition(position_); |
| layer->SetIsContainerForFixedPositionLayers( |
| is_container_for_fixed_position_layers_); |
| @@ -876,6 +881,21 @@ bool LayerImpl::OpacityIsAnimatingOnImplOnly() const { |
| return opacity_animation && opacity_animation->is_impl_only(); |
| } |
| +void LayerImpl::SetBlendMode(SkXfermode::Mode blend_mode) { |
|
danakj
2013/11/13 21:02:03
Can you add these 2 new Set* methods to layer_impl
rosca
2013/11/14 21:56:34
Done.
|
| + if (blend_mode_ == blend_mode) |
| + return; |
| + |
| + blend_mode_ = blend_mode; |
| + NoteLayerPropertyChangedForSubtree(); |
| +} |
| + |
| +void LayerImpl::SetIsRootForIsolatedGroup(bool root) { |
| + if (is_root_for_isolated_group_ == root) |
| + return; |
| + |
| + is_root_for_isolated_group_ = root; |
|
danakj
2013/11/13 21:02:03
It seems to be this should be causing damage. If t
rosca
2013/11/14 21:56:34
I think it would be more accurate to call NoteLaye
danakj
2013/11/20 03:32:50
I'd like enne@ to double check this. I would expec
|
| +} |
| + |
| void LayerImpl::SetPosition(gfx::PointF position) { |
| if (position_ == position) |
| return; |
| @@ -1277,6 +1297,9 @@ CompositingReasonsAsValue(CompositingReasons reasons) { |
| if (reasons & kCompositingReasonOutOfFlowClipping) |
| reason_list->AppendString("Has clipping ancestor"); |
| + if (reasons & kCompositingReasonIsolateCompositedDescendants) |
| + reason_list->AppendString("Should isolate composited descendants"); |
| + |
| return reason_list.PassAs<base::Value>(); |
| } |