OLD | NEW |
---|---|
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 Loading... | |
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 |
OLD | NEW |