| 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_;
|
|
|