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