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

Unified Diff: cc/trees/layer_tree_host_unittest_context.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_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_scroll.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_context.cc
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index f2349968947ab23fd76005e1da63941b5724c830..d80373d1cee6364cd5738cca84c0d58c6f688acc 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -5,7 +5,6 @@
#include "cc/trees/layer_tree_host.h"
#include "base/basictypes.h"
-#include "cc/base/thread_impl.h"
#include "cc/layers/content_layer.h"
#include "cc/layers/heads_up_display_layer.h"
#include "cc/layers/io_surface_layer.h"
@@ -135,7 +134,7 @@ class LayerTreeHostContextTest : public LayerTreeTest {
virtual scoped_refptr<cc::ContextProvider>
OffscreenContextProviderForMainThread() OVERRIDE {
- DCHECK(!ImplThread());
+ DCHECK(!HasImplThread());
if (!offscreen_contexts_main_thread_.get() ||
offscreen_contexts_main_thread_->DestroyedOnMainThread()) {
@@ -151,7 +150,7 @@ class LayerTreeHostContextTest : public LayerTreeTest {
virtual scoped_refptr<cc::ContextProvider>
OffscreenContextProviderForCompositorThread() OVERRIDE {
- DCHECK(ImplThread());
+ DCHECK(HasImplThread());
if (!offscreen_contexts_compositor_thread_.get() ||
offscreen_contexts_compositor_thread_->DestroyedOnMainThread()) {
@@ -829,8 +828,9 @@ class LayerTreeHostContextTestLostContextAndEvictTextures
}
void PostEvictTextures() {
- if (ImplThread()) {
- ImplThread()->PostTask(
+ if (HasImplThread()) {
+ ImplThreadTaskRunner()->PostTask(
+ FROM_HERE,
base::Bind(
&LayerTreeHostContextTestLostContextAndEvictTextures::
EvictTexturesOnImplThread,
@@ -1576,18 +1576,18 @@ class LayerTreeHostTestCannotCreateIfCannotCreateOutputSurface
bool delegating_renderer,
bool impl_side_painting) {
scoped_ptr<base::Thread> impl_thread;
- scoped_ptr<cc::Thread> impl_ccthread;
if (threaded) {
impl_thread.reset(new base::Thread("LayerTreeTest"));
- impl_ccthread = cc::ThreadImpl::CreateForDifferentThread(
- impl_thread->message_loop_proxy());
- ASSERT_TRUE(impl_ccthread);
+ ASSERT_TRUE(impl_thread->Start());
+ ASSERT_TRUE(impl_thread->message_loop_proxy());
}
LayerTreeSettings settings;
settings.impl_side_painting = impl_side_painting;
- scoped_ptr<LayerTreeHost> layer_tree_host =
- LayerTreeHost::Create(this, settings, impl_ccthread.Pass());
+ scoped_ptr<LayerTreeHost> layer_tree_host = LayerTreeHost::Create(
+ this,
+ settings,
+ impl_thread ? impl_thread->message_loop_proxy() : NULL);
EXPECT_FALSE(layer_tree_host);
}
};
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698