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 bool NativeImageSourceQueue::GlExtensionCreate()
61 return mImpl->GlExtensionCreate();
64 void NativeImageSourceQueue::GlExtensionDestroy()
66 mImpl->GlExtensionDestroy();
69 uint32_t NativeImageSourceQueue::TargetTexture()
71 return mImpl->TargetTexture();
74 void NativeImageSourceQueue::PrepareTexture()
76 mImpl->PrepareTexture();
79 uint32_t NativeImageSourceQueue::GetWidth() const
81 return mImpl->GetWidth();
84 uint32_t NativeImageSourceQueue::GetHeight() const
86 return mImpl->GetHeight();
89 bool NativeImageSourceQueue::RequiresBlending() const
91 return mImpl->RequiresBlending();
94 NativeImageInterface::Extension* NativeImageSourceQueue::GetExtension()
96 return mImpl->GetNativeImageInterfaceExtension();
99 NativeImageSourceQueue::NativeImageSourceQueue( uint32_t width, uint32_t height, ColorDepth depth, Any nativeImageSourceQueue )
101 auto factory = Dali::Internal::Adaptor::GetNativeImageSourceFactory();
102 mImpl = factory->CreateNativeImageSourceQueue( width, height, depth, nativeImageSourceQueue );
105 NativeImageSourceQueue::~NativeImageSourceQueue()