Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / cc / layers / layer_perftest.cc
index 04ce82c..6df6cfd 100644 (file)
@@ -4,12 +4,12 @@
 
 #include "cc/layers/layer.h"
 
+#include "cc/debug/lap_timer.h"
 #include "cc/resources/layer_painter.h"
 #include "cc/test/fake_impl_proxy.h"
 #include "cc/test/fake_layer_tree_host.h"
 #include "cc/test/fake_layer_tree_host_client.h"
 #include "cc/test/fake_layer_tree_host_impl.h"
-#include "cc/test/lap_timer.h"
 
 #include "testing/gtest/include/gtest/gtest.h"
 #include "testing/perf/perf_test.h"
@@ -32,7 +32,7 @@ class MockLayerPainter : public LayerPainter {
 class LayerPerfTest : public testing::Test {
  public:
   LayerPerfTest()
-      : host_impl_(&proxy_),
+      : host_impl_(&proxy_, &shared_bitmap_manager_),
         fake_client_(FakeLayerTreeHostClient::DIRECT_3D),
         timer_(kWarmupRuns,
                base::TimeDelta::FromMilliseconds(kTimeLimitMillis),
@@ -41,7 +41,8 @@ class LayerPerfTest : public testing::Test {
  protected:
   virtual void SetUp() OVERRIDE {
     layer_tree_host_ = FakeLayerTreeHost::Create();
-    layer_tree_host_->InitializeSingleThreaded(&fake_client_);
+    layer_tree_host_->InitializeSingleThreaded(
+        &fake_client_, base::MessageLoopProxy::current());
   }
 
   virtual void TearDown() OVERRIDE {
@@ -50,6 +51,7 @@ class LayerPerfTest : public testing::Test {
   }
 
   FakeImplProxy proxy_;
+  TestSharedBitmapManager shared_bitmap_manager_;
   FakeLayerTreeHostImpl host_impl_;
 
   FakeLayerTreeHostClient fake_client_;
@@ -64,7 +66,7 @@ TEST_F(LayerPerfTest, PushPropertiesTo) {
 
   layer_tree_host_->SetRootLayer(test_layer);
 
-  float anchor_point_z = 0;
+  float transform_origin_z = 0;
   bool scrollable = true;
   bool contents_opaque = true;
   bool double_sided = true;
@@ -75,7 +77,7 @@ TEST_F(LayerPerfTest, PushPropertiesTo) {
   timer_.Reset();
   do {
     test_layer->SetNeedsDisplayRect(gfx::RectF(0.f, 0.f, 5.f, 5.f));
-    test_layer->SetAnchorPointZ(anchor_point_z);
+    test_layer->SetTransformOrigin(gfx::Point3F(0.f, 0.f, transform_origin_z));
     test_layer->SetContentsOpaque(contents_opaque);
     test_layer->SetDoubleSided(double_sided);
     test_layer->SetHideLayerAndSubtree(hide_layer_and_subtree);
@@ -84,7 +86,7 @@ TEST_F(LayerPerfTest, PushPropertiesTo) {
                                                 : Layer::INVALID_ID);
     test_layer->PushPropertiesTo(impl_layer.get());
 
-    anchor_point_z += 0.01f;
+    transform_origin_z += 0.01f;
     scrollable = !scrollable;
     contents_opaque = !contents_opaque;
     double_sided = !double_sided;