1 /*
2 * Copyright 2023 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include <cutils/log.h>
18
19 #include "FuchsiaVirtGpu.h"
20
FuchsiaVirtGpuDevice(enum VirtGpuCapset capset)21 FuchsiaVirtGpuDevice::FuchsiaVirtGpuDevice(enum VirtGpuCapset capset) : VirtGpuDevice(capset) {}
22
~FuchsiaVirtGpuDevice()23 FuchsiaVirtGpuDevice::~FuchsiaVirtGpuDevice() {}
24
getDeviceHandle(void)25 int64_t FuchsiaVirtGpuDevice::getDeviceHandle(void) {
26 ALOGE("%s: unimplemented", __func__);
27 return 0;
28 }
29
createBlob(const struct VirtGpuCreateBlob & blobCreate)30 VirtGpuBlobPtr FuchsiaVirtGpuDevice::createBlob(const struct VirtGpuCreateBlob& blobCreate) {
31 ALOGE("%s: unimplemented", __func__);
32 return nullptr;
33 }
34
createVirglBlob(uint32_t width,uint32_t height,uint32_t virglFormat)35 VirtGpuBlobPtr FuchsiaVirtGpuDevice::createVirglBlob(uint32_t width, uint32_t height,
36 uint32_t virglFormat) {
37 ALOGE("%s: unimplemented", __func__);
38 return nullptr;
39 }
40
importBlob(const struct VirtGpuExternalHandle & handle)41 VirtGpuBlobPtr FuchsiaVirtGpuDevice::importBlob(const struct VirtGpuExternalHandle& handle) {
42 ALOGE("%s: unimplemented", __func__);
43 return nullptr;
44 }
45
execBuffer(struct VirtGpuExecBuffer & execbuffer,const VirtGpuBlob * blob)46 int FuchsiaVirtGpuDevice::execBuffer(struct VirtGpuExecBuffer& execbuffer,
47 const VirtGpuBlob* blob) {
48 ALOGE("%s: unimplemented", __func__);
49 return 0;
50 }
51
getCaps(void)52 struct VirtGpuCaps FuchsiaVirtGpuDevice::getCaps(void) { return {}; }
53
createPlatformVirtGpuDevice(enum VirtGpuCapset capset,int fd)54 VirtGpuDevice* createPlatformVirtGpuDevice(enum VirtGpuCapset capset, int fd) {
55 // We don't handle the VirtioGpuPipeStream case.
56 if (fd >= 0) {
57 ALOGE("Fuchsia: fd not handled");
58 abort();
59 }
60 return new FuchsiaVirtGpuDevice(capset);
61 }
62