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

Unified Diff: gpu/ipc/client/gpu_channel_host.cc

Issue 2383753002: gpu: Add GpuFence framework.
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 side-by-side diff with in-line comments
Download patch
Index: gpu/ipc/client/gpu_channel_host.cc
diff --git a/gpu/ipc/client/gpu_channel_host.cc b/gpu/ipc/client/gpu_channel_host.cc
index b639d8ffa54f83f61e2adb13312e1fef91feffd3..c44cd9ac61b3439a19bd111af9d935aca73002a7 100644
--- a/gpu/ipc/client/gpu_channel_host.cc
+++ b/gpu/ipc/client/gpu_channel_host.cc
@@ -69,6 +69,7 @@ GpuChannelHost::GpuChannelHost(
gpu_info_(gpu_info),
gpu_memory_buffer_manager_(gpu_memory_buffer_manager) {
next_image_id_.GetNext();
+ next_fence_id_.GetNext();
next_route_id_.GetNext();
next_stream_id_.GetNext();
}
@@ -282,6 +283,18 @@ int32_t GpuChannelHost::ReserveImageId() {
return next_image_id_.GetNext();
}
+gfx::GpuFenceHandle GpuChannelHost::ShareGpuFenceToGpuProcess(
+ const gfx::GpuFenceHandle& source_handle) {
+ gfx::GpuFenceHandle handle;
+ handle.shared_event_handle =
+ gfx::SharedEvent::DuplicateHandle(source_handle.shared_event_handle);
ericrk 2017/03/10 03:04:39 We don't need to call ShareToProcess here? Just du
reveman 2017/03/13 12:33:05 This looks the same as GpuChannelHost::ShareToGpuP
+ return handle;
+}
+
+int32_t GpuChannelHost::ReserveFenceId() {
+ return next_fence_id_.GetNext();
+}
+
int32_t GpuChannelHost::GenerateRouteID() {
return next_route_id_.GetNext();
}

Powered by Google App Engine
This is Rietveld 408576698