1 /* 2 * Copyright (c) 2022-2023 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 #include "pipeline/rs_surface_handler.h" 17 18 namespace OHOS { 19 namespace Rosen { 20 #if !defined(_WIN32) && !defined(__APPLE__) && !defined(__gnu_linux__) SetConsumer(const sptr<Surface> & consumer)21void RSSurfaceHandler::SetConsumer(const sptr<Surface>& consumer) 22 { 23 consumer_ = consumer; 24 } 25 #endif 26 IncreaseAvailableBuffer()27void RSSurfaceHandler::IncreaseAvailableBuffer() 28 { 29 bufferAvailableCount_++; 30 } 31 ReduceAvailableBuffer()32int32_t RSSurfaceHandler::ReduceAvailableBuffer() 33 { 34 return --bufferAvailableCount_; 35 } 36 SetGlobalZOrder(float globalZOrder)37void RSSurfaceHandler::SetGlobalZOrder(float globalZOrder) 38 { 39 globalZOrder_ = globalZOrder; 40 } 41 GetGlobalZOrder() const42float RSSurfaceHandler::GetGlobalZOrder() const 43 { 44 return globalZOrder_; 45 } 46 } 47 } 48