Merge "Enable atspi" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / android / native-image-source-queue-impl-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-queue-impl-android.h>
20
21 // EXTERNAL INCLUDES
22 #include <dali/integration-api/debug.h>
23 #include <dali/integration-api/gl-defines.h>
24
25 // INTERNAL INCLUDES
26 #include <dali/internal/adaptor/common/adaptor-impl.h>
27 #include <dali/internal/graphics/common/egl-image-extensions.h>
28 #include <dali/internal/graphics/gles/egl-graphics.h>
29
30 namespace Dali
31 {
32 namespace Internal
33 {
34 namespace Adaptor
35 {
36 namespace
37 {
38 const char* FRAGMENT_PREFIX = "\n";
39 const char* SAMPLER_TYPE    = "sampler2D";
40
41 } // namespace
42
43 NativeImageSourceQueueAndroid* NativeImageSourceQueueAndroid::New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue)
44 {
45   NativeImageSourceQueueAndroid* image = new NativeImageSourceQueueAndroid(width, height, depth, nativeImageSourceQueue);
46   return image;
47 }
48
49 NativeImageSourceQueueAndroid::NativeImageSourceQueueAndroid(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue)
50 : mWidth(width),
51   mHeight(height)
52 {
53   DALI_LOG_ERROR("NativeImageSourceQueueAndroid::NativeImageSourceQueueAndroid: Not supported\n");
54 }
55
56 NativeImageSourceQueueAndroid::~NativeImageSourceQueueAndroid()
57 {
58 }
59
60 Any NativeImageSourceQueueAndroid::GetNativeImageSourceQueue() const
61 {
62   return Any();
63 }
64
65 void NativeImageSourceQueueAndroid::SetSize(uint32_t width, uint32_t height)
66 {
67   mWidth  = width;
68   mHeight = height;
69 }
70
71 void NativeImageSourceQueueAndroid::IgnoreSourceImage()
72 {
73 }
74
75 bool NativeImageSourceQueueAndroid::CreateResource()
76 {
77   return true;
78 }
79
80 void NativeImageSourceQueueAndroid::DestroyResource()
81 {
82 }
83
84 uint32_t NativeImageSourceQueueAndroid::TargetTexture()
85 {
86   return 0;
87 }
88
89 void NativeImageSourceQueueAndroid::PrepareTexture()
90 {
91 }
92
93 const char* NativeImageSourceQueueAndroid::GetCustomFragmentPrefix() const
94 {
95   return FRAGMENT_PREFIX;
96 }
97
98 const char* NativeImageSourceQueueAndroid::GetCustomSamplerTypename() const
99 {
100   return SAMPLER_TYPE;
101 }
102
103 int NativeImageSourceQueueAndroid::GetTextureTarget() const
104 {
105   return GL_TEXTURE_2D;
106 }
107
108 Any NativeImageSourceQueueAndroid::GetNativeImageHandle() const
109 {
110   return nullptr;
111 }
112
113 bool NativeImageSourceQueueAndroid::SourceChanged() const
114 {
115   return false;
116 }
117
118 } // namespace Adaptor
119
120 } // namespace Internal
121
122 } // namespace Dali