1 #ifndef DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_NATIVE_IMAGE_SURFACE_IMPL_ECORE_WL_H
2 #define DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_NATIVE_IMAGE_SURFACE_IMPL_ECORE_WL_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/public-api/object/any.h>
23 #include <tbm_surface.h>
24 #include <tbm_surface_queue.h>
27 #include <dali/devel-api/adaptor-framework/native-image-source-queue.h>
28 #include <dali/integration-api/adaptor-framework/egl-interface.h>
29 #include <dali/internal/graphics/common/graphics-interface.h>
30 #include <dali/internal/window-system/common/display-connection.h>
31 #include <dali/internal/window-system/common/native-image-surface-impl.h>
39 class NativeImageSurfaceEcoreWl : public Dali::Internal::Adaptor::NativeImageSurface
43 * @param [in] queue the NativeImageSourceQueue pointer
45 NativeImageSurfaceEcoreWl(Dali::NativeImageSourceQueuePtr queue);
50 ~NativeImageSurfaceEcoreWl() = default;
54 * @copydoc Dali::NativeImageSurface::GetNativeRenderable()
56 Any GetNativeRenderable() override;
59 * @copydoc Dali::NativeImageSurface::InitializeGraphics()
61 void InitializeGraphics() override;
64 * @copydoc Dali::NativeImageSurface::TerminateGraphics()
66 void TerminateGraphics() override;
69 * @copydoc Dali::NativeImageSurface::PreRender()
71 void PreRender() override;
74 * @copydoc Dali::NativeImageSurface::PostRender()
76 void PostRender() override;
79 * @copydoc Dali::NativeImageSurface::CanRender()
81 bool CanRender() override;
84 * @copydoc Dali::NativeImageSurface::SetGraphicsConfig()
86 bool SetGraphicsConfig(bool depth, bool stencil, int msaa, int version) override;
89 void MakeContextCurrent();
92 std::unique_ptr<Dali::DisplayConnection> mDisplayConnection; ///< The native display connection
93 std::unique_ptr<GraphicsInterface> mGraphics; ///< Graphics interface
95 EGLSurface mEGLSurface;
96 EGLContext mEGLContext;
97 ColorDepth mColorDepth;
98 tbm_format mTbmFormat;
99 tbm_surface_queue_h mTbmQueue;
107 } // namespace Adaptor
108 } // namespace Internal
111 #endif // DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_NATIVE_IMAGE_SURFACE_IMPL_ECORE_WL_H