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

Unified Diff: cc/trees/proxy.h

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_scroll.cc ('k') | cc/trees/proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/proxy.h
diff --git a/cc/trees/proxy.h b/cc/trees/proxy.h
index 4e6171c3e1c27fa0159846e6cf13ffceaf886fcc..38cdbc7c692472b602ba310eb66b9afbdfd36f95 100644
--- a/cc/trees/proxy.h
+++ b/cc/trees/proxy.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/time.h"
#include "base/values.h"
@@ -16,6 +17,8 @@
#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkPicture.h"
+namespace base { class SingleThreadTaskRunner; }
+
namespace gfx {
class Rect;
class Vector2d;
@@ -24,20 +27,15 @@ class Vector2d;
namespace cc {
class OutputSurface;
-class Thread;
struct RendererCapabilities;
// Abstract class responsible for proxying commands from the main-thread side of
// the compositor over to the compositor implementation.
class CC_EXPORT Proxy {
public:
- Thread* MainThread() const;
+ base::SingleThreadTaskRunner* MainThreadTaskRunner() const;
bool HasImplThread() const;
- Thread* ImplThread() const;
-
- // Returns 0 if the current thread is neither the main thread nor the impl
- // thread.
- Thread* CurrentThread() const;
+ base::SingleThreadTaskRunner* ImplThreadTaskRunner() const;
// Debug hooks.
bool IsMainThread() const;
@@ -103,14 +101,15 @@ class CC_EXPORT Proxy {
virtual std::string SchedulerStateAsStringForTesting();
protected:
- explicit Proxy(scoped_ptr<Thread> impl_thread);
+ explicit Proxy(
+ scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
friend class DebugScopedSetImplThread;
friend class DebugScopedSetMainThread;
friend class DebugScopedSetMainThreadBlocked;
private:
- scoped_ptr<Thread> main_thread_;
- scoped_ptr<Thread> impl_thread_;
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
+ scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_;
#ifndef NDEBUG
bool impl_thread_is_overridden_;
bool is_main_thread_blocked_;
« no previous file with comments | « cc/trees/layer_tree_host_unittest_scroll.cc ('k') | cc/trees/proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698