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( unsigned int width, unsigned int height, ColorDepth depth )
31 NativeImageSourceQueuePtr image = new NativeImageSourceQueue( width, height, depth, empty );
35 NativeImageSourceQueuePtr NativeImageSourceQueue::New( Any nativeImageSourceQueue )
37 NativeImageSourceQueuePtr image = new NativeImageSourceQueue( 0, 0, COLOR_DEPTH_DEFAULT, nativeImageSourceQueue );
41 Any NativeImageSourceQueue::GetNativeImageSourceQueue()
43 return mImpl->GetNativeImageSourceQueue();
46 void NativeImageSourceQueue::SetSource( Any source )
48 mImpl->SetSource( source );
51 bool NativeImageSourceQueue::GlExtensionCreate()
53 return mImpl->GlExtensionCreate();
56 void NativeImageSourceQueue::GlExtensionDestroy()
58 mImpl->GlExtensionDestroy();
61 unsigned int NativeImageSourceQueue::TargetTexture()
63 return mImpl->TargetTexture();
66 void NativeImageSourceQueue::PrepareTexture()
68 mImpl->PrepareTexture();
71 unsigned int NativeImageSourceQueue::GetWidth() const
73 return mImpl->GetWidth();
76 unsigned int NativeImageSourceQueue::GetHeight() const
78 return mImpl->GetHeight();
81 bool NativeImageSourceQueue::RequiresBlending() const
83 return mImpl->RequiresBlending();
86 NativeImageInterface::Extension* NativeImageSourceQueue::GetExtension()
88 return mImpl->GetNativeImageInterfaceExtension();
91 NativeImageSourceQueue::NativeImageSourceQueue( unsigned int width, unsigned int height, ColorDepth depth, Any nativeImageSourceQueue )
93 auto factory = Dali::Internal::Adaptor::GetNativeImageSourceFactory();
94 mImpl = factory->CreateNativeImageSourceQueue( width, height, depth, nativeImageSourceQueue );
97 NativeImageSourceQueue::~NativeImageSourceQueue()