1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef HDI_VIDEO_LAYER_SERVICE_V1_0_H 17 #define HDI_VIDEO_LAYER_SERVICE_V1_0_H 18 19 #include "idisplay_layer.h" 20 21 namespace OHOS { 22 namespace HDI { 23 namespace Display { 24 namespace V1_0 { 25 class VideoLayerService : public IDisplayLayer { 26 public: 27 virtual DispErrCode InitDisplay(unsigned int devId) override; 28 virtual DispErrCode DeinitDisplay(unsigned int devId) override; 29 virtual DispErrCode GetDisplayInfo(unsigned int devId, std::shared_ptr<DisplayInfo> &dispInfo) override; 30 virtual DispErrCode CreateLayer(unsigned int devId, LayerInfo &layerInfo, unsigned int &layerId) override; 31 virtual DispErrCode CloseLayer(unsigned int devId, unsigned int layerId) override; 32 virtual DispErrCode SetLayerVisible(unsigned int devId, unsigned int layerId, bool visible) override; 33 virtual DispErrCode GetLayerVisibleState(unsigned int devId, unsigned int layerId, bool &visible) override; 34 virtual DispErrCode SetLayerRect(unsigned int devId, unsigned int layerId, IRect &rect) override; 35 virtual DispErrCode GetLayerRect(unsigned int devId, unsigned int layerId, std::shared_ptr<IRect> &rect) override; 36 virtual DispErrCode SetLayerZorder(unsigned int devId, unsigned int layerId, unsigned int zorder) override; 37 virtual DispErrCode GetLayerZorder(unsigned int devId, unsigned int layerId, unsigned int &zorder) override; 38 virtual DispErrCode SetTransformMode(unsigned int devId, unsigned int layerId, TransformType &type) override; 39 virtual DispErrCode SetLayerBuffer(unsigned int devId, unsigned int layerId, const BufferHandle &buffer, 40 int fence) override; 41 }; 42 } // namespace V1_0 43 } // namespace Display 44 } // namespace HDI 45 } // namespace OHOS 46 47 #endif // HDI_VIDEO_LAYER_SERVICE_V1_0_H