| Index: cc/layers/layer_impl.cc
|
| diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
|
| index 79e64aa079c96d774d44ad4d791ca9d51b37abd2..acbb21f75cbdaaefd50b1074f3ee10e18e00d31e 100644
|
| --- a/cc/layers/layer_impl.cc
|
| +++ b/cc/layers/layer_impl.cc
|
| @@ -61,7 +61,6 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id)
|
| force_render_surface_(false),
|
| transform_is_invertible_(true),
|
| is_container_for_fixed_position_layers_(false),
|
| - is_3d_sorted_(false),
|
| background_color_(0),
|
| opacity_(1.0),
|
| blend_mode_(SkXfermode::kSrcOver_Mode),
|
| @@ -248,7 +247,8 @@ void LayerImpl::PopulateSharedQuadState(SharedQuadState* state) const {
|
| draw_properties_.clip_rect,
|
| draw_properties_.is_clipped,
|
| draw_properties_.opacity,
|
| - blend_mode_);
|
| + blend_mode_,
|
| + draw_properties_.context_id);
|
| }
|
|
|
| bool LayerImpl::WillDraw(DrawMode draw_mode,
|
| @@ -516,7 +516,6 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
|
| is_container_for_fixed_position_layers_);
|
| layer->SetPositionConstraint(position_constraint_);
|
| layer->SetShouldFlattenTransform(should_flatten_transform_);
|
| - layer->SetIs3dSorted(is_3d_sorted_);
|
| layer->SetUseParentBackfaceVisibility(use_parent_backface_visibility_);
|
| layer->SetTransformAndInvertibility(transform_, transform_is_invertible_);
|
|
|
| @@ -527,6 +526,7 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
|
| layer->SetScrollOffsetAndDelta(
|
| scroll_offset_, layer->ScrollDelta() - layer->sent_scroll_delta());
|
| layer->SetSentScrollDelta(gfx::Vector2d());
|
| + layer->SetContextId(context_id());
|
|
|
| LayerImpl* scroll_parent = NULL;
|
| if (scroll_parent_) {
|
| @@ -635,7 +635,7 @@ base::DictionaryValue* LayerImpl::LayerTreeAsJson() const {
|
| result->Set("DrawTransform", list);
|
|
|
| result->SetBoolean("DrawsContent", draws_content_);
|
| - result->SetBoolean("Is3DSorted", is_3d_sorted_);
|
| + result->SetBoolean("Is3dSorted", Is3dSorted());
|
| result->SetDouble("Opacity", opacity());
|
| result->SetBoolean("ContentsOpaque", contents_opaque_);
|
|
|
| @@ -978,11 +978,10 @@ void LayerImpl::SetShouldFlattenTransform(bool flatten) {
|
| NoteLayerPropertyChangedForSubtree();
|
| }
|
|
|
| -void LayerImpl::SetIs3dSorted(bool sorted) {
|
| - if (is_3d_sorted_ == sorted)
|
| +void LayerImpl::SetContextId(int id) {
|
| + if ((id == 0 && context_id() == 0) || (id > 0 && context_id() > 0))
|
| return;
|
| -
|
| - is_3d_sorted_ = sorted;
|
| + draw_properties_.context_id = id;
|
| NoteLayerPropertyChangedForSubtree();
|
| }
|
|
|
|
|