5dfbd1a1dbacab60521b0db94c986dfb8cb933d9
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / x11 / native-image-source-queue-impl-x.cpp
1 /*
2  * Copyright (c) 2023 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/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 namespace Dali
26 {
27 namespace Internal
28 {
29 namespace Adaptor
30 {
31 NativeImageSourceQueueX* NativeImageSourceQueueX::New(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
32 {
33   NativeImageSourceQueueX* image = new NativeImageSourceQueueX(width, height, colorFormat, nativeImageSourceQueue);
34   return image;
35 }
36
37 NativeImageSourceQueueX::NativeImageSourceQueueX(uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue)
38 : mWidth(width),
39   mHeight(height)
40 {
41   DALI_LOG_ERROR("NativeImageSourceQueueX::NativeImageSourceQueueX: Not supported\n");
42 }
43
44 NativeImageSourceQueueX::~NativeImageSourceQueueX()
45 {
46 }
47
48 Any NativeImageSourceQueueX::GetNativeImageSourceQueue() const
49 {
50   return Any();
51 }
52
53 void NativeImageSourceQueueX::SetSize(uint32_t width, uint32_t height)
54 {
55   mWidth  = width;
56   mHeight = height;
57 }
58
59 void NativeImageSourceQueueX::IgnoreSourceImage()
60 {
61 }
62
63 bool NativeImageSourceQueueX::CanDequeueBuffer()
64 {
65   return false;
66 }
67
68 uint8_t* NativeImageSourceQueueX::DequeueBuffer(uint32_t& width, uint32_t& height, uint32_t& stride)
69 {
70   return nullptr;
71 }
72
73 bool NativeImageSourceQueueX::EnqueueBuffer(uint8_t* buffer)
74 {
75   return false;
76 }
77
78 void NativeImageSourceQueueX::FreeReleasedBuffers()
79 {
80 }
81
82 bool NativeImageSourceQueueX::CreateResource()
83 {
84   return true;
85 }
86
87 void NativeImageSourceQueueX::DestroyResource()
88 {
89 }
90
91 uint32_t NativeImageSourceQueueX::TargetTexture()
92 {
93   return 0;
94 }
95
96 void NativeImageSourceQueueX::PrepareTexture()
97 {
98 }
99
100 bool NativeImageSourceQueueX::ApplyNativeFragmentShader(std::string& shader)
101 {
102   return false;
103 }
104
105 const char* NativeImageSourceQueueX::GetCustomSamplerTypename() const
106 {
107   return nullptr;
108 }
109
110 int NativeImageSourceQueueX::GetTextureTarget() const
111 {
112   return 0;
113 }
114
115 Any NativeImageSourceQueueX::GetNativeImageHandle() const
116 {
117   return nullptr;
118 }
119
120 bool NativeImageSourceQueueX::SourceChanged() const
121 {
122   return true;
123 }
124
125 } // namespace Adaptor
126
127 } // namespace Internal
128
129 } // namespace Dali