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

Unified Diff: cc/blink/web_layer_impl.cc

Issue 1405993008: compositor-worker: plumb element id and mutable properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix rebase error. Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | cc/layers/layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/blink/web_layer_impl.cc
diff --git a/cc/blink/web_layer_impl.cc b/cc/blink/web_layer_impl.cc
index bde0bdf1925251f036aeeaffef70051c76fdd42e..cdf316036654040f0ef1228f7e002ece0b6885e5 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)
« no previous file with comments | « cc/blink/web_layer_impl.h ('k') | cc/layers/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698