diff options
author | skyostil <skyostil@chromium.org> | 2014-09-04 15:07:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-04 22:13:39 +0000 |
commit | 3976a3f8509145051ff2865ccba0fffe79fe32e6 (patch) | |
tree | ca45dac492bdae25c13c97f906eb23fec2455f3b /cc/layers/texture_layer_impl.h | |
parent | d8988a18cf52f4cfc146a5a57251bfa6cd4ef8f6 (diff) | |
download | chromium_src-3976a3f8509145051ff2865ccba0fffe79fe32e6.zip chromium_src-3976a3f8509145051ff2865ccba0fffe79fe32e6.tar.gz chromium_src-3976a3f8509145051ff2865ccba0fffe79fe32e6.tar.bz2 |
cc: Use correct message loop proxy in BlockingTaskRunner
The compositor makes it possible to customize the message loop proxy
both on the main and impl threads. However BlockingTaskRunner just uses
base::MessageLoopProxy::current() directly and thus overrides this
choice. Using the correct message loop proxy is important because
clients of BlockingTaskRunner have an implicit dependency on the
ordering of tasks posted to BlockingTaskRunner vs. all other tasks
posted to the task runner for that same thread.
This patch fixes the problem by removing the thread-local
BlockingTaskRunner::current() instance in favor of an explicitly
constructed instance which is given a specific SingleThreadTaskRunner
to use. The resource provider is changed to pass a Proxy-owned
blocking task runner to the clients which need one.
BUG=391005
TEST=1. Apply https://codereview.chromium.org/363383002
2. out/Debug/chrome --disable-impl-side-painting --ignore-gpu-blacklist tools/perf/page_sets/tough_scheduling_cases/raf_canvas.html
Review URL: https://codereview.chromium.org/485043003
Cr-Commit-Position: refs/heads/master@{#293353}
Diffstat (limited to 'cc/layers/texture_layer_impl.h')
-rw-r--r-- | cc/layers/texture_layer_impl.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cc/layers/texture_layer_impl.h b/cc/layers/texture_layer_impl.h index 241fde8..9edf099 100644 --- a/cc/layers/texture_layer_impl.h +++ b/cc/layers/texture_layer_impl.h @@ -12,7 +12,7 @@ #include "cc/layers/layer_impl.h" namespace cc { -class SingleReleaseCallback; +class SingleReleaseCallbackImpl; class ScopedResource; class CC_EXPORT TextureLayerImpl : public LayerImpl { @@ -49,8 +49,9 @@ class CC_EXPORT TextureLayerImpl : public LayerImpl { // 0--3 void SetVertexOpacity(const float vertex_opacity[4]); - void SetTextureMailbox(const TextureMailbox& mailbox, - scoped_ptr<SingleReleaseCallback> release_callback); + void SetTextureMailbox( + const TextureMailbox& mailbox, + scoped_ptr<SingleReleaseCallbackImpl> release_callback); private: TextureLayerImpl(LayerTreeImpl* tree_impl, int id); @@ -69,7 +70,7 @@ class CC_EXPORT TextureLayerImpl : public LayerImpl { scoped_ptr<ScopedResource> texture_copy_; TextureMailbox texture_mailbox_; - scoped_ptr<SingleReleaseCallback> release_callback_; + scoped_ptr<SingleReleaseCallbackImpl> release_callback_; bool own_mailbox_; bool valid_texture_copy_; |