Merge "[ATSPI] Fix for SCREEN coordinate type in GetExtents" 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 NativeImageSourceQueueAndroid* NativeImageSourceQueueAndroid::New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
37 {
38   NativeImageSourceQueueAndroid* image = new NativeImageSourceQueueAndroid(width, height, colorFormat, nativeImageSourceQueue);
39   return image;
40 }
41
42 NativeImageSourceQueueAndroid::NativeImageSourceQueueAndroid(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
43 : mWidth(width),
44   mHeight(height)
45 {
46   DALI_LOG_ERROR("NativeImageSourceQueueAndroid::NativeImageSourceQueueAndroid: Not supported\n");
47 }
48
49 NativeImageSourceQueueAndroid::~NativeImageSourceQueueAndroid()
50 {
51 }
52
53 Any NativeImageSourceQueueAndroid::GetNativeImageSourceQueue() const
54 {
55   return Any();
56 }
57
58 void NativeImageSourceQueueAndroid::SetSize(uint32_t width, uint32_t height)
59 {
60   mWidth  = width;
61   mHeight = height;
62 }
63
64 void NativeImageSourceQueueAndroid::IgnoreSourceImage()
65 {
66 }
67
68 bool NativeImageSourceQueueAndroid::CanDequeueBuffer()
69 {
70   return false;
71 }
72
73 uint8_t* NativeImageSourceQueueAndroid::DequeueBuffer(uint32_t& width, uint32_t& height, uint32_t& stride)
74 {
75   return nullptr;
76 }
77
78 bool NativeImageSourceQueueAndroid::EnqueueBuffer(uint8_t* buffer)
79 {
80   return false;
81 }
82
83 bool NativeImageSourceQueueAndroid::CreateResource()
84 {
85   return true;
86 }
87
88 void NativeImageSourceQueueAndroid::DestroyResource()
89 {
90 }
91
92 uint32_t NativeImageSourceQueueAndroid::TargetTexture()
93 {
94   return 0;
95 }
96
97 void NativeImageSourceQueueAndroid::PrepareTexture()
98 {
99 }
100
101 const char* NativeImageSourceQueueAndroid::GetCustomFragmentPrefix() const
102 {
103   return nullptr;
104 }
105
106 bool NativeImageSourceQueueAndroid::ApplyNativeFragmentShader(std::string& shader)
107 {
108   return false;
109 }
110
111 const char* NativeImageSourceQueueAndroid::GetCustomSamplerTypename() const
112 {
113   return nullptr;
114 }
115
116 int NativeImageSourceQueueAndroid::GetTextureTarget() const
117 {
118   return GL_TEXTURE_2D;
119 }
120
121 Any NativeImageSourceQueueAndroid::GetNativeImageHandle() const
122 {
123   return nullptr;
124 }
125
126 bool NativeImageSourceQueueAndroid::SourceChanged() const
127 {
128   return false;
129 }
130
131 } // namespace Adaptor
132
133 } // namespace Internal
134
135 } // namespace Dali