[dali_2.3.24] Merge branch 'devel/master'
[platform/core/uifw/dali-adaptor.git] / dali / internal / imaging / common / native-image-source-queue-impl.h
1 #ifndef DALI_INTERNAL_NATIVE_IMAGE_SOURCE_QUEUE_IMPL_H
2 #define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_QUEUE_IMPL_H
3
4 /*
5  * Copyright (c) 2023 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali/devel-api/adaptor-framework/native-image-source-queue.h>
23
24 namespace Dali
25 {
26 namespace Internal
27 {
28 namespace Adaptor
29 {
30 /**
31  * Dali internal NativeImageSourceQueue.
32  */
33 class NativeImageSourceQueue
34 {
35 public:
36   /**
37    * @copydoc Dali::NativeImageSourceQueue::New()
38    */
39   static NativeImageSourceQueue* New(uint32_t queueCount, uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorFormat colorFormat, Any nativeImageSourceQueue);
40
41   /**
42    * @copydoc Dali::NativeImageSourceQueue::GetNativeImageSourceQueue()
43    */
44   virtual Any GetNativeImageSourceQueue() const = 0;
45
46   /**
47    * @copydoc Dali::NativeImageSourceQueue::GetQueueCount
48    */
49   virtual uint32_t GetQueueCount() const = 0;
50
51   /**
52    * @copydoc Dali::NativeImageSourceQueue::SetSize
53    */
54   virtual void SetSize(uint32_t width, uint32_t height) = 0;
55
56   /**
57    * @copydoc Dali::NativeImageSourceQueue::IgnoreSourceImage
58    */
59   virtual void IgnoreSourceImage() = 0;
60
61   /**
62    * @copydoc Dali::NativeImageSourceQueue::CanDequeueBuffer
63    */
64   virtual bool CanDequeueBuffer() = 0;
65
66   /**
67    * @copydoc Dali::NativeImageSourceQueue::DequeueBuffer
68    */
69   virtual uint8_t* DequeueBuffer(uint32_t& width, uint32_t& height, uint32_t& stride) = 0;
70
71   /**
72    * @copydoc Dali::NativeImageSourceQueue::EnqueueBuffer
73    */
74   virtual bool EnqueueBuffer(uint8_t* buffer) = 0;
75
76   /**
77    * @copydoc Dali::NativeImageSourceQueue::FreeReleasedBuffers
78    */
79   virtual void FreeReleasedBuffers() = 0;
80
81   /**
82    * destructor
83    */
84   virtual ~NativeImageSourceQueue() = default;
85
86   /**
87    * @copydoc Dali::NativeImageInterface::CreateResource()
88    */
89   virtual bool CreateResource() = 0;
90
91   /**
92    * @copydoc Dali::NativeImageInterface::DestroyResource()
93    */
94   virtual void DestroyResource() = 0;
95
96   /**
97    * @copydoc Dali::NativeImageInterface::TargetTexture()
98    */
99   virtual uint32_t TargetTexture() = 0;
100
101   /**
102    * @copydoc Dali::NativeImageInterface::PrepareTexture()
103    */
104   virtual void PrepareTexture() = 0;
105
106   /**
107    * @copydoc Dali::NativeImageInterface::GetWidth()
108    */
109   virtual uint32_t GetWidth() const = 0;
110
111   /**
112    * @copydoc Dali::NativeImageInterface::GetHeight()
113    */
114   virtual uint32_t GetHeight() const = 0;
115
116   /**
117    * @copydoc Dali::NativeImageInterface::RequiresBlending()
118    */
119   virtual bool RequiresBlending() const = 0;
120
121   /**
122    * @copydoc Dali::NativeImageInterface::GetTextureTarget()
123    */
124   virtual int GetTextureTarget() const = 0;
125
126   /**
127    * @copydoc Dali::NativeImageInterface::ApplyNativeFragmentShader()
128    */
129   virtual bool ApplyNativeFragmentShader(std::string& shader) = 0;
130
131   /**
132    * @copydoc Dali::NativeImageInterface::GetCustomSamplerTypename()
133    */
134   virtual const char* GetCustomSamplerTypename() const = 0;
135
136   /**
137    * @copydoc Dali::NativeImageInterface::GetNativeImageHandle()
138    */
139   virtual Any GetNativeImageHandle() const = 0;
140
141   /**
142    * @copydoc Dali::NativeImageInterface::SourceChanged()
143    */
144   virtual bool SourceChanged() const = 0;
145
146   /**
147    * @copydoc Dali::NativeImageInterface::GetUpdatedArea()
148    */
149   virtual Rect<uint32_t> GetUpdatedArea() = 0;
150
151   /**
152    * @copydoc Dali::NativeImageInterface::GetExtension()
153    */
154   virtual NativeImageInterface::Extension* GetNativeImageInterfaceExtension() = 0;
155 };
156
157 } // namespace Adaptor
158
159 } // namespace Internal
160
161 } // namespace Dali
162
163 #endif // DALI_INTERNAL_NATIVE_IMAGE_SOURCE_QUEUE_IMPL_H