You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

167 lines
4.7 KiB

/*
* Copyright (C) 2019 The Hisilicon Technologies Co., Ltd.
*
* 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.
*/
package vendor.huanglong.hardware.hwgraphics@1.0;
import IGraphicsCallback;
interface IGraphics {
/**
* init video output window.
*
* @param uint32_t the width of window
* @param uint32_t the heighe of window
* @return status result of init window.
*/
InitWindow(uint32_t width, uint32_t height) generates (uint32_t ret);
/**
* deinit video output window.
*
* @return status result of deinit window.
*/
DeinitWindow() generates (uint32_t ret);
/**
* queue buffer handle to video output window
*
* @param hanlde buffer handle of image data.
* @return status result of queue frame.
*/
QueueFrame(handle rawHandle)generates (uint32_t ret);
/**
* sync frames sent to the video output window.
*
* @return status result of sync frame.
*/
DoFramexSync() generates (uint32_t ret);
/**
* query the screen format.
*
* @return screen format, default value: 4K.
*/
GetScreenFormat() generates(uint32_t type);
/**
* register rm for video output window.
*
* @return status result of register rm.
*/
RegisterRm() generates (uint32_t ret);
/**
* unregister rm for video output window.
*
* @return status result of unregister rm.
*/
UnregisterRm() generates (uint32_t ret);
/**
* acquire video output window source by rm.
*
* @return status result of acquire video output window source.
*/
AcquireRmResource() generates (uint32_t ret);
/**
* set callback function.
*
* @return status result of set callback function.
*/
SetCallback(IGraphicsCallback callback) generates (uint32_t ret);
/**
* Init vo module.
*
* @return uint32_t result of init vo module.
*/
InitVoModule() generates (uint32_t ret);
/**
* Close vo window.
*
* @param uint32_t the handle of vo winow
* @return closeVoWindow result of close vo window.
*/
CloseVoWindow(uint32_t window) generates (uint32_t ret);
/**
* Deinit vo module.
*
* @return uint32_t result of deinit vo module.
*/
DeinitVoModule() generates (uint32_t ret);
/**
* capture screen by VDP module
*
* @param CaptureType capture type, refer to CaptureType definition
* @param handle the buffer which is used to store Screenshot data
* @return uint32_t result of capture screen by VDP module.
*/
CaptureScreenByVDP(CaptureType type, handle rawHandle) generates (uint32_t ret);
/**
* Create overlay window if necessary and queue overlay buffer to vo module.
*
* @param HwLayer layer information, refer to HwLayer definition
* @param bool whether the related layer is visible
* @return uint32_t result of present overlay
* @return handle wrap release fence of overlay buffer which is set by vo module
*/
PresentOverlay(HwLayer layer, bool visible) generates(uint32_t ret, handle releaseFence);
/**
* set display area of overlay window
*
* @param int32_t the sequenece of related layer
* @param HwRect the display rect of overlay window
* @return void.
*/
SetOverlayPosition(int32_t sequence, HwRect position) generates(int32_t ret);
/**
* set content crop of overlay buffer.
*
* @param int32_t the sequenece of related layer
* @param HwRect the crop rect of overlay buffer
* @return void.
*/
SetOverlayCrop(int32_t sequence, HwRect crop) generates(int32_t ret);
/**
* set transform of overlay window.
*
* @param int32_t the sequenece of related layer
* @param uint32_t the transform of overlay window
* refer to hardware/libhardware/include/hardware/hwcomposer2.h
* @return void.
*/
SetOverlayTransform(int32_t sequence, uint32_t transform) generates(int32_t ret);
/**
* close overlay window and release related resource
*
* @param int32_t the sequenece of related layer
* @return void.
*/
CloseOverlay(int32_t sequence);
};