diff options
author | Gurchetan Singh <gurchetansingh@google.com> | 2023-04-17 19:38:20 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-04-17 19:38:20 +0000 |
commit | 31980d6af027c0ca4c93ae2ba209c32e6679cc75 (patch) | |
tree | e9784146d68a37d3654ea489bf738d0de084099a | |
parent | f7ac10988c40661d2415ba1d084358b5644bfb10 (diff) | |
parent | db81eabe73f81dcd61593f806c50a5c83805932f (diff) | |
download | vulkan-cereal-31980d6af027c0ca4c93ae2ba209c32e6679cc75.tar.gz |
virtio-gpu-gfxstream-renderer.h: nuke GfxStreamBackend.h am: db81eabe73
Original change: https://android-review.googlesource.com/c/device/generic/vulkan-cereal/+/2537076
Change-Id: I87b035265b5c63dcde21e763809a498c15265da1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | stream-servers/GfxStreamBackend.h | 19 | ||||
-rw-r--r-- | stream-servers/virtio-gpu-gfxstream-renderer.cpp | 60 | ||||
-rw-r--r-- | stream-servers/virtio-gpu-gfxstream-renderer.h | 20 |
3 files changed, 0 insertions, 99 deletions
diff --git a/stream-servers/GfxStreamBackend.h b/stream-servers/GfxStreamBackend.h deleted file mode 100644 index e0b5524c..00000000 --- a/stream-servers/GfxStreamBackend.h +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2022 The Android Open Source Project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#pragma once - -// To not break existing imports of GfxStreamBackend.h until they are -// refactored downstream. -#include "virtio-gpu-gfxstream-renderer.h" diff --git a/stream-servers/virtio-gpu-gfxstream-renderer.cpp b/stream-servers/virtio-gpu-gfxstream-renderer.cpp index 65aff956..872135e9 100644 --- a/stream-servers/virtio-gpu-gfxstream-renderer.cpp +++ b/stream-servers/virtio-gpu-gfxstream-renderer.cpp @@ -2391,66 +2391,6 @@ VG_EXPORT int stream_renderer_init(struct stream_renderer_param* stream_renderer return 0; } -VG_EXPORT void gfxstream_backend_init(uint32_t display_width, uint32_t display_height, - uint32_t display_type, void* renderer_cookie, - int renderer_flags, - struct virgl_renderer_callbacks* virglrenderer_callbacks, - struct gfxstream_callbacks* gfxstreamcallbacks) { - std::vector<stream_renderer_param> streamRendererParams{ - {STREAM_RENDERER_PARAM_USER_DATA, - static_cast<uint64_t>(reinterpret_cast<uintptr_t>(renderer_cookie))}, - {STREAM_RENDERER_PARAM_RENDERER_FLAGS, static_cast<uint64_t>(renderer_flags)}, - {STREAM_RENDERER_PARAM_WRITE_FENCE_CALLBACK, - static_cast<uint64_t>(reinterpret_cast<uintptr_t>(virglrenderer_callbacks->write_fence))}, -#ifdef VIRGL_RENDERER_UNSTABLE_APIS - {STREAM_RENDERER_PARAM_WRITE_CONTEXT_FENCE_CALLBACK, - static_cast<uint64_t>( - reinterpret_cast<uintptr_t>(virglrenderer_callbacks->write_context_fence))}, -#endif - {STREAM_RENDERER_PARAM_WIN0_WIDTH, display_width}, - {STREAM_RENDERER_PARAM_WIN0_HEIGHT, display_height}}; - - // Convert metrics callbacks. - if (gfxstreamcallbacks) { - if (gfxstreamcallbacks->add_instant_event) { - streamRendererParams.push_back( - {STREAM_RENDERER_PARAM_METRICS_CALLBACK_ADD_INSTANT_EVENT, - static_cast<uint64_t>( - reinterpret_cast<uintptr_t>(gfxstreamcallbacks->add_instant_event))}); - } - if (gfxstreamcallbacks->add_instant_event_with_descriptor) { - streamRendererParams.push_back( - {STREAM_RENDERER_PARAM_METRICS_CALLBACK_ADD_INSTANT_EVENT_WITH_DESCRIPTOR, - static_cast<uint64_t>(reinterpret_cast<uintptr_t>( - gfxstreamcallbacks->add_instant_event_with_descriptor))}); - } - if (gfxstreamcallbacks->add_instant_event_with_metric) { - streamRendererParams.push_back( - {STREAM_RENDERER_PARAM_METRICS_CALLBACK_ADD_INSTANT_EVENT_WITH_METRIC, - static_cast<uint64_t>(reinterpret_cast<uintptr_t>( - gfxstreamcallbacks->add_instant_event_with_metric))}); - } - if (gfxstreamcallbacks->add_vulkan_out_of_memory_event) { - streamRendererParams.push_back( - {STREAM_RENDERER_PARAM_METRICS_CALLBACK_ADD_VULKAN_OUT_OF_MEMORY_EVENT, - static_cast<uint64_t>(reinterpret_cast<uintptr_t>( - gfxstreamcallbacks->add_vulkan_out_of_memory_event))}); - } - if (gfxstreamcallbacks->set_annotation) { - streamRendererParams.push_back({STREAM_RENDERER_PARAM_METRICS_CALLBACK_SET_ANNOTATION, - static_cast<uint64_t>(reinterpret_cast<uintptr_t>( - gfxstreamcallbacks->set_annotation))}); - } - if (gfxstreamcallbacks->abort) { - streamRendererParams.push_back( - {STREAM_RENDERER_PARAM_METRICS_CALLBACK_ABORT, - static_cast<uint64_t>(reinterpret_cast<uintptr_t>(gfxstreamcallbacks->abort))}); - } - } - - stream_renderer_init(streamRendererParams.data(), streamRendererParams.size()); -} - VG_EXPORT void gfxstream_backend_setup_window(void* native_window_handle, int32_t window_x, int32_t window_y, int32_t window_width, int32_t window_height, int32_t fb_width, diff --git a/stream-servers/virtio-gpu-gfxstream-renderer.h b/stream-servers/virtio-gpu-gfxstream-renderer.h index 9aefb8b2..41aa3594 100644 --- a/stream-servers/virtio-gpu-gfxstream-renderer.h +++ b/stream-servers/virtio-gpu-gfxstream-renderer.h @@ -250,26 +250,6 @@ struct stream_renderer_param { VG_EXPORT int stream_renderer_init(struct stream_renderer_param* stream_renderer_params, uint64_t num_params); -struct gfxstream_callbacks { - /* Metrics callbacks */ - void (*add_instant_event)(int64_t event_code); - void (*add_instant_event_with_descriptor)(int64_t event_code, int64_t descriptor); - void (*add_instant_event_with_metric)(int64_t event_code, int64_t metric_value); - void (*add_vulkan_out_of_memory_event)(int64_t result_code, uint32_t op_code, - const char* function, uint32_t line, - uint64_t allocation_size, bool is_host_side_result, - bool is_allocation); - void (*set_annotation)(const char* key, const char* value); - void (*abort)(); -}; - -// Deprecated, use stream_renderer_init instead. -VG_EXPORT void gfxstream_backend_init(uint32_t display_width, uint32_t display_height, - uint32_t display_type, void* renderer_cookie, - int renderer_flags, - struct virgl_renderer_callbacks* virglrenderer_callbacks, - struct gfxstream_callbacks* gfxstreamcallbacks); - VG_EXPORT void gfxstream_backend_setup_window(void* native_window_handle, int32_t window_x, int32_t window_y, int32_t window_width, int32_t window_height, int32_t fb_width, |