Index: cc/layers/texture_layer.cc |
diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc |
index 802fb8d6164526a248b550ecd605c055015d8618..465b381815f4dbaccfa11c817e54bf772dc9e83c 100644 |
--- a/cc/layers/texture_layer.cc |
+++ b/cc/layers/texture_layer.cc |
@@ -299,8 +299,12 @@ void TextureLayer::TextureMailboxHolder::ReturnAndReleaseOnImplThread( |
bool is_lost, |
BlockingTaskRunner* main_thread_task_runner) { |
Return(sync_token, is_lost); |
- main_thread_task_runner->PostTask( |
- FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this)); |
+ if (main_thread_task_runner->BelongsToCurrentThread()) { |
danakj
2017/04/04 21:59:37
You're right this orders it right, but I usually a
Saman Sami
2017/04/04 22:12:44
I see. Yes, dropping the ack should work. I sent o
|
+ InternalRelease(); |
+ } else { |
+ main_thread_task_runner->PostTask( |
+ FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this)); |
+ } |
} |
} // namespace cc |