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

Unified Diff: cc/layers/texture_layer.cc

Issue 2757373002: Fixing flakiness of TextureLayerChangeInvisibleMailboxTest (Closed)
Patch Set: Don't PostTask release callback in single thread mode Created 3 years, 8 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 | « no previous file | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698