Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / cc / trees / layer_tree_host_common.h
index cd30b93..29a3c66 100644 (file)
@@ -32,7 +32,7 @@ class CC_EXPORT LayerTreeHostCommon {
   struct CalcDrawPropsInputs {
    public:
     CalcDrawPropsInputs(LayerType* root_layer,
-                        gfx::Size device_viewport_size,
+                        const gfx::Size& device_viewport_size,
                         const gfx::Transform& device_transform,
                         float device_scale_factor,
                         float page_scale_factor,
@@ -72,12 +72,12 @@ class CC_EXPORT LayerTreeHostCommon {
       : public CalcDrawPropsInputs<LayerType, RenderSurfaceLayerListType> {
     CalcDrawPropsInputsForTesting(
         LayerType* root_layer,
-        gfx::Size device_viewport_size,
+        const gfx::Size& device_viewport_size,
         const gfx::Transform& device_transform,
         RenderSurfaceLayerListType* render_surface_layer_list);
     CalcDrawPropsInputsForTesting(
         LayerType* root_layer,
-        gfx::Size device_viewport_size,
+        const gfx::Size& device_viewport_size,
         RenderSurfaceLayerListType* render_surface_layer_list);
 
    private:
@@ -122,21 +122,6 @@ class CC_EXPORT LayerTreeHostCommon {
   template <typename LayerType>
   static LayerType* FindLayerInSubtree(LayerType* root_layer, int layer_id);
 
-  // Applies the layer's sublayer transform about its anchor point to the
-  // given transform.
-  template <typename LayerType>
-  static void ApplySublayerTransformAboutAnchor(const LayerType& layer,
-                                                gfx::Size bounds,
-                                                gfx::Transform* transform) {
-    if (!layer.sublayer_transform().IsIdentity()) {
-      transform->Translate(layer.anchor_point().x() * bounds.width(),
-                           layer.anchor_point().y() * bounds.height());
-      transform->PreconcatTransform(layer.sublayer_transform());
-      transform->Translate(-layer.anchor_point().x() * bounds.width(),
-                           -layer.anchor_point().y() * bounds.height());
-    }
-  }
-
   static Layer* get_child_as_raw_ptr(
       const LayerList& children,
       size_t index) {
@@ -227,7 +212,7 @@ LayerTreeHostCommon::CalcDrawPropsInputsForTesting<LayerType,
                                                    RenderSurfaceLayerListType>::
     CalcDrawPropsInputsForTesting(
         LayerType* root_layer,
-        gfx::Size device_viewport_size,
+        const gfx::Size& device_viewport_size,
         const gfx::Transform& device_transform,
         RenderSurfaceLayerListType* render_surface_layer_list)
     : CalcDrawPropsInputs<LayerType, RenderSurfaceLayerListType>(
@@ -251,7 +236,7 @@ LayerTreeHostCommon::CalcDrawPropsInputsForTesting<LayerType,
                                                    RenderSurfaceLayerListType>::
     CalcDrawPropsInputsForTesting(
         LayerType* root_layer,
-        gfx::Size device_viewport_size,
+        const gfx::Size& device_viewport_size,
         RenderSurfaceLayerListType* render_surface_layer_list)
     : CalcDrawPropsInputs<LayerType, RenderSurfaceLayerListType>(
           root_layer,