2 * Copyright (c) 2018 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-queue-impl.h>
23 #include <dali/internal/imaging/common/native-image-source-factory.h>
28 NativeImageSourceQueuePtr NativeImageSourceQueue::New( uint32_t width, uint32_t height, ColorDepth depth )
31 NativeImageSourceQueuePtr image = new NativeImageSourceQueue( width, height, depth, empty );
39 NativeImageSourceQueuePtr NativeImageSourceQueue::New( Any nativeImageSourceQueue )
41 NativeImageSourceQueuePtr image = new NativeImageSourceQueue( 0, 0, COLOR_DEPTH_DEFAULT, nativeImageSourceQueue );
49 Any NativeImageSourceQueue::GetNativeImageSourceQueue()
51 return mImpl->GetNativeImageSourceQueue();
54 void NativeImageSourceQueue::SetSize( uint32_t width, uint32_t height )
56 return mImpl->SetSize( width, height );
59 void NativeImageSourceQueue::IgnoreSourceImage()
61 mImpl->IgnoreSourceImage();
64 bool NativeImageSourceQueue::CreateResource()
66 return mImpl->CreateResource();
69 void NativeImageSourceQueue::DestroyResource()
71 mImpl->DestroyResource();
74 uint32_t NativeImageSourceQueue::TargetTexture()
76 return mImpl->TargetTexture();
79 void NativeImageSourceQueue::PrepareTexture()
81 mImpl->PrepareTexture();
84 uint32_t NativeImageSourceQueue::GetWidth() const
86 return mImpl->GetWidth();
89 uint32_t NativeImageSourceQueue::GetHeight() const
91 return mImpl->GetHeight();
94 bool NativeImageSourceQueue::RequiresBlending() const
96 return mImpl->RequiresBlending();
99 int NativeImageSourceQueue::GetTextureTarget() const
101 return mImpl->GetTextureTarget();
104 const char* NativeImageSourceQueue::GetCustomFragmentPrefix() const
106 return mImpl->GetCustomFragmentPrefix();
109 const char* NativeImageSourceQueue::GetCustomSamplerTypename() const
111 return mImpl->GetCustomSamplerTypename();
114 Any NativeImageSourceQueue::GetNativeImageHandle() const
116 return mImpl->GetNativeImageHandle();
119 bool NativeImageSourceQueue::SourceChanged() const
121 return mImpl->SourceChanged();
124 NativeImageInterface::Extension* NativeImageSourceQueue::GetExtension()
126 return mImpl->GetNativeImageInterfaceExtension();
129 NativeImageSourceQueue::NativeImageSourceQueue( uint32_t width, uint32_t height, ColorDepth depth, Any nativeImageSourceQueue )
131 auto factory = Dali::Internal::Adaptor::GetNativeImageSourceFactory();
132 mImpl = factory->CreateNativeImageSourceQueue( width, height, depth, nativeImageSourceQueue );
135 NativeImageSourceQueue::~NativeImageSourceQueue()