132a6e48fSopenharmony_ci/* 232a6e48fSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd. 332a6e48fSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 432a6e48fSopenharmony_ci * you may not use this file except in compliance with the License. 532a6e48fSopenharmony_ci * You may obtain a copy of the License at 632a6e48fSopenharmony_ci * 732a6e48fSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 832a6e48fSopenharmony_ci * 932a6e48fSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1032a6e48fSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1132a6e48fSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1232a6e48fSopenharmony_ci * See the License for the specific language governing permissions and 1332a6e48fSopenharmony_ci * limitations under the License. 1432a6e48fSopenharmony_ci */ 1532a6e48fSopenharmony_ci 1632a6e48fSopenharmony_ci#include <message_option.h> 1732a6e48fSopenharmony_ci#include <message_parcel.h> 1832a6e48fSopenharmony_ci#include "consumer_surface_delegator.h" 1932a6e48fSopenharmony_ci#include "buffer_log.h" 2032a6e48fSopenharmony_ci#include "sync_fence.h" 2132a6e48fSopenharmony_ci 2232a6e48fSopenharmony_cinamespace OHOS { 2332a6e48fSopenharmony_cisptr<ConsumerSurfaceDelegator> ConsumerSurfaceDelegator::Create() 2432a6e48fSopenharmony_ci{ 2532a6e48fSopenharmony_ci return sptr<ConsumerSurfaceDelegator>(new ConsumerSurfaceDelegator()); 2632a6e48fSopenharmony_ci} 2732a6e48fSopenharmony_ci 2832a6e48fSopenharmony_ciGSError ConsumerSurfaceDelegator::DequeueBuffer(const BufferRequestConfig& config, sptr<BufferExtraData>& bedata, 2932a6e48fSopenharmony_ci struct IBufferProducer::RequestBufferReturnValue& retval) 3032a6e48fSopenharmony_ci{ 3132a6e48fSopenharmony_ci return GSERROR_OK; 3232a6e48fSopenharmony_ci} 3332a6e48fSopenharmony_ci 3432a6e48fSopenharmony_ciGSError ConsumerSurfaceDelegator::QueueBuffer(sptr<SurfaceBuffer>& buffer, int32_t fenceFd) 3532a6e48fSopenharmony_ci{ 3632a6e48fSopenharmony_ci return GSERROR_OK; 3732a6e48fSopenharmony_ci} 3832a6e48fSopenharmony_ci 3932a6e48fSopenharmony_ciGSError ConsumerSurfaceDelegator::ReleaseBuffer(int slot, int releaseFenceFd) 4032a6e48fSopenharmony_ci{ 4132a6e48fSopenharmony_ci return GSERROR_OK; 4232a6e48fSopenharmony_ci} 4332a6e48fSopenharmony_ci 4432a6e48fSopenharmony_ciGSError ConsumerSurfaceDelegator::CancelBuffer(sptr<SurfaceBuffer>& buffer) 4532a6e48fSopenharmony_ci{ 4632a6e48fSopenharmony_ci return GSERROR_OK; 4732a6e48fSopenharmony_ci} 4832a6e48fSopenharmony_ci 4932a6e48fSopenharmony_ciGSError ConsumerSurfaceDelegator::DetachBuffer(sptr<SurfaceBuffer>& buffer) 5032a6e48fSopenharmony_ci{ 5132a6e48fSopenharmony_ci return GSERROR_OK; 5232a6e48fSopenharmony_ci} 5332a6e48fSopenharmony_ci 5432a6e48fSopenharmony_cibool ConsumerSurfaceDelegator::SetBufferQueue(BufferQueue* bufferQueue) 5532a6e48fSopenharmony_ci{ 5632a6e48fSopenharmony_ci bufferQueue_ = bufferQueue; 5732a6e48fSopenharmony_ci return true; 5832a6e48fSopenharmony_ci} 5932a6e48fSopenharmony_ci 6032a6e48fSopenharmony_ciint ConsumerSurfaceDelegator::OnRemoteRequest(uint32_t code, 6132a6e48fSopenharmony_ci MessageParcel& data, MessageParcel& reply, MessageOption& option) 6232a6e48fSopenharmony_ci{ 6332a6e48fSopenharmony_ci return ERR_NONE; 6432a6e48fSopenharmony_ci} 6532a6e48fSopenharmony_ci} // namespace OHOS