Merge "Enable atspi" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / ubuntu-x11 / native-image-source-queue-impl-x.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/ubuntu-x11/native-image-source-queue-impl-x.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 #define TBM_SURFACE_QUEUE_SIZE 3
39
40 const char* FRAGMENT_PREFIX = "\n";
41 const char* SAMPLER_TYPE    = "sampler2D";
42
43 } // namespace
44
45 NativeImageSourceQueueX* NativeImageSourceQueueX::New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue)
46 {
47   NativeImageSourceQueueX* image = new NativeImageSourceQueueX(width, height, depth, nativeImageSourceQueue);
48   return image;
49 }
50
51 NativeImageSourceQueueX::NativeImageSourceQueueX(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue)
52 : mWidth(width),
53   mHeight(height)
54 {
55   DALI_LOG_ERROR("NativeImageSourceQueueX::NativeImageSourceQueueX: Not supported\n");
56 }
57
58 NativeImageSourceQueueX::~NativeImageSourceQueueX()
59 {
60 }
61
62 Any NativeImageSourceQueueX::GetNativeImageSourceQueue() const
63 {
64   return Any();
65 }
66
67 void NativeImageSourceQueueX::SetSize(uint32_t width, uint32_t height)
68 {
69   mWidth  = width;
70   mHeight = height;
71 }
72
73 void NativeImageSourceQueueX::IgnoreSourceImage()
74 {
75 }
76
77 bool NativeImageSourceQueueX::CreateResource()
78 {
79   return true;
80 }
81
82 void NativeImageSourceQueueX::DestroyResource()
83 {
84 }
85
86 uint32_t NativeImageSourceQueueX::TargetTexture()
87 {
88   return 0;
89 }
90
91 void NativeImageSourceQueueX::PrepareTexture()
92 {
93 }
94
95 const char* NativeImageSourceQueueX::GetCustomFragmentPrefix() const
96 {
97   return FRAGMENT_PREFIX;
98 }
99
100 const char* NativeImageSourceQueueX::GetCustomSamplerTypename() const
101 {
102   return SAMPLER_TYPE;
103 }
104
105 int NativeImageSourceQueueX::GetTextureTarget() const
106 {
107   return 0;
108 }
109
110 Any NativeImageSourceQueueX::GetNativeImageHandle() const
111 {
112   return nullptr;
113 }
114
115 bool NativeImageSourceQueueX::SourceChanged() const
116 {
117   return false;
118 }
119
120 } // namespace Adaptor
121
122 } // namespace Internal
123
124 } // namespace Dali