summaryrefslogtreecommitdiffstats
path: root/cc/blink
diff options
context:
space:
mode:
authorvollick <vollick@chromium.org>2015-12-07 20:22:05 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-08 04:23:18 +0000
commit933f496ec9750765871f21d74a3c48eb23c5eb86 (patch)
tree1da051a81504936113d1f5cc86b05db77d57a6cf /cc/blink
parentdedc32f56dcaf281c79354958636b0067c04a627 (diff)
downloadchromium_src-933f496ec9750765871f21d74a3c48eb23c5eb86.zip
chromium_src-933f496ec9750765871f21d74a3c48eb23c5eb86.tar.gz
chromium_src-933f496ec9750765871f21d74a3c48eb23c5eb86.tar.bz2
compositor-worker: plumb element id and mutable properties
For proxied elements, this CL ensures that the element id and mutable property bitfield are propagated to the compositor. BUG=430155 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1405993008 Cr-Commit-Position: refs/heads/master@{#363737}
Diffstat (limited to 'cc/blink')
-rw-r--r--cc/blink/web_layer_impl.cc47
-rw-r--r--cc/blink/web_layer_impl.h4
2 files changed, 51 insertions, 0 deletions
diff --git a/cc/blink/web_layer_impl.cc b/cc/blink/web_layer_impl.cc
index bde0bdf..cdf3160 100644
--- a/cc/blink/web_layer_impl.cc
+++ b/cc/blink/web_layer_impl.cc
@@ -13,6 +13,7 @@
#include "base/threading/thread_checker.h"
#include "base/trace_event/trace_event_impl.h"
#include "cc/animation/animation.h"
+#include "cc/animation/mutable_properties.h"
#include "cc/base/region.h"
#include "cc/base/switches.h"
#include "cc/blink/web_animation_impl.h"
@@ -23,6 +24,7 @@
#include "cc/layers/layer_position_constraint.h"
#include "cc/layers/layer_settings.h"
#include "cc/trees/layer_tree_host.h"
+#include "third_party/WebKit/public/platform/WebCompositorMutableProperties.h"
#include "third_party/WebKit/public/platform/WebFloatPoint.h"
#include "third_party/WebKit/public/platform/WebFloatRect.h"
#include "third_party/WebKit/public/platform/WebLayerPositionConstraint.h"
@@ -494,6 +496,51 @@ const cc::Layer* WebLayerImpl::ccLayer() const {
return layer_.get();
}
+void WebLayerImpl::setElementId(uint64_t id) {
+ layer_->SetElementId(id);
+}
+
+uint64_t WebLayerImpl::elementId() const {
+ return layer_->element_id();
+}
+
+static_assert(
+ static_cast<cc::MutableProperty>(blink::WebCompositorMutablePropertyNone) ==
+ cc::kMutablePropertyNone,
+ "MutableProperty and WebCompositorMutableProperty enums must match");
+
+static_assert(
+ static_cast<cc::MutableProperty>(
+ blink::WebCompositorMutablePropertyOpacity) ==
+ cc::kMutablePropertyOpacity,
+ "MutableProperty and WebCompositorMutableProperty enums must match");
+
+static_assert(
+ static_cast<cc::MutableProperty>(
+ blink::WebCompositorMutablePropertyScrollLeft) ==
+ cc::kMutablePropertyScrollLeft,
+ "MutableProperty and WebCompositorMutableProperty enums must match");
+
+static_assert(
+ static_cast<cc::MutableProperty>(
+ blink::WebCompositorMutablePropertyScrollTop) ==
+ cc::kMutablePropertyScrollTop,
+ "MutableProperty and WebCompositorMutableProperty enums must match");
+
+static_assert(
+ static_cast<cc::MutableProperty>(
+ blink::WebCompositorMutablePropertyTransform) ==
+ cc::kMutablePropertyTransform,
+ "MutableProperty and WebCompositorMutableProperty enums must match");
+
+void WebLayerImpl::setCompositorMutableProperties(uint32_t properties) {
+ layer_->SetMutableProperties(properties);
+}
+
+uint32_t WebLayerImpl::compositorMutableProperties() const {
+ return layer_->mutable_properties();
+}
+
void WebLayerImpl::setScrollParent(blink::WebLayer* parent) {
cc::Layer* scroll_parent = nullptr;
if (parent)
diff --git a/cc/blink/web_layer_impl.h b/cc/blink/web_layer_impl.h
index eb5be7e..e642915 100644
--- a/cc/blink/web_layer_impl.h
+++ b/cc/blink/web_layer_impl.h
@@ -147,6 +147,10 @@ class WebLayerImpl : public blink::WebLayer {
bool isOrphan() const override;
void setLayerClient(cc::LayerClient* client) override;
const cc::Layer* ccLayer() const override;
+ void setElementId(uint64_t id) override;
+ uint64_t elementId() const override;
+ void setCompositorMutableProperties(uint32_t properties) override;
+ uint32_t compositorMutableProperties() const override;
void setScrollParent(blink::WebLayer* parent) override;
void setClipParent(blink::WebLayer* parent) override;