1 #ifndef DALI_INTERNAL_WINDOWSYSTEM_COMMON_PIXMAP_RENDER_SURFACE_H
2 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_PIXMAP_RENDER_SURFACE_H
5 * Copyright (c) 2021 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.
22 #include <dali/integration-api/adaptor-framework/render-surface-interface.h>
23 #include <dali/internal/graphics/common/graphics-interface.h>
27 class TriggerEventInterface;
34 * Pixmap interface of render surface.
36 class PixmapRenderSurface : public Dali::RenderSurfaceInterface
40 * @brief Default constructor
42 PixmapRenderSurface() = default;
47 virtual ~PixmapRenderSurface() = default;
51 * @brief Get the render surface the adaptor is using to render to.
52 * @return reference to current render surface
54 virtual Any GetSurface() = 0;
57 * @brief Sets the render notification trigger to call when render thread is completed a frame
58 * @param renderNotification to use
60 virtual void SetRenderNotification(TriggerEventInterface* renderNotification) = 0;
63 * @copydoc Dali::RenderSurfaceInterface::GetDepthBufferRequired()
65 Integration::DepthBufferAvailable GetDepthBufferRequired() override
67 return mGraphics ? mGraphics->GetDepthBufferRequired() : Integration::DepthBufferAvailable::FALSE;
71 * @copydoc Dali::RenderSurfaceInterface::GetStencilBufferRequired()
73 Integration::StencilBufferAvailable GetStencilBufferRequired() override
75 return mGraphics ? mGraphics->GetStencilBufferRequired() : Integration::StencilBufferAvailable::FALSE;
80 * Second stage construction
82 virtual void Initialize(Any surface) = 0;
85 * @brief Create a renderable
87 virtual void CreateRenderable() = 0;
90 * @brief Use an existing render surface
91 * @param surfaceId the id of the surface
93 virtual void UseExistingRenderable(unsigned int surfaceId) = 0;
97 PixmapRenderSurface(const PixmapRenderSurface&) = delete;
100 PixmapRenderSurface& operator=(const PixmapRenderSurface& rhs) = delete;
103 } // namespace Adaptor
105 } // namespace Internal
109 #endif // DALI_INTERNAL_WINDOWSYSTEM_COMMON_PIXMAP_RENDER_SURFACE_H