Updated all code to new format
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / android / native-image-source-factory-android.cpp
1 /*
2  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/internal/imaging/android/native-image-source-factory-android.h>
20
21 // INTERNAL HEADERS
22 #include <dali/internal/imaging/android/native-image-source-impl-android.h>
23 #include <dali/internal/imaging/android/native-image-source-queue-impl-android.h>
24
25 namespace Dali
26 {
27 namespace Internal
28 {
29 namespace Adaptor
30 {
31 std::unique_ptr<NativeImageSource> NativeImageSourceFactoryAndroid::CreateNativeImageSource(uint32_t width, uint32_t height, Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource)
32 {
33   return std::unique_ptr<NativeImageSource>(NativeImageSourceAndroid::New(width, height, depth, nativeImageSource));
34 }
35
36 std::unique_ptr<NativeImageSourceQueue> NativeImageSourceFactoryAndroid::CreateNativeImageSourceQueue(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue)
37 {
38   return std::unique_ptr<NativeImageSourceQueue>(NativeImageSourceQueueAndroid::New(width, height, depth, nativeImageSourceQueue));
39 }
40
41 // this should be created from somewhere
42 std::unique_ptr<NativeImageSourceFactory> GetNativeImageSourceFactory()
43 {
44   // returns native image source factory
45   return std::unique_ptr<NativeImageSourceFactoryAndroid>(new NativeImageSourceFactoryAndroid());
46 }
47
48 } // namespace Adaptor
49 } // namespace Internal
50 } // namespace Dali