Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: cc/layers/layer_impl_test_properties.cc

Issue 2615773003: Replace LayerImpl::sorting_context_id with transform reference. (Closed)
Patch Set: Update tests. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/layer_impl_test_properties.h" 5 #include "cc/layers/layer_impl_test_properties.h"
6 6
7 #include "cc/layers/layer_impl.h" 7 #include "cc/layers/layer_impl.h"
8 #include "cc/output/copy_output_request.h" 8 #include "cc/output/copy_output_request.h"
9 #include "cc/trees/layer_tree_impl.h" 9 #include "cc/trees/layer_tree_impl.h"
10 10
11 namespace cc { 11 namespace cc {
12 12
13 LayerImplTestProperties::LayerImplTestProperties(LayerImpl* owning_layer) 13 LayerImplTestProperties::LayerImplTestProperties(LayerImpl* owning_layer)
14 : owning_layer(owning_layer), 14 : owning_layer(owning_layer),
15 double_sided(true), 15 double_sided(true),
16 force_render_surface(false), 16 force_render_surface(false),
17 is_container_for_fixed_position_layers(false), 17 is_container_for_fixed_position_layers(false),
18 should_flatten_transform(true), 18 should_flatten_transform(true),
19 hide_layer_and_subtree(false), 19 hide_layer_and_subtree(false),
20 opacity_can_animate(false), 20 opacity_can_animate(false),
21 num_descendants_that_draw_content(0), 21 num_descendants_that_draw_content(0),
22 sorting_context_id(0),
22 num_unclipped_descendants(0), 23 num_unclipped_descendants(0),
23 opacity(1.f), 24 opacity(1.f),
24 blend_mode(SkBlendMode::kSrcOver), 25 blend_mode(SkBlendMode::kSrcOver),
25 scroll_parent(nullptr), 26 scroll_parent(nullptr),
26 clip_parent(nullptr), 27 clip_parent(nullptr),
27 mask_layer(nullptr), 28 mask_layer(nullptr),
28 parent(nullptr) {} 29 parent(nullptr) {}
29 30
30 LayerImplTestProperties::~LayerImplTestProperties() {} 31 LayerImplTestProperties::~LayerImplTestProperties() {}
31 32
(...skipping 18 matching lines...) Expand all
50 51
51 void LayerImplTestProperties::SetMaskLayer(std::unique_ptr<LayerImpl> mask) { 52 void LayerImplTestProperties::SetMaskLayer(std::unique_ptr<LayerImpl> mask) {
52 if (mask_layer) 53 if (mask_layer)
53 owning_layer->layer_tree_impl()->RemoveLayer(mask_layer->id()); 54 owning_layer->layer_tree_impl()->RemoveLayer(mask_layer->id());
54 mask_layer = mask.get(); 55 mask_layer = mask.get();
55 if (mask) 56 if (mask)
56 owning_layer->layer_tree_impl()->AddLayer(std::move(mask)); 57 owning_layer->layer_tree_impl()->AddLayer(std::move(mask));
57 } 58 }
58 59
59 } // namespace cc 60 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698