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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 17114008: cc: Remove cc::Thread and cc::ThreadImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-thread: NULLrefptrs Created 7 years, 6 months 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
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)));
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698