Support tbm_surface_queue
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / tizen / native-image-source-factory-tizen.cpp
1 /*
2  * Copyright (c) 2018 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/tizen/native-image-source-factory-tizen.h>
20
21 // INTERNAL HEADERS
22 #include <dali/internal/imaging/tizen/native-image-source-impl-tizen.h>
23 #include <dali/internal/imaging/tizen/native-image-source-queue-impl-tizen.h>
24
25 namespace Dali
26 {
27 namespace Internal
28 {
29 namespace Adaptor
30 {
31
32 std::unique_ptr< NativeImageSource > NativeImageSourceFactoryTizen::CreateNativeImageSource( unsigned int width, unsigned int height,
33                                                                                              Dali::NativeImageSource::ColorDepth depth, Any nativeImageSource )
34 {
35   return std::unique_ptr< NativeImageSource >( NativeImageSourceTizen::New( width, height, depth, nativeImageSource ) );
36 }
37
38 std::unique_ptr< NativeImageSourceQueue > NativeImageSourceFactoryTizen::CreateNativeImageSourceQueue( unsigned int width, unsigned int height,
39                                                                                                        Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue )
40 {
41   return std::unique_ptr< NativeImageSourceQueue >( NativeImageSourceQueueTizen::New( width, height, depth, nativeImageSourceQueue ) );
42 }
43
44 // this should be created from somewhere
45 std::unique_ptr< NativeImageSourceFactory > GetNativeImageSourceFactory()
46 {
47   // returns native image source factory
48   return std::unique_ptr< NativeImageSourceFactoryTizen >( new NativeImageSourceFactoryTizen() );
49 }
50
51 } // Adaptor
52 } // Internal
53 } // Dali