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

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: Fixed layout test (and logged bug) Created 5 years, 1 month 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
Index: cc/blink/web_layer_impl.cc
diff --git a/cc/blink/web_layer_impl.cc b/cc/blink/web_layer_impl.cc
index b372408555996341e58d159004ff1aa765cdac73..798ca18bf0d94f1b1ee36250c24aca01517ea967 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"
@@ -28,6 +29,7 @@
#include "third_party/WebKit/public/platform/WebLayerClient.h"
#include "third_party/WebKit/public/platform/WebLayerPositionConstraint.h"
#include "third_party/WebKit/public/platform/WebLayerScrollClient.h"
+#include "third_party/WebKit/public/platform/WebMutableProperties.h"
#include "third_party/WebKit/public/platform/WebSize.h"
#include "third_party/skia/include/utils/SkMatrix44.h"
#include "ui/gfx/geometry/rect_conversions.h"
@@ -492,6 +494,33 @@ void WebLayerImpl::setWebLayerClient(blink::WebLayerClient* client) {
web_layer_client_ = client;
}
+void WebLayerImpl::setElementId(uint64_t id) {
+ layer_->SetElementId(id);
+}
+
+uint64_t WebLayerImpl::elementId() const {
+ return layer_->element_id();
+}
+
+void WebLayerImpl::setMutableProperties(uint32_t properties) {
+ uint32_t cc_properties = cc::kMutablePropertyNone;
+
+ if (properties & blink::WebMutablePropertyOpacity)
+ cc_properties |= cc::kMutablePropertyOpacity;
+ if (properties & blink::WebMutablePropertyScrollLeft)
+ cc_properties |= cc::kMutablePropertyScrollLeft;
+ if (properties & blink::WebMutablePropertyScrollTop)
+ cc_properties |= cc::kMutablePropertyScrollTop;
+ if (properties & blink::WebMutablePropertyTransform)
+ cc_properties |= cc::kMutablePropertyTransform;
+
+ layer_->SetMutableProperties(cc_properties);
+}
+
+uint32_t WebLayerImpl::mutableProperties() const {
+ return layer_->mutable_properties();
+}
+
class TracedDebugInfo : public base::trace_event::ConvertableToTraceFormat {
public:
// This object takes ownership of the debug_info object.

Powered by Google App Engine
This is Rietveld 408576698