projects
/
platform
/
core
/
uifw
/
dali-adaptor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "[Tizen] Add screen and client rotation itself function"
[platform/core/uifw/dali-adaptor.git]
/
dali
/
integration-api
/
adaptor-framework
/
render-surface-interface.h
diff --git
a/dali/integration-api/adaptor-framework/render-surface-interface.h
b/dali/integration-api/adaptor-framework/render-surface-interface.h
index
f780554
..
2c7f6b7
100644
(file)
--- a/
dali/integration-api/adaptor-framework/render-surface-interface.h
+++ b/
dali/integration-api/adaptor-framework/render-surface-interface.h
@@
-2,7
+2,7
@@
#define DALI_RENDER_SURFACE_INTERFACE_H
/*
#define DALI_RENDER_SURFACE_INTERFACE_H
/*
- * Copyright (c) 20
19
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
20
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-19,9
+19,14
@@
*/
// EXTERNAL INCLUDES
*/
// EXTERNAL INCLUDES
-#include <dali/integration-api/render-surface.h>
#include <dali/integration-api/core-enumerations.h>
#include <dali/integration-api/core-enumerations.h>
+#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/math/vector4.h>
#include <dali/public-api/math/vector4.h>
+#include <dali/public-api/math/rect.h>
+#include <dali/public-api/object/any.h>
+#include <dali/public-api/object/weak-handle.h>
+#include <dali/integration-api/scene.h>
+#include <dali/public-api/math/uint-16-pair.h>
namespace Dali
{
namespace Dali
{
@@
-39,6
+44,12
@@
class GraphicsInterface;
}
/**
}
/**
+ * @brief The position and size of the render surface.
+ */
+using PositionSize = Dali::Rect<int>;
+using SurfaceSize = Uint16Pair;
+
+/**
* @brief Interface for a render surface onto which Dali draws.
*
* Dali::Adaptor requires a render surface to draw on to. This is
* @brief Interface for a render surface onto which Dali draws.
*
* Dali::Adaptor requires a render surface to draw on to. This is
@@
-51,10
+62,17
@@
class GraphicsInterface;
* implementation of RenderSurface for the given platform
*/
* implementation of RenderSurface for the given platform
*/
-class RenderSurfaceInterface
: public Dali::Integration::RenderSurface
+class RenderSurfaceInterface
{
public:
{
public:
+ enum Type
+ {
+ WINDOW_RENDER_SURFACE,
+ PIXMAP_RENDER_SURFACE,
+ NATIVE_RENDER_SURFACE
+ };
+
/**
* @brief Constructor
* Inlined as this is a pure abstract interface
/**
* @brief Constructor
* Inlined as this is a pure abstract interface
@@
-63,6
+81,7
@@
public:
: mAdaptor( nullptr ),
mGraphics( nullptr ),
mDisplayConnection( nullptr ),
: mAdaptor( nullptr ),
mGraphics( nullptr ),
mDisplayConnection( nullptr ),
+ mScene(),
mDepthBufferRequired( Integration::DepthBufferAvailable::FALSE ),
mStencilBufferRequired( Integration::StencilBufferAvailable::FALSE )
{}
mDepthBufferRequired( Integration::DepthBufferAvailable::FALSE ),
mStencilBufferRequired( Integration::StencilBufferAvailable::FALSE )
{}
@@
-123,9
+142,10
@@
public:
* If the operation fails, then Core::Render should not be called until there is
* a surface to render onto.
* @param[in] resizingSurface True if the surface is being resized
* If the operation fails, then Core::Render should not be called until there is
* a surface to render onto.
* @param[in] resizingSurface True if the surface is being resized
+ * @param[in] damagedRects List of damaged rects this render pass
* @return True if the operation is successful, False if the operation failed
*/
* @return True if the operation is successful, False if the operation failed
*/
- virtual bool PreRender( bool resizingSurface ) = 0;
+ virtual bool PreRender( bool resizingSurface
, const std::vector<Rect<int>>& damagedRects, Rect<int>& clippingRect
) = 0;
/**
* @brief Invoked by render thread after Core::Render
/**
* @brief Invoked by render thread after Core::Render
@@
-133,7
+153,8
@@
public:
* @param[in] replacingSurface True if the surface is being replaced.
* @param[in] resizingSurface True if the surface is being resized.
*/
* @param[in] replacingSurface True if the surface is being replaced.
* @param[in] resizingSurface True if the surface is being resized.
*/
- virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ) = 0;
+ virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface, const std::vector<Rect<int>>& damagedRects ) = 0;
+
/**
* @brief Invoked by render thread when the thread should be stop
*/
/**
* @brief Invoked by render thread when the thread should be stop
*/
@@
-154,7
+175,7
@@
public:
/**
* @brief Gets the surface type
*/
/**
* @brief Gets the surface type
*/
- virtual Dali::
Integration::RenderSu
rface::Type GetSurfaceType() = 0;
+ virtual Dali::
RenderSurfaceInte
rface::Type GetSurfaceType() = 0;
/**
* @brief Makes the graphics context current
/**
* @brief Makes the graphics context current
@@
-190,6
+211,15
@@
public:
mDisplayConnection = &displayConnection;
}
mDisplayConnection = &displayConnection;
}
+ /**
+ * @brief Sets a Scene that is rendered on this surface.
+ * @param scene The Scene object
+ */
+ void SetScene( Dali::Integration::Scene& scene )
+ {
+ mScene = scene;
+ }
+
private:
/**
private:
/**
@@
-207,6
+237,7
@@
protected:
Dali::Internal::Adaptor::AdaptorInternalServices* mAdaptor;
Dali::Internal::Adaptor::GraphicsInterface* mGraphics;
Dali::DisplayConnection* mDisplayConnection;
Dali::Internal::Adaptor::AdaptorInternalServices* mAdaptor;
Dali::Internal::Adaptor::GraphicsInterface* mGraphics;
Dali::DisplayConnection* mDisplayConnection;
+ WeakHandle< Dali::Integration::Scene > mScene;
private:
private: