Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / webkit / renderer / compositor_bindings / web_layer_impl.cc
index 7c12480..0cac5f9 100644 (file)
@@ -14,6 +14,7 @@
 #include "cc/base/switches.h"
 #include "cc/layers/layer.h"
 #include "cc/layers/layer_position_constraint.h"
+#include "cc/trees/layer_tree_host.h"
 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
 #include "third_party/WebKit/public/platform/WebFloatRect.h"
 #include "third_party/WebKit/public/platform/WebGraphicsLayerDebugInfo.h"
@@ -161,16 +162,6 @@ void WebLayerImpl::setPosition(const WebFloatPoint& position) {
 
 WebFloatPoint WebLayerImpl::position() const { return layer_->position(); }
 
-void WebLayerImpl::setSublayerTransform(const SkMatrix44& matrix) {
-  gfx::Transform sub_layer_transform;
-  sub_layer_transform.matrix() = matrix;
-  layer_->SetSublayerTransform(sub_layer_transform);
-}
-
-SkMatrix44 WebLayerImpl::sublayerTransform() const {
-  return layer_->sublayer_transform().matrix();
-}
-
 void WebLayerImpl::setTransform(const SkMatrix44& matrix) {
   gfx::Transform transform;
   transform.matrix() = matrix;
@@ -187,8 +178,12 @@ void WebLayerImpl::setDrawsContent(bool draws_content) {
 
 bool WebLayerImpl::drawsContent() const { return layer_->DrawsContent(); }
 
-void WebLayerImpl::setPreserves3D(bool preserve3D) {
-  layer_->SetPreserves3d(preserve3D);
+void WebLayerImpl::setShouldFlattenTransform(bool flatten) {
+  layer_->SetShouldFlattenTransform(flatten);
+}
+
+void WebLayerImpl::setRenderingContext(int context) {
+  layer_->SetIs3dSorted(context != 0);
 }
 
 void WebLayerImpl::setUseParentBackfaceVisibility(
@@ -260,16 +255,14 @@ blink::WebPoint WebLayerImpl::scrollPosition() const {
   return gfx::PointAtOffsetFromOrigin(layer_->scroll_offset());
 }
 
-void WebLayerImpl::setMaxScrollPosition(WebSize max_scroll_position) {
-  layer_->SetMaxScrollOffset(max_scroll_position);
-}
-
 WebSize WebLayerImpl::maxScrollPosition() const {
-  return layer_->max_scroll_offset();
+  return layer_->MaxScrollOffset();
 }
 
-void WebLayerImpl::setScrollable(bool scrollable) {
-  layer_->SetScrollable(scrollable);
+void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) {
+  cc::Layer* cc_clip_layer =
+      clip_layer ? static_cast<WebLayerImpl*>(clip_layer)->layer() : 0;
+  layer_->SetScrollClipLayerId(cc_clip_layer->id());
 }
 
 bool WebLayerImpl::scrollable() const { return layer_->scrollable(); }