| Index: cc/trees/layer_tree_host_unittest.cc
|
| diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
|
| index f4d245b8c706248f267069644382f40b93a61a60..c4fa9fe317210ed66e5489b03120247a30523da0 100644
|
| --- a/cc/trees/layer_tree_host_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_unittest.cc
|
| @@ -717,7 +717,7 @@ class LayerTreeHostTestFrameTimeUpdatesAfterDraw : public LayerTreeHostTest {
|
| // commit isn't required for updating the current frame time. We can
|
| // only check for this in the multi-threaded case, since in the single-
|
| // threaded case there will always be a commit between consecutive draws.
|
| - if (ImplThread())
|
| + if (HasImplThread())
|
| EXPECT_EQ(0, frame_);
|
| }
|
|
|
| @@ -1625,8 +1625,9 @@ class LayerTreeHostTestEvictTextures : public LayerTreeHostTest {
|
| }
|
|
|
| void PostEvictTextures() {
|
| - DCHECK(ImplThread());
|
| - ImplThread()->PostTask(
|
| + DCHECK(HasImplThread());
|
| + ImplThreadTaskRunner()->PostTask(
|
| + FROM_HERE,
|
| base::Bind(&LayerTreeHostTestEvictTextures::EvictTexturesOnImplThread,
|
| base::Unretained(this)));
|
| }
|
| @@ -1879,8 +1880,7 @@ TEST(LayerTreeHostTest, LimitPartialUpdates) {
|
| {
|
| FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
|
|
|
| - scoped_ptr<FakeProxy> proxy =
|
| - make_scoped_ptr(new FakeProxy(scoped_ptr<Thread>()));
|
| + scoped_ptr<FakeProxy> proxy(new FakeProxy);
|
| proxy->GetRendererCapabilities().allow_partial_texture_updates = false;
|
| proxy->SetMaxPartialTextureUpdates(5);
|
|
|
| @@ -1898,8 +1898,7 @@ TEST(LayerTreeHostTest, LimitPartialUpdates) {
|
| {
|
| FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
|
|
|
| - scoped_ptr<FakeProxy> proxy =
|
| - make_scoped_ptr(new FakeProxy(scoped_ptr<Thread>()));
|
| + scoped_ptr<FakeProxy> proxy(new FakeProxy);
|
| proxy->GetRendererCapabilities().allow_partial_texture_updates = true;
|
| proxy->SetMaxPartialTextureUpdates(5);
|
|
|
| @@ -1917,8 +1916,7 @@ TEST(LayerTreeHostTest, LimitPartialUpdates) {
|
| {
|
| FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
|
|
|
| - scoped_ptr<FakeProxy> proxy =
|
| - make_scoped_ptr(new FakeProxy(scoped_ptr<Thread>()));
|
| + scoped_ptr<FakeProxy> proxy(new FakeProxy);
|
| proxy->GetRendererCapabilities().allow_partial_texture_updates = true;
|
| proxy->SetMaxPartialTextureUpdates(20);
|
|
|
| @@ -1939,7 +1937,7 @@ TEST(LayerTreeHostTest, PartialUpdatesWithGLRenderer) {
|
| settings.max_partial_texture_updates = 4;
|
|
|
| scoped_ptr<LayerTreeHost> host =
|
| - LayerTreeHost::Create(&client, settings, scoped_ptr<Thread>());
|
| + LayerTreeHost::Create(&client, settings, NULL);
|
| EXPECT_TRUE(host->InitializeOutputSurfaceIfNeeded());
|
| EXPECT_EQ(4u, host->settings().max_partial_texture_updates);
|
| }
|
| @@ -1951,7 +1949,7 @@ TEST(LayerTreeHostTest, PartialUpdatesWithSoftwareRenderer) {
|
| settings.max_partial_texture_updates = 4;
|
|
|
| scoped_ptr<LayerTreeHost> host =
|
| - LayerTreeHost::Create(&client, settings, scoped_ptr<Thread>());
|
| + LayerTreeHost::Create(&client, settings, NULL);
|
| EXPECT_TRUE(host->InitializeOutputSurfaceIfNeeded());
|
| EXPECT_EQ(4u, host->settings().max_partial_texture_updates);
|
| }
|
| @@ -1963,7 +1961,7 @@ TEST(LayerTreeHostTest, PartialUpdatesWithDelegatingRendererAndGLContent) {
|
| settings.max_partial_texture_updates = 4;
|
|
|
| scoped_ptr<LayerTreeHost> host =
|
| - LayerTreeHost::Create(&client, settings, scoped_ptr<Thread>());
|
| + LayerTreeHost::Create(&client, settings, NULL);
|
| EXPECT_TRUE(host->InitializeOutputSurfaceIfNeeded());
|
| EXPECT_EQ(0u, host->settings().max_partial_texture_updates);
|
| }
|
| @@ -1976,7 +1974,7 @@ TEST(LayerTreeHostTest,
|
| settings.max_partial_texture_updates = 4;
|
|
|
| scoped_ptr<LayerTreeHost> host =
|
| - LayerTreeHost::Create(&client, settings, scoped_ptr<Thread>());
|
| + LayerTreeHost::Create(&client, settings, NULL);
|
| EXPECT_TRUE(host->InitializeOutputSurfaceIfNeeded());
|
| EXPECT_EQ(0u, host->settings().max_partial_texture_updates);
|
| }
|
| @@ -2257,9 +2255,10 @@ class LayerTreeHostTestBeginFrameNotificationShutdownWhileEnabled
|
| virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
|
| // The BeginFrame notification is turned off now but will get enabled
|
| // once we return. End test while it's enabled.
|
| - ImplThread()->PostTask(base::Bind(
|
| - &LayerTreeHostTestBeginFrameNotification::EndTest,
|
| - base::Unretained(this)));
|
| + ImplThreadTaskRunner()->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&LayerTreeHostTestBeginFrameNotification::EndTest,
|
| + base::Unretained(this)));
|
| }
|
|
|
| virtual void AfterTest() OVERRIDE {}
|
| @@ -2827,7 +2826,7 @@ class LayerTreeHostTestDeferredInitialize : public LayerTreeHostTest {
|
| static_cast<FakePictureLayerImpl*>(host_impl->RootLayer());
|
| if (!initialized_gl_) {
|
| EXPECT_EQ(1u, layer_impl->append_quads_count());
|
| - ImplThread()->PostTask(base::Bind(
|
| + ImplThreadTaskRunner()->PostTask(FROM_HERE, base::Bind(
|
| &LayerTreeHostTestDeferredInitialize::DeferredInitializeAndRedraw,
|
| base::Unretained(this),
|
| base::Unretained(host_impl)));
|
|
|