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

Unified Diff: cc/layer_unittest.cc

Issue 11361223: cc: Remove cc::settings, move them to LayerTreeSettings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Using WebLayerTreeSettings for things WebKit can set Created 8 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/layer_unittest.cc
diff --git a/cc/layer_unittest.cc b/cc/layer_unittest.cc
index 6c26de5b4af26d846e1771352f665a08574f7452..08bbb6acf9b6236aae19889df613cdae169d40f0 100644
--- a/cc/layer_unittest.cc
+++ b/cc/layer_unittest.cc
@@ -8,12 +8,10 @@
#include "cc/layer_impl.h"
#include "cc/layer_painter.h"
#include "cc/layer_tree_host.h"
-#include "cc/settings.h"
#include "cc/single_thread_proxy.h"
#include "cc/thread.h"
#include "cc/test/fake_layer_tree_host_client.h"
#include "cc/test/geometry_test_utils.h"
-#include "cc/test/test_common.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include <public/WebTransformationMatrix.h>
@@ -548,17 +546,17 @@ TEST_F(LayerTest, verifyPushPropertiesAccumulatesUpdateRect)
class FakeLayerImplTreeHost : public LayerTreeHost {
public:
- static scoped_ptr<FakeLayerImplTreeHost> create()
+ static scoped_ptr<FakeLayerImplTreeHost> create(const LayerTreeSettings& settings = LayerTreeSettings())
{
- scoped_ptr<FakeLayerImplTreeHost> host(new FakeLayerImplTreeHost);
+ scoped_ptr<FakeLayerImplTreeHost> host(new FakeLayerImplTreeHost(settings));
// The initialize call will fail, since our client doesn't provide a valid GraphicsContext3D, but it doesn't matter in the tests that use this fake so ignore the return value.
host->initialize(scoped_ptr<Thread>(NULL));
return host.Pass();
}
private:
- FakeLayerImplTreeHost()
- : LayerTreeHost(&m_client, LayerTreeSettings())
+ FakeLayerImplTreeHost(const LayerTreeSettings& settings)
+ : LayerTreeHost(&m_client, settings)
{
}
@@ -758,15 +756,15 @@ TEST(LayerLayerTreeHostTest, shouldNotAddAnimationWithoutLayerTreeHost)
// layers cannot actually animate yet. So, to prevent violating this WebCore assumption,
// the animation should not be accepted if the layer doesn't already have a layerTreeHost.
- ScopedSettings scopedSettings;
- Settings::setAcceleratedAnimationEnabled(true);
+ LayerTreeSettings settings;
+ settings.acceleratedAnimationEnabled = true;
scoped_refptr<Layer> layer = Layer::create();
// Case 1: without a layerTreeHost, the animation should not be accepted.
EXPECT_FALSE(addTestAnimation(layer.get()));
- scoped_ptr<FakeLayerImplTreeHost> layerTreeHost(FakeLayerImplTreeHost::create());
+ scoped_ptr<FakeLayerImplTreeHost> layerTreeHost(FakeLayerImplTreeHost::create(settings));
layerTreeHost->setRootLayer(layer.get());
layer->setLayerTreeHost(layerTreeHost.get());
assertLayerTreeHostMatchesForSubtree(layer.get(), layerTreeHost.get());
« cc/layer_tree_host.cc ('K') | « cc/layer_tree_host_unittest.cc ('k') | cc/scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698