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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/texture_layer.h" 5 #include "cc/layers/texture_layer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 mailbox_ = TextureMailbox(); 292 mailbox_ = TextureMailbox();
293 release_callback_ = nullptr; 293 release_callback_ = nullptr;
294 } 294 }
295 } 295 }
296 296
297 void TextureLayer::TextureMailboxHolder::ReturnAndReleaseOnImplThread( 297 void TextureLayer::TextureMailboxHolder::ReturnAndReleaseOnImplThread(
298 const gpu::SyncToken& sync_token, 298 const gpu::SyncToken& sync_token,
299 bool is_lost, 299 bool is_lost,
300 BlockingTaskRunner* main_thread_task_runner) { 300 BlockingTaskRunner* main_thread_task_runner) {
301 Return(sync_token, is_lost); 301 Return(sync_token, is_lost);
302 main_thread_task_runner->PostTask( 302 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
303 FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this)); 303 InternalRelease();
304 } else {
305 main_thread_task_runner->PostTask(
306 FROM_HERE, base::Bind(&TextureMailboxHolder::InternalRelease, this));
307 }
304 } 308 }
305 309
306 } // namespace cc 310 } // namespace cc
OLDNEW
« 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