mCallstack.PushCall("ActivateResourceContext()", namedParams.str(), namedParams);
}
+ void PostRender() override
+ {
+ mCallstack.PushCall("PostRender()", "");
+ }
+
/**
* Inform graphics interface that this is the first frame after a resume.
*/
if(!mUploadWithoutRendering)
{
- graphics.ActivateResourceContext();
+ graphics.PostRender();
}
mCore.PostRender(mUploadWithoutRendering);
virtual void ActivateSurfaceContext(Dali::RenderSurfaceInterface* surface) = 0;
/**
+ * Inform graphics interface that all the surfaces have been rendered.
+ *
+ * @note This should not be called if uploading resource only without rendering any surface.
+ */
+ virtual void PostRender() = 0;
+
+ /**
* Inform graphics interface that this is the first frame after a resume.
*/
virtual void SetFirstFrameAfterResume() = 0;
void EglGraphicsController::ResolvePresentRenderTarget(GLES::RenderTarget* renderTarget)
{
+ mCurrentContext->InvalidateDepthStencilBuffers();
+
auto* rt = static_cast<GLES::RenderTarget*>(renderTarget);
if(rt->GetCreateInfo().surface)
{
}
}
+void Context::InvalidateDepthStencilBuffers()
+{
+ auto& gl = *mImpl->mController.GetGL();
+
+ GLenum attachments[] = {GL_DEPTH, GL_STENCIL};
+ gl.InvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
+}
+
void Context::SetScissorTestEnabled(bool scissorEnabled)
{
if(mImpl->mGlStateCache.mScissorTestEnabled != scissorEnabled)
void ClearStencilBuffer();
void ClearDepthBuffer();
void ClearBuffer(uint32_t mask, bool forceClear);
+ void InvalidateDepthStencilBuffers();
void SetScissorTestEnabled(bool scissorEnabled);
void SetStencilTestEnable(bool stencilEnable);
void StencilMask(uint32_t writeMask);
mGraphicsController.ActivateSurfaceContext(surface);
}
+void EglGraphics::PostRender()
+{
+ ActivateResourceContext();
+
+ if(mGraphicsController.GetCurrentContext())
+ {
+ mGraphicsController.GetCurrentContext()->InvalidateDepthStencilBuffers();
+ }
+}
+
void EglGraphics::SetFirstFrameAfterResume()
{
if(mEglImplementation)
void ActivateSurfaceContext(Dali::RenderSurfaceInterface* surface) override;
/**
+ * This is called after all the surfaces have been rendered.
+ *
+ * @note This should not be called if uploading resource only without rendering any surface.
+ */
+ void PostRender() override;
+
+ /**
* Inform graphics interface that this is the first frame after a resume.
* (For debug only)
*/