2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/devel-api/adaptor-framework/native-image-source-queue.h>
22 #include <dali/internal/imaging/common/native-image-source-factory.h>
23 #include <dali/internal/imaging/common/native-image-source-queue-impl.h>
27 NativeImageSourceQueuePtr NativeImageSourceQueue::New(uint32_t width, uint32_t height, ColorDepth depth)
30 NativeImageSourceQueuePtr image = new NativeImageSourceQueue(width, height, depth, empty);
38 NativeImageSourceQueuePtr NativeImageSourceQueue::New(Any nativeImageSourceQueue)
40 NativeImageSourceQueuePtr image = new NativeImageSourceQueue(0, 0, COLOR_DEPTH_DEFAULT, nativeImageSourceQueue);
48 Any NativeImageSourceQueue::GetNativeImageSourceQueue()
50 return mImpl->GetNativeImageSourceQueue();
53 void NativeImageSourceQueue::SetSize(uint32_t width, uint32_t height)
55 return mImpl->SetSize(width, height);
58 void NativeImageSourceQueue::IgnoreSourceImage()
60 mImpl->IgnoreSourceImage();
63 bool NativeImageSourceQueue::CreateResource()
65 return mImpl->CreateResource();
68 void NativeImageSourceQueue::DestroyResource()
70 mImpl->DestroyResource();
73 uint32_t NativeImageSourceQueue::TargetTexture()
75 return mImpl->TargetTexture();
78 void NativeImageSourceQueue::PrepareTexture()
80 mImpl->PrepareTexture();
83 uint32_t NativeImageSourceQueue::GetWidth() const
85 return mImpl->GetWidth();
88 uint32_t NativeImageSourceQueue::GetHeight() const
90 return mImpl->GetHeight();
93 bool NativeImageSourceQueue::RequiresBlending() const
95 return mImpl->RequiresBlending();
98 int NativeImageSourceQueue::GetTextureTarget() const
100 return mImpl->GetTextureTarget();
103 const char* NativeImageSourceQueue::GetCustomFragmentPrefix() const
105 return mImpl->GetCustomFragmentPrefix();
108 const char* NativeImageSourceQueue::GetCustomSamplerTypename() const
110 return mImpl->GetCustomSamplerTypename();
113 Any NativeImageSourceQueue::GetNativeImageHandle() const
115 return mImpl->GetNativeImageHandle();
118 bool NativeImageSourceQueue::SourceChanged() const
120 return mImpl->SourceChanged();
123 NativeImageInterface::Extension* NativeImageSourceQueue::GetExtension()
125 return mImpl->GetNativeImageInterfaceExtension();
128 NativeImageSourceQueue::NativeImageSourceQueue(uint32_t width, uint32_t height, ColorDepth depth, Any nativeImageSourceQueue)
130 auto factory = Dali::Internal::Adaptor::GetNativeImageSourceFactory();
131 mImpl = factory->CreateNativeImageSourceQueue(width, height, depth, nativeImageSourceQueue);
134 NativeImageSourceQueue::~NativeImageSourceQueue()