1 #ifndef __DALI_NATIVE_RENDER_SURFACE_H__
2 #define __DALI_NATIVE_RENDER_SURFACE_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.
22 #include <dali/public-api/dali-adaptor-common.h>
23 #ifdef DALI_ADAPTOR_COMPILATION
24 #include <dali/integration-api/egl-interface.h>
25 #include <dali/integration-api/render-surface.h>
27 #include <dali/integration-api/adaptors/egl-interface.h>
28 #include <dali/integration-api/adaptors/render-surface.h>
34 class TriggerEventInterface;
37 * Native interface of render surface.
39 class DALI_ADAPTOR_API NativeRenderSurface : public Dali::RenderSurface
44 * @brief Default constructor
46 NativeRenderSurface() = default;
51 virtual ~NativeRenderSurface() = default;
56 * @brief Get the render surface the adaptor is using to render to.
57 * @return reference to current render surface
59 virtual Any GetDrawable() = 0;
62 * @brief Sets the render notification trigger to call when render thread is completed a frame
63 * @param renderNotification to use
65 virtual void SetRenderNotification( TriggerEventInterface* renderNotification ) = 0;
68 * @brief Waits until surface is replaced
69 * After tbm surface is acquired in PostRender, this function is finished.
71 virtual void WaitUntilSurfaceReplaced() = 0;
73 private: // from NativeRenderSurface
76 * @brief Create a renderable
78 virtual void CreateNativeRenderable() = 0;
81 * @brief Release a drawable
83 virtual void ReleaseDrawable() = 0;
88 NativeRenderSurface(const NativeRenderSurface&) = delete;
91 NativeRenderSurface& operator=(const NativeRenderSurface& rhs) = delete;
97 #endif // __DALI_NATIVE_RENDER_SURFACE_H__