• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2022 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 "StubVirtGpu.h"
18 
StubVirtGpuDevice(enum VirtGpuCapset capset)19 StubVirtGpuDevice::StubVirtGpuDevice(enum VirtGpuCapset capset) : VirtGpuDevice(capset) {
20     // Unimplemented stub
21 }
22 
getCaps(void)23 struct VirtGpuCaps StubVirtGpuDevice::getCaps(void) { return mCaps; }
24 
getDeviceHandle(void)25 int64_t StubVirtGpuDevice::getDeviceHandle(void) {
26     return mDeviceHandle;
27 }
28 
createVirglBlob(uint32_t width,uint32_t height,uint32_t virglFormat)29 VirtGpuBlobPtr StubVirtGpuDevice::createVirglBlob(uint32_t width, uint32_t height, uint32_t virglFormat) {
30     (void)width;
31     (void)height;
32     (void)virglFormat;
33     return nullptr;
34 }
35 
createBlob(const struct VirtGpuCreateBlob &)36 VirtGpuBlobPtr StubVirtGpuDevice::createBlob(const struct VirtGpuCreateBlob&) {
37     return nullptr;
38 }
39 
importBlob(const struct VirtGpuExternalHandle &)40 VirtGpuBlobPtr StubVirtGpuDevice::importBlob(const struct VirtGpuExternalHandle&) {
41     return nullptr;
42 }
43 
execBuffer(struct VirtGpuExecBuffer &,const VirtGpuBlob *)44 int StubVirtGpuDevice::execBuffer(struct VirtGpuExecBuffer&, const VirtGpuBlob*) { return -1; }
45 
createColorBuffer(int,int,uint32_t)46 VirtGpuBlobPtr createColorBuffer(int, int, uint32_t) {
47     return nullptr;
48 }
49 
createColorBuffer(int)50 VirtGpuBlobPtr createColorBuffer(int) {
51     return nullptr;
52 }
53 
~StubVirtGpuDevice()54 StubVirtGpuDevice::~StubVirtGpuDevice() {
55     // Unimplemented stub
56 }
57 
createPlatformVirtGpuDevice(enum VirtGpuCapset capset,int)58 VirtGpuDevice* createPlatformVirtGpuDevice(enum VirtGpuCapset capset, int) {
59     return new StubVirtGpuDevice(capset);
60 }
61