1 #ifndef DALI_INTERNAL_NATIVE_IMAGE_SOURCE_QUEUE_IMPL_X_H
2 #define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_QUEUE_IMPL_X_H
5 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
24 #include <dali/internal/imaging/common/native-image-source-queue-impl.h>
36 class EglImageExtensions;
39 * Dali internal NativeImageSourceQueue.
41 class NativeImageSourceQueueX: public Internal::Adaptor::NativeImageSourceQueue
46 * Create a new NativeImageSourceQueueX internally.
47 * Depending on hardware the width and height may have to be a power of two.
48 * @param[in] width The width of the image.
49 * @param[in] height The height of the image.
50 * @param[in] depth color depth of the image.
51 * @param[in] nativeImageSourceQueue contains tbm_surface_queue_h or is empty
52 * @return A smart-pointer to a newly allocated image.
54 static NativeImageSourceQueueX* New( uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue );
57 * @copydoc Dali::NativeImageSourceQueue::GetNativeImageSourceQueue()
59 Any GetNativeImageSourceQueue() const override;
62 * @copydoc Dali::NativeImageSourceQueue::SetSize
64 void SetSize( uint32_t width, uint32_t height ) override;
67 * @copydoc Dali::NativeImageSourceQueue::IgnoreSourceImage
69 void IgnoreSourceImage() override;
74 ~NativeImageSourceQueueX() override;
77 * @copydoc Dali::NativeImageInterface::CreateResource()
79 bool CreateResource() override;
82 * @copydoc Dali::NativeImageInterface::DestroyResource()
84 void DestroyResource() override;
87 * @copydoc Dali::NativeImageInterface::TargetTexture()
89 uint32_t TargetTexture() override;
92 * @copydoc Dali::NativeImageInterface::PrepareTexture()
94 void PrepareTexture() override;
97 * @copydoc Dali::NativeImageInterface::GetWidth()
99 uint32_t GetWidth() const override
105 * @copydoc Dali::NativeImageInterface::GetHeight()
107 uint32_t GetHeight() const override
113 * @copydoc Dali::NativeImageInterface::RequiresBlending()
115 bool RequiresBlending() const override
121 * @copydoc Dali::NativeImageInterface::GetTextureTarget()
123 int GetTextureTarget() const override;
126 * @copydoc Dali::NativeImageInterface::GetCustomFragmentPrefix()
128 const char* GetCustomFragmentPrefix() const override;
131 * @copydoc Dali::NativeImageInterface::GetCustomSamplerTypename()
133 const char* GetCustomSamplerTypename() const override;
136 * @copydoc Dali::NativeImageInterface::GetNativeImageHandle()
138 Any GetNativeImageHandle() const override;
141 * @copydoc Dali::NativeImageInterface::SourceChanged()
143 bool SourceChanged() const override;
146 * @copydoc Dali::NativeImageInterface::GetExtension()
148 NativeImageInterface::Extension* GetNativeImageInterfaceExtension() override
156 * Private constructor; @see NativeImageSourceQueue::New()
157 * @param[in] width The width of the image.
158 * @param[in] height The height of the image.
159 * @param[in] colour depth of the image.
160 * @param[in] nativeImageSourceQueue contains tbm_surface_queue_h or is empty
162 NativeImageSourceQueueX( uint32_t width, uint32_t height, Dali::NativeImageSourceQueue::ColorDepth depth, Any nativeImageSourceQueue );
166 uint32_t mWidth; ///< image width
167 uint32_t mHeight; ///< image height
171 } // namespace Adaptor
173 } // namespace Internal
177 #endif // DALI_INTERNAL_NATIVE_IMAGE_SOURCE_QUEUE_IMPL_X_H