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

Unified Diff: content/child/blink_platform_impl.h

Issue 1449953002: compositor-worker: Refactor CompositorWorkerManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add documentation and ASSERTS for some subtleties. Created 5 years 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
Index: content/child/blink_platform_impl.h
diff --git a/content/child/blink_platform_impl.h b/content/child/blink_platform_impl.h
index 56382346ca266f1eec6601700a60b11c581ad19b..b6850f240182a02f202f9a11d9fe730c57b76dce 100644
--- a/content/child/blink_platform_impl.h
+++ b/content/child/blink_platform_impl.h
@@ -30,6 +30,11 @@
namespace base {
class MessageLoop;
+class WaitableEvent;
+}
+
+namespace scheduler {
+class WebThreadBase;
}
namespace content {
@@ -172,6 +177,7 @@ class CONTENT_EXPORT BlinkPlatformImpl
double systemTraceTime() override;
void cryptographicallyRandomValues(unsigned char* buffer,
size_t length) override;
+ blink::WebThread* compositorThread() const override;
blink::WebGestureCurve* createFlingAnimationCurve(
blink::WebGestureDevice device_source,
const blink::WebFloatPoint& velocity,
@@ -192,9 +198,20 @@ class CONTENT_EXPORT BlinkPlatformImpl
blink::WebString domKeyStringFromEnum(int dom_key) override;
int domKeyEnumFromString(const blink::WebString& key_string) override;
+ scoped_ptr<scheduler::WebThreadBase> createThreadWithOptions(
+ const char* name,
+ base::Thread::Options);
+
+ // This class does *not* own |compositor_thread|. It is the responsibility of
+ // the caller to ensure that the compositor thread is cleared before it is
+ // destructed.
+ void set_compositor_thread(scheduler::WebThreadBase* compositor_thread) {
+ compositor_thread_ = compositor_thread;
+ }
+
private:
void InternalInit();
- void UpdateWebThreadTLS(blink::WebThread* thread);
+ void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event);
bool IsMainThread() const;
@@ -216,6 +233,8 @@ class CONTENT_EXPORT BlinkPlatformImpl
scoped_refptr<PushDispatcher> push_dispatcher_;
scoped_ptr<PermissionDispatcher> permission_client_;
scoped_ptr<BackgroundSyncProvider> main_thread_sync_provider_;
+
+ scheduler::WebThreadBase* compositor_thread_;
};
} // namespace content
« no previous file with comments | « components/scheduler/child/webthread_impl_for_worker_scheduler.cc ('k') | content/child/blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698