SET( adaptor_thread_dir ${ADAPTOR_ROOT}/dali/internal/thread )
include( ${ADAPTOR_ROOT}/dali/internal/thread/file.list )
-SET( adaptor_vector_animation_dir ${ADAPTOR_ROOT}/dali/internal/vector-animation )
-include( ${ADAPTOR_ROOT}/dali/internal/vector-animation/file.list )
-
-SET( adaptor_vector_image_dir ${ADAPTOR_ROOT}/dali/internal/vector-image )
-include( ${ADAPTOR_ROOT}/dali/internal/vector-image/file.list )
-
-SET( adaptor_canvas_renderer_dir ${ADAPTOR_ROOT}/dali/internal/canvas-renderer )
-include( ${ADAPTOR_ROOT}/dali/internal/canvas-renderer/file.list )
-
-SET( adaptor_public_api_dir ${ADAPTOR_ROOT}/dali/public-api )
-include( ${ADAPTOR_ROOT}/dali/public-api/file.list )
-
-SET( adaptor_dali_header_dir ${ADAPTOR_ROOT}/dali )
-include( ${ADAPTOR_ROOT}/dali/file.list )
-
-SET( adaptor_devel_api_dir ${ADAPTOR_ROOT}/dali/devel-api )
-include( ${ADAPTOR_ROOT}/dali/devel-api/file.list )
-
-SET( adaptor_integration_api_dir ${ADAPTOR_ROOT}/dali/integration-api )
-include( ${ADAPTOR_ROOT}/dali/integration-api/file.list )
-
-SET( adaptor_thirdparty_dir ${ADAPTOR_ROOT}/third-party )
-include( ${ADAPTOR_ROOT}/third-party/file.list )
-SET( adaptor_accessibility_dir ${ADAPTOR_ROOT}/dali/internal/accessibility )
-include( ${ADAPTOR_ROOT}/dali/internal/accessibility/file.list )
-
-SET( adaptor_adaptor_dir ${ADAPTOR_ROOT}/dali/internal/adaptor )
-include( ${ADAPTOR_ROOT}/dali/internal/adaptor/file.list )
-
-SET( adaptor_clipboard_dir ${ADAPTOR_ROOT}/dali/internal/clipboard )
-include( ${ADAPTOR_ROOT}/dali/internal/clipboard/file.list )
-
-SET( adaptor_drag_and_drop_dir ${ADAPTOR_ROOT}/dali/internal/drag-and-drop )
-include( ${ADAPTOR_ROOT}/dali/internal/drag-and-drop/file.list )
-
-SET( adaptor_framework_dir ${ADAPTOR_ROOT}/dali/internal/adaptor-framework )
-include( ${ADAPTOR_ROOT}/dali/internal/adaptor-framework/file.list )
-
-SET( adaptor_graphics_dir ${ADAPTOR_ROOT}/dali/internal/graphics )
-include( ${ADAPTOR_ROOT}/dali/internal/graphics/file.list )
-
-SET( adaptor_haptics_dir ${ADAPTOR_ROOT}/dali/internal/haptics )
-include( ${ADAPTOR_ROOT}/dali/internal/haptics/file.list )
-
-SET( adaptor_imaging_dir ${ADAPTOR_ROOT}/dali/internal/imaging )
-include( ${ADAPTOR_ROOT}/dali/internal/imaging/file.list )
-
-SET( adaptor_input_dir ${ADAPTOR_ROOT}/dali/internal/input )
-include( ${ADAPTOR_ROOT}/dali/internal/input/file.list )
-
-SET( adaptor_legacy_dir ${ADAPTOR_ROOT}/dali/internal/legacy )
-include( ${ADAPTOR_ROOT}/dali/internal/legacy/file.list )
-
-SET( adaptor_network_dir ${ADAPTOR_ROOT}/dali/internal/network )
-include( ${ADAPTOR_ROOT}/dali/internal/network/file.list )
-
-SET( adaptor_sensor_dir ${ADAPTOR_ROOT}/dali/internal/sensor )
-include( ${ADAPTOR_ROOT}/dali/internal/sensor/file.list )
-
-SET( adaptor_styling_dir ${ADAPTOR_ROOT}/dali/internal/styling )
-include( ${ADAPTOR_ROOT}/dali/internal/styling/file.list )
-
-SET( adaptor_system_dir ${ADAPTOR_ROOT}/dali/internal/system )
-include( ${ADAPTOR_ROOT}/dali/internal/system/file.list )
-
-SET( adaptor_text_dir ${ADAPTOR_ROOT}/dali/internal/text )
-include( ${ADAPTOR_ROOT}/dali/internal/text/file.list )
-
-SET( adaptor_video_dir ${ADAPTOR_ROOT}/dali/internal/video )
-include( ${ADAPTOR_ROOT}/dali/internal/video/file.list )
-
-SET( adaptor_camera_dir ${ADAPTOR_ROOT}/dali/internal/camera )
-include( ${ADAPTOR_ROOT}/dali/internal/camera/file.list )
-
-SET( adaptor_web_engine_dir ${ADAPTOR_ROOT}/dali/internal/web-engine )
-include( ${ADAPTOR_ROOT}/dali/internal/web-engine/file.list )
-
-SET( adaptor_window_system_dir ${ADAPTOR_ROOT}/dali/internal/window-system )
-include( ${ADAPTOR_ROOT}/dali/internal/window-system/file.list )
-
-SET( adaptor_trace_dir ${ADAPTOR_ROOT}/dali/internal/trace )
-include( ${ADAPTOR_ROOT}/dali/internal/trace/file.list )
-
-SET( adaptor_thread_dir ${ADAPTOR_ROOT}/dali/internal/thread )
-include( ${ADAPTOR_ROOT}/dali/internal/thread/file.list )
-
SET( adaptor_addons_dir ${ADAPTOR_ROOT}/dali/internal/addons )
include( ${ADAPTOR_ROOT}/dali/internal/addons/file.list )
SET( adaptor_thirdparty_dir ${ADAPTOR_ROOT}/third-party )
include( ${ADAPTOR_ROOT}/third-party/file.list )
-
#define DALI_INTEGRATION_EGL_INTERFACE_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// INTERNAL INCLUDES
#include <dali/internal/graphics/common/egl-include.h>
+#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/math/rect.h>
namespace Dali
{
class EglInterface
{
public:
+ /**
+ * Choose config of egl
+ * @param isWindowType whether the config for window or pixmap
+ * @param colorDepth Bit per pixel value (ex. 32 or 24)
+ * @return true if the eglChooseConfig is succeed.
+ */
+ virtual bool ChooseConfig(bool isWindowType, ColorDepth depth) = 0;
+
/**
* Create the OpenGL context.
* @return true if successful
*/
virtual bool CreateContext() = 0;
+ /**
+ * Create the OpenGL context for the window.
+ * @return true if successful
+ */
+ virtual bool CreateWindowContext(EGLContext& mEglContext) = 0;
+
+ /**
+ * Create an OpenGL surface using a window
+ * @param window The window to create the surface on
+ * @param colorDepth Bit per pixel value (ex. 32 or 24)
+ * @return Handle to an on-screen EGL window surface (the requester has an ownership of this egl surface)
+ */
+ virtual EGLSurface CreateSurfaceWindow(EGLNativeWindowType window, ColorDepth depth) = 0;
+
+ /**
+ * Destroy the OpenGL context.
+ */
+ virtual void DestroyContext(EGLContext& eglContext) = 0;
+
+ /**
+ * Destroy the OpenGL surface.
+ */
+ virtual void DestroySurface(EGLSurface& eglSurface) = 0;
+
/**
* Make the OpenGL context current
*/
*/
virtual void TerminateGles() = 0;
+ /**
+ * Replaces the render surface
+ * @param[in] window, the window to create the new surface on
+ * @return true if the context was lost due to a change in display
+ * between old surface and new surface
+ */
+ virtual bool ReplaceSurfaceWindow(EGLNativeWindowType window, EGLSurface& eglSurface, EGLContext& eglContext) = 0;
+
+ /**
+ * @brief Returns whether the partial update is required.
+ * @return true if the partial update is required.
+ */
+ virtual bool IsPartialUpdateRequired() const = 0;
+
+ /**
+ * Gets current back buffer age
+ */
+ virtual int GetBufferAge(EGLSurface& eglSurface) const = 0;
+
+ /**
+ * Performs an OpenGL set damage command with damaged rects
+ */
+ virtual void SetDamageRegion(EGLSurface& eglSurface, std::vector<Rect<int>>& damagedRects) = 0;
+
/**
* Performs an OpenGL swap buffers command
*/
virtual void SwapBuffers(EGLSurface& eglSurface) = 0;
+ /**
+ * Performs an OpenGL swap buffers command
+ */
+ virtual void SwapBuffers(EGLSurface& eglSurface, const std::vector<Rect<int>>& damagedRects) = 0;
+
/**
* Performs an OpenGL copy buffers command
*/
// INTERNAL INCLUDES
#include <dali/internal/adaptor/common/adaptor-impl.h>
#include <dali/internal/adaptor/common/lifecycle-observer.h>
-#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/internal/input/common/key-impl.h>
#include <dali/internal/input/common/physical-keyboard-impl.h>
#include <dali/internal/system/common/time-service.h>
#include <dali/internal/system/common/thread-controller.h>
#include <dali/public-api/dali-adaptor-common.h>
-#include <dali/internal/graphics/gles/egl-graphics-factory.h>
#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/devel-api/text-abstraction/font-client.h>
#include <dali/internal/accessibility/common/tts-player-impl.h>
-#include <dali/internal/graphics/common/egl-image-extensions.h>
-#include <dali/internal/graphics/gles/egl-sync-implementation.h>
#include <dali/internal/graphics/gles/gl-implementation.h>
#include <dali/internal/graphics/gles/gl-proxy-implementation.h>
#include <dali/internal/system/common/callback-manager.h>
#define DALI_INTERNAL_ADAPTOR_INTERNAL_SERVICES_H
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
#include <dali/integration-api/adaptor-framework/trigger-event-interface.h>
#include <dali/internal/graphics/common/graphics-interface.h>
-#include <dali/internal/graphics/gles/egl-factory-interface.h>
#include <dali/internal/network/common/socket-factory-interface.h>
#include <dali/internal/network/common/trace-interface.h>
#include <dali/internal/system/common/performance-interface.h>
#include <dali/internal/adaptor/common/adaptor-internal-services.h>
#include <dali/internal/adaptor/common/combined-update-render-controller-debug.h>
#include <dali/internal/graphics/common/graphics-interface.h>
-#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/internal/system/common/environment-options.h>
#include <dali/internal/system/common/texture-upload-manager-impl.h>
#include <dali/internal/system/common/time-service.h>
#include "gles-graphics-render-target.h"
#include "gles-texture-dependency-checker.h"
-#include <EGL/egl.h>
-#include <EGL/eglext.h>
+#include <dali/internal/graphics/common/egl-include.h>
+
#include <map>
#include <unordered_map>
mImpl->mCurrentUBOBindings.clear();
mImpl->mCurrentTextureBindings.clear();
mImpl->mCurrentVertexBufferBindings.clear();
- mImpl->mCurrentRenderTarget = nullptr;
- mImpl->mCurrentRenderPass = nullptr;
- mImpl->mVertexBuffersChanged = true;
+ mImpl->mCurrentRenderTarget = nullptr;
+ mImpl->mCurrentRenderPass = nullptr;
+ mImpl->mVertexBuffersChanged = true;
mImpl->mCurrentIndexBufferBinding = {};
- mImpl->mCurrentSamplerBindings = {};
- mImpl->mProgramVAOCurrentState = 0;
+ mImpl->mCurrentSamplerBindings = {};
+ mImpl->mProgramVAOCurrentState = 0;
ClearState();
mImpl->InitializeGlState();
mGraphicsController.Destroy();
}
-GlImplementation& EglGraphics::GetGlesInterface()
-{
- return *mGLES;
-}
-
Integration::GlAbstraction& EglGraphics::GetGlAbstraction() const
{
DALI_ASSERT_DEBUG(mGLES && "GLImplementation not created");
*/
EglInterface& GetEglInterface() const;
- /**
- * @copydoc Dali::Integration::GlAbstraction& GetGlesInterface()
- */
- GlImplementation& GetGlesInterface();
-
/**
* Gets the implementation of GlSyncAbstraction for EGL.
* @return The implementation of GlSyncAbstraction for EGL.
}
}
-EGLint EglImplementation::GetBufferAge(EGLSurface& eglSurface) const
+int EglImplementation::GetBufferAge(EGLSurface& eglSurface) const
{
START_DURATION_CHECK();
- EGLint age = 0;
+ int age = 0;
eglQuerySurface(mEglDisplay, eglSurface, EGL_BUFFER_AGE_EXT, &age);
if(age < 0)
{
#define DALI_INTERNAL_EGL_IMPLEMENTATION_H
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/common/list-wrapper.h>
-#include <dali/public-api/common/vector-wrapper.h>
-
#include <dali/integration-api/core-enumerations.h>
#include <dali/internal/graphics/common/egl-include.h>
#include <dali/public-api/common/dali-vector.h>
-#include <dali/public-api/common/vector-wrapper.h>
-#include <dali/public-api/math/rect.h>
// INTERNAL INCLUDES
#include <dali/integration-api/adaptor-framework/egl-interface.h>
* Create the OpenGL context for the window.
* @return true if successful
*/
- bool CreateWindowContext(EGLContext& mEglContext);
+ bool CreateWindowContext(EGLContext& mEglContext) override;
/**
* Destroy the OpenGL context.
*/
- void DestroyContext(EGLContext& eglContext);
+ void DestroyContext(EGLContext& eglContext) override;
/**
* Destroy the OpenGL surface.
*/
- void DestroySurface(EGLSurface& eglSurface);
+ void DestroySurface(EGLSurface& eglSurface) override;
/**
* Make the OpenGL context current
bool IsGlesInitialized() const;
/**
- * Performs an OpenGL swap buffers command
+ * Gets current back buffer age
*/
- void SwapBuffers(EGLSurface& eglSurface) override;
+ int GetBufferAge(EGLSurface& eglSurface) const override;
/**
- * Gets current back buffer age
+ * @copydoc EglInterface::SetDamageRegion
*/
- EGLint GetBufferAge(EGLSurface& eglSurface) const;
+ void SetDamageRegion(EGLSurface& eglSurface, std::vector<Rect<int>>& damagedRects) override;
/**
- * Performs an OpenGL set damage command with damaged rects
+ * @copydoc EglInterface::SwapBuffers
*/
- void SetDamageRegion(EGLSurface& eglSurface, std::vector<Rect<int>>& damagedRects);
+ void SwapBuffers(EGLSurface& eglSurface) override;
/**
- * Performs an OpenGL swap buffers command with damaged rects
+ * @copydoc EglInterface::SwapBuffers
*/
- virtual void SwapBuffers(EGLSurface& eglSurface, const std::vector<Rect<int>>& damagedRects);
+ void SwapBuffers(EGLSurface& eglSurface, const std::vector<Rect<int>>& damagedRects) override;
/**
* Performs an OpenGL copy buffers command
void WaitGL() override;
/**
- * Choose config of egl
- * @param isWindowType whether the config for window or pixmap
- * @param colorDepth Bit per pixel value (ex. 32 or 24)
- * @return true if the eglChooseConfig is succeed.
- */
- bool ChooseConfig(bool isWindowType, ColorDepth depth);
+ * @copydoc EglInterface::ChooseConfig
+ */
+ bool ChooseConfig(bool isWindowType, ColorDepth depth) override;
/**
- * Create an OpenGL surface using a window
- * @param window The window to create the surface on
- * @param colorDepth Bit per pixel value (ex. 32 or 24)
- * @return Handle to an on-screen EGL window surface (the requester has an ownership of this egl surface)
- */
- EGLSurface CreateSurfaceWindow(EGLNativeWindowType window, ColorDepth depth);
+ * @copydoc EglInterface::CreateSurfaceWindow
+ */
+ EGLSurface CreateSurfaceWindow(EGLNativeWindowType window, ColorDepth depth) override;
/**
* Create the OpenGL surface using a pixmap
EGLSurface CreateSurfacePixmap(EGLNativePixmapType pixmap, ColorDepth depth);
/**
- * Replaces the render surface
- * @param[in] window, the window to create the new surface on
- * @return true if the context was lost due to a change in display
- * between old surface and new surface
+ * @copydoc EglInterface::ReplaceSurfaceWindow
*/
- bool ReplaceSurfaceWindow(EGLNativeWindowType window, EGLSurface& eglSurface, EGLContext& eglContext);
+ bool ReplaceSurfaceWindow(EGLNativeWindowType window, EGLSurface& eglSurface, EGLContext& eglContext) override;
/**
* Replaces the render surface
* @brief Returns whether the partial update is required.
* @return true if the partial update is required.
*/
- bool IsPartialUpdateRequired() const;
+ bool IsPartialUpdateRequired() const override;
private:
Vector<EGLint> mContextAttribs;
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// INTERNAL INCLUDES
#include <dali/internal/adaptor/common/adaptor-impl.h>
-#include <dali/internal/graphics/common/egl-image-extensions.h>
-#include <dali/internal/graphics/gles/egl-graphics.h>
namespace Dali
{
#define DALI_INTERNAL_NATIVE_IMAGE_SOURCE_QUEUE_IMPL_ANDROID_H
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
namespace Adaptor
{
-class EglGraphics;
-class EglImageExtensions;
-
/**
* Dali internal NativeImageSourceQueue.
*/
// EXTERNAL INCLUDES
#include <dali/devel-api/common/stage.h>
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/gl-defines.h>
// INTERNAL INCLUDES
#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
-#include <dali/internal/graphics/common/egl-image-extensions.h>
-#include <dali/internal/graphics/gles/egl-graphics.h>
namespace Dali::Internal::Adaptor
{
#pragma once
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace Dali::Internal::Adaptor
{
-class EglImageExtensions;
-
/**
* Dali internal NativeImageSource.
*/
#include <dali/devel-api/adaptor-framework/window-devel.h>
#include <dali/integration-api/adaptor-framework/adaptor.h>
#include <dali/internal/adaptor/common/adaptor-impl.h>
-#include <dali/internal/graphics/gles/egl-graphics.h>
namespace Dali
{
#include <dali/devel-api/adaptor-framework/accessibility-bridge.h>
#include <dali/devel-api/atspi-interfaces/accessible.h>
#include <dali/integration-api/adaptor-framework/render-surface-interface.h>
-#include <dali/internal/graphics/gles/egl-graphics.h>
#include <dali/internal/window-system/common/event-handler.h>
#include <dali/internal/window-system/common/orientation-impl.h>
#include <dali/internal/window-system/common/render-surface-factory.h>
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
auto eglGraphics = static_cast<EglGraphics*>(mGraphics);
mEGL = &eglGraphics->GetEglInterface();
- // Create the OpenGL context for this window
- Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>(*mEGL);
- eglImpl.ChooseConfig(true, mColorDepth);
- eglImpl.CreateWindowContext(mEGLContext);
+ if(mEGL)
+ {
+ // Create the OpenGL context for this window
+ mEGL->ChooseConfig(true, mColorDepth);
+ mEGL->CreateWindowContext(mEGLContext);
+ }
// Create the OpenGL surface
CreateSurface();
InitializeImeSurface();
}
- auto eglGraphics = static_cast<EglGraphics*>(mGraphics);
-
- Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
- mEGLSurface = eglImpl.CreateSurfaceWindow(window, mColorDepth);
+ if(mEGL)
+ {
+ mEGLSurface = mEGL->CreateSurfaceWindow(window, mColorDepth);
+ }
DALI_LOG_RELEASE_INFO("WindowRenderSurface::CreateSurface: WinId (%d), EGLSurface (%p), w = %d h = %d angle = %d screen rotation = %d\n",
mWindowBase->GetNativeWindowId(),
{
DALI_LOG_TRACE_METHOD(gWindowRenderSurfaceLogFilter);
- auto eglGraphics = static_cast<EglGraphics*>(mGraphics);
- if(eglGraphics)
+ if(mEGL)
{
DALI_LOG_RELEASE_INFO("WindowRenderSurface::DestroySurface: WinId (%d)\n", mWindowBase->GetNativeWindowId());
- Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
-
- eglImpl.DestroySurface(mEGLSurface);
+ mEGL->DestroySurface(mEGLSurface);
mEGLSurface = nullptr;
// Destroy context also
- eglImpl.DestroyContext(mEGLContext);
+ mEGL->DestroyContext(mEGLContext);
mEGLContext = nullptr;
mWindowBase->DestroyEglWindow();
// Create the EGL window
EGLNativeWindowType window = mWindowBase->CreateEglWindow(width, height);
- auto eglGraphics = static_cast<EglGraphics*>(mGraphics);
-
- Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
- return eglImpl.ReplaceSurfaceWindow(window, mEGLSurface, mEGLContext);
+ if(mEGL)
+ {
+ return mEGL->ReplaceSurfaceWindow(window, mEGLSurface, mEGLContext);
+ }
+ return false;
}
void WindowRenderSurface::UpdatePositionSize(Dali::PositionSize positionSize)
}
}
- // This is now done when the render pass for the render surface begins
- // MakeContextCurrent();
-
return true;
}
auto eglGraphics = static_cast<EglGraphics*>(mGraphics);
if(eglGraphics)
{
- GlImplementation& mGLES = eglGraphics->GetGlesInterface();
- mGLES.PostRender();
+ auto& gl = eglGraphics->GetGlAbstraction();
+ gl.PostRender();
bool needWindowRotationCompleted = false;
{
mPostRenderTrigger = std::unique_ptr<TriggerEventInterface>(TriggerEventFactory::CreateTriggerEvent(MakeCallback(this, &WindowRenderSurface::ProcessPostRender),
TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER));
-
}
}
}
void WindowRenderSurface::SetBufferDamagedRects(const std::vector<Rect<int>>& damagedRects, Rect<int>& clippingRect)
{
- auto eglGraphics = static_cast<EglGraphics*>(mGraphics);
- if(eglGraphics)
+ if(mEGL)
{
// If scene is not exist, just use stored mPositionSize.
Rect<int> surfaceRect(0, 0, mPositionSize.width, mPositionSize.height);
orientation = std::min(totalAngle / 90, 3);
}
- Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
- if(!eglImpl.IsPartialUpdateRequired() || mFullSwapNextFrame)
+ if(!mEGL->IsPartialUpdateRequired() || mFullSwapNextFrame)
{
InsertRects(mBufferDamagedRects, surfaceRect);
clippingRect = surfaceRect;
mGraphics->ActivateSurfaceContext(this);
- EGLint bufferAge = eglImpl.GetBufferAge(mEGLSurface);
+ EGLint bufferAge = mEGL->GetBufferAge(mEGLSurface);
// Buffer age 0 means the back buffer in invalid and requires full swap
if(bufferAge == 0)
damagedRegion.push_back(clippingRect);
}
- eglImpl.SetDamageRegion(mEGLSurface, damagedRegion);
+ mEGL->SetDamageRegion(mEGLSurface, damagedRegion);
}
}
}
void WindowRenderSurface::SwapBuffers(const std::vector<Rect<int>>& damagedRects)
{
- auto eglGraphics = static_cast<EglGraphics*>(mGraphics);
- if(eglGraphics)
+ if(mEGL)
{
- Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
-
- if(!eglImpl.IsPartialUpdateRequired() || mFullSwapNextFrame)
+ if(!mEGL->IsPartialUpdateRequired() || mFullSwapNextFrame)
{
mFullSwapNextFrame = false;
- eglImpl.SwapBuffers(mEGLSurface);
+ mEGL->SwapBuffers(mEGLSurface);
return;
}
{
// In normal cases, WindowRenderSurface::SwapBuffers() will not be called if mergedRects.size() is 0.
// For exceptional cases, swap full area.
- eglImpl.SwapBuffers(mEGLSurface);
+ mEGL->SwapBuffers(mEGLSurface);
}
else
{
- eglImpl.SwapBuffers(mEGLSurface, damagedRects);
+ mEGL->SwapBuffers(mEGLSurface, damagedRects);
}
}
}
{
if(mIsFrontBufferRendering != enable)
{
- mIsFrontBufferRendering = enable;
+ mIsFrontBufferRendering = enable;
mIsFrontBufferRenderingChanged = !mIsFrontBufferRenderingChanged;
}
}