projects
/
platform
/
core
/
uifw
/
dali-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "[Tizen] Add codes for Dali Windows Backend"
[platform/core/uifw/dali-core.git]
/
dali
/
internal
/
render
/
common
/
render-manager.h
diff --git
a/dali/internal/render/common/render-manager.h
b/dali/internal/render/common/render-manager.h
index
e27d508
..
9191a27
100644
(file)
--- a/
dali/internal/render/common/render-manager.h
+++ b/
dali/internal/render/common/render-manager.h
@@
-2,7
+2,7
@@
#define __DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H__
/*
#define __DALI_INTERNAL_SCENE_GRAPH_RENDER_MANAGER_H__
/*
- * Copyright (c) 201
5
Samsung Electronics Co., Ltd.
+ * Copyright (c) 201
7
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.
@@
-20,9
+20,8
@@
// INTERNAL INCLUDES
#include <dali/public-api/math/rect.h>
// INTERNAL INCLUDES
#include <dali/public-api/math/rect.h>
+#include <dali/integration-api/core-enumerations.h>
#include <dali/internal/common/shader-saver.h>
#include <dali/internal/common/shader-saver.h>
-#include <dali/internal/update/resources/resource-manager-declarations.h>
-#include <dali/internal/render/common/texture-uploaded-dispatcher.h>
#include <dali/internal/render/gl-resources/gpu-buffer.h>
#include <dali/internal/render/renderers/render-property-buffer.h>
#include <dali/internal/event/rendering/texture-impl.h>
#include <dali/internal/render/gl-resources/gpu-buffer.h>
#include <dali/internal/render/renderers/render-property-buffer.h>
#include <dali/internal/event/rendering/texture-impl.h>
@@
-52,13
+51,12
@@
class Renderer;
struct Sampler;
class RenderTracker;
class Geometry;
struct Sampler;
class RenderTracker;
class Geometry;
-class
New
Texture;
+class Texture;
}
namespace SceneGraph
{
class RenderQueue;
}
namespace SceneGraph
{
class RenderQueue;
-class TextureCache;
class RenderInstruction;
class RenderInstructionContainer;
class Shader;
class RenderInstruction;
class RenderInstructionContainer;
class Shader;
@@
-68,19
+66,21
@@
class PropertyBufferDataProvider;
* RenderManager is responsible for rendering the result of the previous "update", which
* is provided in a RenderCommand during UpdateManager::Update().
*/
* RenderManager is responsible for rendering the result of the previous "update", which
* is provided in a RenderCommand during UpdateManager::Update().
*/
-class RenderManager
: public TextureUploadedDispatcher
+class RenderManager
{
public:
/**
* Construct a new RenderManager.
{
public:
/**
* Construct a new RenderManager.
- * @param[in] glAbstraction The GL abstraction used for rendering.
- * @param[in] glSyncAbstraction The GL sync abstraction used fence sync creation/deletion.
- * @param[out] resourcePostProcessQueue A queue for sending rendered texture ids to the update-thread.*
+ * @param[in] glAbstraction The GL abstraction used for rendering.
+ * @param[in] glSyncAbstraction The GL sync abstraction used fence sync creation/deletion.
+ * @param[in] depthBufferAvailable Whether the depth buffer is available
+ * @param[in] stencilBufferAvailable Whether the stencil buffer is available
*/
static RenderManager* New( Integration::GlAbstraction& glAbstraction,
Integration::GlSyncAbstraction& glSyncAbstraction,
*/
static RenderManager* New( Integration::GlAbstraction& glAbstraction,
Integration::GlSyncAbstraction& glSyncAbstraction,
- LockedResourceQueue& resourcePostProcessQueue );
+ Integration::DepthBufferAvailable depthBufferAvailable,
+ Integration::StencilBufferAvailable stencilBufferAvailable );
/**
* Non-virtual destructor; not intended as a base class
/**
* Non-virtual destructor; not intended as a base class
@@
-94,13
+94,6
@@
public:
RenderQueue& GetRenderQueue();
/**
RenderQueue& GetRenderQueue();
/**
- * Retrieve the texture cache. Messages should only be sent to this from the update thread,
- * accessor methods should only be used from the render thread.
- * @return The texture cache
- */
- TextureCache& GetTextureCache();
-
- /**
* @copydoc Dali::Integration::Core::ContextCreated()
*/
void ContextCreated();
* @copydoc Dali::Integration::Core::ContextCreated()
*/
void ContextCreated();
@@
-111,12
+104,6
@@
public:
void ContextDestroyed();
/**
void ContextDestroyed();
/**
- * Dispatch requests onto the postProcessResourcesQueue
- * @param[in] resource The Id of the resource to dispatch
- */
- virtual void DispatchTextureUploaded( ResourceId resource );
-
- /**
* Set the upstream interface for compiled shader binaries to be sent back to for eventual
* caching and saving.
* @param[in] upstream The abstract interface to send any received ShaderDatas onwards to..
* Set the upstream interface for compiled shader binaries to be sent back to for eventual
* caching and saving.
* @param[in] upstream The abstract interface to send any received ShaderDatas onwards to..
@@
-155,7
+142,7
@@
public:
* @param[in] renderer The renderer to add.
* @post renderer is owned by RenderManager
*/
* @param[in] renderer The renderer to add.
* @post renderer is owned by RenderManager
*/
- void AddRenderer(
Render::Renderer*
renderer );
+ void AddRenderer(
OwnerPointer< Render::Renderer >&
renderer );
/**
* Remove a Renderer from the render manager.
/**
* Remove a Renderer from the render manager.
@@
-169,7
+156,7
@@
public:
* @param[in] sampler The sampler to add.
* @post sampler is owned by RenderManager
*/
* @param[in] sampler The sampler to add.
* @post sampler is owned by RenderManager
*/
- void AddSampler(
Render::Sampler*
sampler );
+ void AddSampler(
OwnerPointer< Render::Sampler >&
sampler );
/**
* Remove a sampler from the render manager.
/**
* Remove a sampler from the render manager.
@@
-198,7
+185,7
@@
public:
* @param[in] propertyBuffer The property buffer to add.
* @post propertBuffer is owned by RenderManager
*/
* @param[in] propertyBuffer The property buffer to add.
* @post propertBuffer is owned by RenderManager
*/
- void AddPropertyBuffer(
Render::PropertyBuffer*
propertyBuffer );
+ void AddPropertyBuffer(
OwnerPointer< Render::PropertyBuffer >&
propertyBuffer );
/**
* Remove a property buffer from the render manager.
/**
* Remove a property buffer from the render manager.
@@
-212,7
+199,7
@@
public:
* @param[in] geometry The geometry to add.
* @post geometry is owned by RenderManager
*/
* @param[in] geometry The geometry to add.
* @post geometry is owned by RenderManager
*/
- void AddGeometry(
Render::Geometry*
geometry );
+ void AddGeometry(
OwnerPointer< Render::Geometry >&
geometry );
/**
* Remove a geometry from the render manager.
/**
* Remove a geometry from the render manager.
@@
-226,7
+213,7
@@
public:
* @param[in] geometry The geometry
* @param[in] propertyBuffer The property buffer to remove.
*/
* @param[in] geometry The geometry
* @param[in] propertyBuffer The property buffer to remove.
*/
- void A
dd
VertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
+ void A
ttach
VertexBuffer( Render::Geometry* geometry, Render::PropertyBuffer* propertyBuffer );
/**
* Remove a property buffer from a Render::Geometry from the render manager.
/**
* Remove a property buffer from a Render::Geometry from the render manager.
@@
-241,7
+228,7
@@
public:
* @param[in] propertyBuffer The property buffer.
* @param[in] format The new format of the buffer
*/
* @param[in] propertyBuffer The property buffer.
* @param[in] format The new format of the buffer
*/
- void SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer,
Render::PropertyBuffer::Format*
format );
+ void SetPropertyBufferFormat( Render::PropertyBuffer* propertyBuffer,
OwnerPointer< Render::PropertyBuffer::Format>&
format );
/**
* Sets the data of an existing property buffer
/**
* Sets the data of an existing property buffer
@@
-249,7
+236,7
@@
public:
* @param[in] data The new data of the buffer
* @param[in] size The new size of the buffer
*/
* @param[in] data The new data of the buffer
* @param[in] size The new size of the buffer
*/
- void SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer,
Dali::Vector<char>*
data, size_t size );
+ void SetPropertyBufferData( Render::PropertyBuffer* propertyBuffer,
OwnerPointer< Vector<char> >&
data, size_t size );
/**
* Sets the data for the index buffer of an existing geometry
/**
* Sets the data for the index buffer of an existing geometry
@@
-269,13
+256,13
@@
public:
* Adds a texture to the render manager
* @param[in] texture The texture to add
*/
* Adds a texture to the render manager
* @param[in] texture The texture to add
*/
- void AddTexture(
Render::NewTexture*
texture );
+ void AddTexture(
OwnerPointer< Render::Texture >&
texture );
/**
* Removes a texture from the render manager
* @param[in] texture The texture to remove
*/
/**
* Removes a texture from the render manager
* @param[in] texture The texture to remove
*/
- void RemoveTexture( Render::
New
Texture* texture );
+ void RemoveTexture( Render::Texture* texture );
/**
* Uploads data to an existing texture
/**
* Uploads data to an existing texture
@@
-283,13
+270,13
@@
public:
* @param[in] pixelData The pixel data object
* @param[in] params The parameters for the upload
*/
* @param[in] pixelData The pixel data object
* @param[in] params The parameters for the upload
*/
- void UploadTexture( Render::
NewTexture* texture, PixelDataPtr pixelData, const New
Texture::UploadParams& params );
+ void UploadTexture( Render::
Texture* texture, PixelDataPtr pixelData, const
Texture::UploadParams& params );
/**
* Generates mipmaps for a given texture
* @param[in] texture The texture
*/
/**
* Generates mipmaps for a given texture
* @param[in] texture The texture
*/
- void GenerateMipmaps( Render::
New
Texture* texture );
+ void GenerateMipmaps( Render::Texture* texture );
/**
* Adds a framebuffer to the render manager
/**
* Adds a framebuffer to the render manager
@@
-310,7
+297,7
@@
public:
* @param[in] mipmapLevel The mipmap of the texture to be attached
* @param[in] layer Indicates which layer of a cube map or array texture to attach. Unused for 2D textures
*/
* @param[in] mipmapLevel The mipmap of the texture to be attached
* @param[in] layer Indicates which layer of a cube map or array texture to attach. Unused for 2D textures
*/
- void AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::
New
Texture* texture, unsigned int mipmapLevel, unsigned int layer );
+ void AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, unsigned int mipmapLevel, unsigned int layer );
/**
* Adds a render tracker to the RenderManager. RenderManager takes ownership of the
/**
* Adds a render tracker to the RenderManager. RenderManager takes ownership of the
@@
-327,12
+314,6
@@
public:
void RemoveRenderTracker( Render::RenderTracker* renderTracker );
/**
void RemoveRenderTracker( Render::RenderTracker* renderTracker );
/**
- * Set the default shader that is to be used in absence of custom shader
- * @param[in] shader that is the default one
- */
- void SetDefaultShader( Shader* shader );
-
- /**
* returns the Program controller for sending program messages
* @return the ProgramController
*/
* returns the Program controller for sending program messages
* @return the ProgramController
*/
@@
-342,19
+323,18
@@
public:
/**
* Renders the results of the previous "update" traversal.
/**
* Renders the results of the previous "update" traversal.
- * @param[out] status contains the
flag that indicates if render instructions exist
- * @
return true if a further update is required
+ * @param[out] status contains the
rendering flags.
+ * @
param[in] forceClear force the Clear on the framebuffer even if nothing is rendered.
*/
*/
-
bool Render( Integration::RenderStatus& status
);
+
void Render( Integration::RenderStatus& status, bool forceClear
);
private:
/**
* Helper to process a single RenderInstruction.
* @param[in] instruction A description of the rendering operation.
private:
/**
* Helper to process a single RenderInstruction.
* @param[in] instruction A description of the rendering operation.
- * @param[in] defaultShader default shader to use.
*/
*/
- void DoRender( RenderInstruction& instruction
, Shader& defaultShader
);
+ void DoRender( RenderInstruction& instruction );
private:
private: