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

Side by Side Diff: gpu/ipc/service/gpu_channel.cc

Issue 2418613004: ui: Add EGL_ANDROID_native_fence_sync support.
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 | « no previous file | ui/gl/generate_bindings.py » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "gpu/ipc/service/gpu_channel.h" 5 #include "gpu/ipc/service/gpu_channel.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 return manager->gpu_memory_buffer_factory() 1069 return manager->gpu_memory_buffer_factory()
1070 ->AsImageFactory() 1070 ->AsImageFactory()
1071 ->CreateImageForGpuMemoryBuffer(handle, size, format, internalformat, 1071 ->CreateImageForGpuMemoryBuffer(handle, size, format, internalformat,
1072 client_id_, surface_handle); 1072 client_id_, surface_handle);
1073 } 1073 }
1074 } 1074 }
1075 } 1075 }
1076 1076
1077 scoped_refptr<gl::GLFence> GpuChannel::CreateFenceForGpuFence( 1077 scoped_refptr<gl::GLFence> GpuChannel::CreateFenceForGpuFence(
1078 const gfx::GpuFenceHandle& handle) { 1078 const gfx::GpuFenceHandle& handle) {
1079 #if defined(OS_LINUX) 1079 return gl::GLFence::CreateFromGpuFenceHandle(handle);
1080 base::ScopedFD libsync_fd(handle.fd.fd);
1081 if (libsync_fd.is_valid())
1082 return make_scoped_refptr(new gl::GLFenceLibsync(std::move(libsync_fd)));
1083 #endif
1084
1085 return make_scoped_refptr(
1086 new gl::GLFenceSharedEvent(handle.shared_event_handle));
1087 } 1080 }
1088 1081
1089 } // namespace gpu 1082 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | ui/gl/generate_bindings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698