#define DALI_EGL_GRAPHICS_CONTROLLER_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
}
/**
+ * @brief Pushes RenderPass to the discard queue
+ *
+ * Function is called from the UniquePtr custom deleter.
+ *
+ * @param[in] program Pointer to the RenderPass
+ */
+ void DiscardResource(GLES::RenderPass* renderPass)
+ {
+ mDiscardRenderPassQueue.push(renderPass);
+ }
+
+ /**
+ * @brief Pushes RenderTarget to the discard queue
+ *
+ * Function is called from the UniquePtr custom deleter.
+ *
+ * @param[in] program Pointer to the RenderTarget
+ */
+ void DiscardResource(GLES::RenderTarget* renderTarget)
+ {
+ mDiscardRenderTargetQueue.push(renderTarget);
+ }
+
+ /**
* @brief Pushes Shader to the discard queue
*
* Function is called from the UniquePtr custom deleter.
return mCurrentContext;
}
+ /**
+ * @brief Returns EGL shared context
+ *
+ * @return valid EGL shared context
+ */
+ void* GetSharedContext() const
+ {
+ return mSharedContext;
+ }
+
private:
Integration::GlAbstraction* mGlAbstraction{nullptr};
Integration::GlContextHelperAbstraction* mGlContextHelperAbstraction{nullptr};
std::queue<GLES::Program*> mDiscardProgramQueue; ///< Discard queue for program resource
std::queue<GLES::Pipeline*> mDiscardPipelineQueue; ///< Discard queue of pipelines
+ std::queue<GLES::RenderPass*> mDiscardRenderPassQueue; ///< Discard queue for renderpass resource
+ std::queue<GLES::RenderTarget*> mDiscardRenderTargetQueue; ///< Discard queue for rendertarget resource
std::queue<GLES::Shader*> mDiscardShaderQueue; ///< Discard queue of shaders
std::queue<GLES::Sampler*> mDiscardSamplerQueue; ///< Discard queue of samplers
std::queue<const GLES::CommandBuffer*> mDiscardCommandBufferQueue; ///< Discard queue of command buffers
bool mIsShuttingDown{false}; ///< Indicates whether the controller is shutting down
std::queue<const GLES::CommandBuffer*> mPresentationCommandBuffers{}; ///< Queue of reusable command buffers used by presentation engine
+
+ void* mSharedContext{nullptr}; ///< Shared EGL context
};
} // namespace Graphics