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

Side by Side Diff: content/child/child_gpu_memory_buffer_manager.cc

Issue 2384243003: ui: Add libsync GLFence implementation.
Patch Set: rebase Created 4 years, 1 month 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 | « content/browser/gpu/browser_gpu_memory_buffer_manager.cc ('k') | gpu/ipc/client/BUILD.gn » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/child/child_gpu_memory_buffer_manager.h" 5 #include "content/child/child_gpu_memory_buffer_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 static_cast<gpu::GpuMemoryBufferImpl*>(buffer)->set_destruction_sync_token( 91 static_cast<gpu::GpuMemoryBufferImpl*>(buffer)->set_destruction_sync_token(
92 sync_token); 92 sync_token);
93 } 93 }
94 94
95 std::unique_ptr<gfx::GpuFence> ChildGpuMemoryBufferManager::CreateGpuFence() { 95 std::unique_ptr<gfx::GpuFence> ChildGpuMemoryBufferManager::CreateGpuFence() {
96 gfx::GpuFenceHandle handle; 96 gfx::GpuFenceHandle handle;
97 IPC::Message* message = new ChildProcessHostMsg_SyncCreateGpuFence(&handle); 97 IPC::Message* message = new ChildProcessHostMsg_SyncCreateGpuFence(&handle);
98 bool success = sender_->Send(message); 98 bool success = sender_->Send(message);
99 if (!success) 99 if (!success)
100 return nullptr; 100 return nullptr;
101 std::unique_ptr<gpu::GpuFenceImpl> fence(new gpu::GpuFenceImpl(handle)); 101 std::unique_ptr<gpu::GpuFenceImpl> fence(
102 gpu::GpuFenceImpl::CreateFromHandle(handle));
102 return std::move(fence); 103 return std::move(fence);
103 } 104 }
104 105
105 std::unique_ptr<gfx::GpuFence> 106 std::unique_ptr<gfx::GpuFence>
106 ChildGpuMemoryBufferManager::CreateGpuFenceFromHandle( 107 ChildGpuMemoryBufferManager::CreateGpuFenceFromHandle(
107 const gfx::GpuFenceHandle& handle) { 108 const gfx::GpuFenceHandle& handle) {
108 NOTIMPLEMENTED(); 109 NOTIMPLEMENTED();
109 return nullptr; 110 return nullptr;
110 } 111 }
111 112
112 gfx::GpuFence* ChildGpuMemoryBufferManager::GpuFenceFromClientFence( 113 gfx::GpuFence* ChildGpuMemoryBufferManager::GpuFenceFromClientFence(
113 ClientFence fence) { 114 ClientFence fence) {
114 return gpu::GpuFenceImpl::FromClientFence(fence); 115 return gpu::GpuFenceImpl::FromClientFence(fence);
115 } 116 }
116 117
117 } // namespace content 118 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/browser_gpu_memory_buffer_manager.cc ('k') | gpu/ipc/client/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698