summaryrefslogtreecommitdiffstats
path: root/cc/layers
diff options
context:
space:
mode:
authorvollick <vollick@chromium.org>2016-01-22 11:13:29 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-22 19:15:16 +0000
commitfd6e4f4a7a3f166de9d2fbc89770b4f2eb90272f (patch)
tree1f8fca4ee6c31d1247fe57532f1abfba3a0a3f52 /cc/layers
parent3537f56b3e87d722b1e7caa3d996874f3199f750 (diff)
downloadchromium_src-fd6e4f4a7a3f166de9d2fbc89770b4f2eb90272f.zip
chromium_src-fd6e4f4a7a3f166de9d2fbc89770b4f2eb90272f.tar.gz
chromium_src-fd6e4f4a7a3f166de9d2fbc89770b4f2eb90272f.tar.bz2
compositor-worker: Remove code from cc_blink
In this CL, the compositor worker code in cc_blink has been removed, mostly by moving it into Source/platform/graphics, a more natural home for compositor-related stuff. An additional benefit is that much of the code in public/platform/ is unnecessary now. It was there only so that it could be implemented by classes in cc_blink. There was a wrinkle when moving the test: the cc test machinery expected a base::MessageLoop to have been constructed to work. This violated the current DEPS rules for platform/graphics. I did try to remove this dependency, but the code is quite coupled and the refactor was not only large, it resulted in more complex code in cc. Since platform is in general allowed to talk to base, it seemed more reasonable to update the DEPS in platform/graphics/ to allow the use of message_loop.h in tests. BUG=430155 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1599673002 Cr-Commit-Position: refs/heads/master@{#371006}
Diffstat (limited to 'cc/layers')
-rw-r--r--cc/layers/layer.cc2
-rw-r--r--cc/layers/layer_impl.cc4
-rw-r--r--cc/layers/layer_impl_unittest.cc4
-rw-r--r--cc/layers/layer_unittest.cc8
4 files changed, 9 insertions, 9 deletions
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 68e153f..2519daa 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -66,7 +66,7 @@ Layer::Layer(const LayerSettings& settings)
clip_tree_index_(-1),
property_tree_sequence_number_(-1),
element_id_(0),
- mutable_properties_(kMutablePropertyNone),
+ mutable_properties_(MutableProperty::kNone),
main_thread_scrolling_reasons_(
MainThreadScrollingReason::kNotScrollingOnMain),
should_flatten_transform_from_property_tree_(false),
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 540de09..57b62f8 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -94,7 +94,7 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl,
sorting_context_id_(0),
current_draw_mode_(DRAW_MODE_NONE),
element_id_(0),
- mutable_properties_(kMutablePropertyNone),
+ mutable_properties_(MutableProperty::kNone),
force_render_surface_(false),
frame_timing_requests_dirty_(false),
visited_(false),
@@ -1720,7 +1720,7 @@ void LayerImpl::AsValueInto(base::trace_event::TracedValue* state) const {
state->SetInteger("gpu_memory_usage",
base::saturated_cast<int>(GPUMemoryUsageInBytes()));
- if (mutable_properties_ != kMutablePropertyNone) {
+ if (mutable_properties_ != MutableProperty::kNone) {
state->SetInteger("element_id", base::saturated_cast<int>(element_id_));
state->SetInteger("mutable_properties", mutable_properties_);
}
diff --git a/cc/layers/layer_impl_unittest.cc b/cc/layers/layer_impl_unittest.cc
index b9fb767..496f4ff 100644
--- a/cc/layers/layer_impl_unittest.cc
+++ b/cc/layers/layer_impl_unittest.cc
@@ -207,7 +207,7 @@ TEST(LayerImplTest, VerifyLayerChangesAreTrackedProperly) {
EXECUTE_AND_VERIFY_NEEDS_PUSH_PROPERTIES_AND_SUBTREE_DID_NOT_CHANGE(
root->SetElementId(2));
EXECUTE_AND_VERIFY_NEEDS_PUSH_PROPERTIES_AND_SUBTREE_DID_NOT_CHANGE(
- root->SetMutableProperties(kMutablePropertyOpacity));
+ root->SetMutableProperties(MutableProperty::kOpacity));
EXECUTE_AND_VERIFY_NEEDS_PUSH_PROPERTIES_AND_SUBTREE_DID_NOT_CHANGE(
root->SetScrollParent(scroll_parent.get()));
EXECUTE_AND_VERIFY_NEEDS_PUSH_PROPERTIES_AND_SUBTREE_DID_NOT_CHANGE(
@@ -385,7 +385,7 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) {
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBounds(arbitrary_size));
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetElementId(2));
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(
- layer->SetMutableProperties(kMutablePropertyTransform));
+ layer->SetMutableProperties(MutableProperty::kTransform));
}
TEST(LayerImplTest, SafeOpaqueBackgroundColor) {
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index 226b997..5b48056 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -984,7 +984,7 @@ TEST_F(LayerTest, CheckPropertyChangeCausesCorrectBehavior) {
EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHideLayerAndSubtree(true));
EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetElementId(2));
EXPECT_SET_NEEDS_COMMIT(
- 1, test_layer->SetMutableProperties(kMutablePropertyTransform));
+ 1, test_layer->SetMutableProperties(MutableProperty::kTransform));
EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetMaskLayer(
dummy_layer1.get()));
@@ -2125,15 +2125,15 @@ TEST_F(LayerTest, ElementIdAndMutablePropertiesArePushed) {
EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(2);
test_layer->SetElementId(2);
- test_layer->SetMutableProperties(kMutablePropertyTransform);
+ test_layer->SetMutableProperties(MutableProperty::kTransform);
EXPECT_EQ(0lu, impl_layer->element_id());
- EXPECT_EQ(kMutablePropertyNone, impl_layer->mutable_properties());
+ EXPECT_EQ(MutableProperty::kNone, impl_layer->mutable_properties());
test_layer->PushPropertiesTo(impl_layer.get());
EXPECT_EQ(2lu, impl_layer->element_id());
- EXPECT_EQ(kMutablePropertyTransform, impl_layer->mutable_properties());
+ EXPECT_EQ(MutableProperty::kTransform, impl_layer->mutable_properties());
}
} // namespace