OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "platform/graphics/SkiaTextureHolder.h" | 5 #include "platform/graphics/SkiaTextureHolder.h" |
6 | 6 |
7 #include "gpu/command_buffer/client/gles2_interface.h" | 7 #include "gpu/command_buffer/client/gles2_interface.h" |
8 #include "platform/CrossThreadFunctional.h" | 8 #include "platform/CrossThreadFunctional.h" |
9 #include "platform/graphics/MailboxTextureHolder.h" | 9 #include "platform/graphics/MailboxTextureHolder.h" |
10 #include "platform/graphics/gpu/SharedGpuContext.h" | 10 #include "platform/graphics/gpu/SharedGpuContext.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // must be released on that thread. | 75 // must be released on that thread. |
76 if (textureThreadTaskRunner() && m_image && wasTransferred() && | 76 if (textureThreadTaskRunner() && m_image && wasTransferred() && |
77 SharedGpuContext::isValid()) { | 77 SharedGpuContext::isValid()) { |
78 gpu::gles2::GLES2Interface* sharedGL = SharedGpuContext::gl(); | 78 gpu::gles2::GLES2Interface* sharedGL = SharedGpuContext::gl(); |
79 std::unique_ptr<gpu::SyncToken> releaseSyncToken(new gpu::SyncToken); | 79 std::unique_ptr<gpu::SyncToken> releaseSyncToken(new gpu::SyncToken); |
80 const GLuint64 fenceSync = sharedGL->InsertFenceSyncCHROMIUM(); | 80 const GLuint64 fenceSync = sharedGL->InsertFenceSyncCHROMIUM(); |
81 sharedGL->Flush(); | 81 sharedGL->Flush(); |
82 sharedGL->GenSyncTokenCHROMIUM(fenceSync, releaseSyncToken->GetData()); | 82 sharedGL->GenSyncTokenCHROMIUM(fenceSync, releaseSyncToken->GetData()); |
83 textureThreadTaskRunner()->postTask( | 83 textureThreadTaskRunner()->postTask( |
84 BLINK_FROM_HERE, | 84 BLINK_FROM_HERE, |
85 crossThreadBind(&releaseImage, passed(std::move(m_image)), | 85 crossThreadBind(&releaseImage, WTF::passed(std::move(m_image)), |
86 passed(std::move(releaseSyncToken)))); | 86 WTF::passed(std::move(releaseSyncToken)))); |
87 } | 87 } |
88 m_image = nullptr; | 88 m_image = nullptr; |
89 setWasTransferred(false); | 89 setWasTransferred(false); |
90 setTextureThreadTaskRunner(nullptr); | 90 setTextureThreadTaskRunner(nullptr); |
91 } | 91 } |
92 | 92 |
93 } // namespace blink | 93 } // namespace blink |
OLD | NEW |