- uploadOnly flag is transferred to the update manager to do not change render-task state
- uploadOnly flag that has been transferred to the render manager is removed.
Change-Id: I06862bd376a0eacc7cd0a1f0a00b028bd249cad3
Signed-off-by: seungho <sbsh.baek@samsung.com>
mCore->ProcessEvents();
}
mCore->ProcessEvents();
}
-void TestApplication::DoUpdate(uint32_t intervalMilliseconds, const char* location)
+void TestApplication::DoUpdate(uint32_t intervalMilliseconds, const char* location, bool uploadOnly)
{
if(GetUpdateStatus() == 0 &&
mRenderStatus.NeedsUpdate() == false &&
{
if(GetUpdateStatus() == 0 &&
mRenderStatus.NeedsUpdate() == false &&
uint32_t nextVSyncTime = mLastVSyncTime + intervalMilliseconds;
float elapsedSeconds = static_cast<float>(intervalMilliseconds) * 0.001f;
uint32_t nextVSyncTime = mLastVSyncTime + intervalMilliseconds;
float elapsedSeconds = static_cast<float>(intervalMilliseconds) * 0.001f;
- mCore->Update(elapsedSeconds, mLastVSyncTime, nextVSyncTime, mStatus, false, false);
+ mCore->Update(elapsedSeconds, mLastVSyncTime, nextVSyncTime, mStatus, false, false, uploadOnly);
GetRenderController().Initialize();
mLastVSyncTime = nextVSyncTime;
}
GetRenderController().Initialize();
mLastVSyncTime = nextVSyncTime;
}
-bool TestApplication::Render(uint32_t intervalMilliseconds, const char* location)
+bool TestApplication::Render(uint32_t intervalMilliseconds, const char* location, bool uploadOnly)
- DoUpdate(intervalMilliseconds, location);
+ DoUpdate(intervalMilliseconds, location, uploadOnly);
// Reset the status
mRenderStatus.SetNeedsUpdate(false);
mRenderStatus.SetNeedsPostRender(false);
// Reset the status
mRenderStatus.SetNeedsUpdate(false);
mRenderStatus.SetNeedsPostRender(false);
- mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/);
- mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
- mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/);
- mCore->PostRender(false /*do not skip rendering*/);
+ mCore->PreRender(mRenderStatus, false /*do not force clear*/);
+ if(!uploadOnly)
+ {
+ mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
+ mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/);
+ }
+ mCore->PostRender();
{
DoUpdate(intervalMilliseconds, location);
{
DoUpdate(intervalMilliseconds, location);
- mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/);
+ mCore->PreRender(mRenderStatus, false /*do not force clear*/);
mCore->PreRender(mRenderStatus, mScene, damagedRects);
return mStatus.KeepUpdating() || mRenderStatus.NeedsUpdate();
mCore->PreRender(mRenderStatus, mScene, damagedRects);
return mStatus.KeepUpdating() || mRenderStatus.NeedsUpdate();
{
mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/, clippingRect);
{
mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/, clippingRect);
- mCore->PostRender(false /*do not skip rendering*/);
bool TestApplication::RenderOnly()
{
// Update Time values
bool TestApplication::RenderOnly()
{
// Update Time values
- mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/);
+ mCore->PreRender(mRenderStatus, false /*do not force clear*/);
mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/);
mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/);
- mCore->PostRender(false /*do not skip rendering*/);
void ProcessEvent(const Integration::Event& event);
void SendNotification();
void ProcessEvent(const Integration::Event& event);
void SendNotification();
- bool Render(uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL, const char* location = NULL);
+ bool Render(uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL, const char* location = NULL, bool uploadOnly = false);
bool PreRenderWithPartialUpdate(uint32_t intervalMilliseconds, const char* location, std::vector<Rect<int>>& damagedRects);
bool RenderWithPartialUpdate(std::vector<Rect<int>>& damagedRects, Rect<int>& clippingRect);
uint32_t GetUpdateStatus();
bool PreRenderWithPartialUpdate(uint32_t intervalMilliseconds, const char* location, std::vector<Rect<int>>& damagedRects);
bool RenderWithPartialUpdate(std::vector<Rect<int>>& damagedRects, Rect<int>& clippingRect);
uint32_t GetUpdateStatus();
- void DoUpdate(uint32_t intervalMilliseconds, const char* location = NULL);
+ void DoUpdate(uint32_t intervalMilliseconds, const char* location = NULL, bool uploadOnly = false);
protected:
TestPlatformAbstraction mPlatformAbstraction;
protected:
TestPlatformAbstraction mPlatformAbstraction;
uint32_t nextVSyncTime = mLastVSyncTime + intervalMilliseconds;
float elapsedSeconds = static_cast<float>(intervalMilliseconds) * 0.001f;
uint32_t nextVSyncTime = mLastVSyncTime + intervalMilliseconds;
float elapsedSeconds = static_cast<float>(intervalMilliseconds) * 0.001f;
- mCore->Update(elapsedSeconds, mLastVSyncTime, nextVSyncTime, mStatus, false, false);
+ mCore->Update(elapsedSeconds, mLastVSyncTime, nextVSyncTime, mStatus, false, false, false);
GetRenderController().Initialize();
GetRenderController().Initialize();
mRenderStatus.SetNeedsUpdate(false);
mRenderStatus.SetNeedsPostRender(false);
mRenderStatus.SetNeedsUpdate(false);
mRenderStatus.SetNeedsPostRender(false);
- mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/);
+ mCore->PreRender(mRenderStatus, false /*do not force clear*/);
mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/);
mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/);
- mCore->PostRender(false /*do not skip rendering*/);
{
DoUpdate(intervalMilliseconds, location);
{
DoUpdate(intervalMilliseconds, location);
- mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/);
+ mCore->PreRender(mRenderStatus, false /*do not force clear*/);
mCore->PreRender(mScene, damagedRects);
return mStatus.KeepUpdating() || mRenderStatus.NeedsUpdate();
mCore->PreRender(mScene, damagedRects);
return mStatus.KeepUpdating() || mRenderStatus.NeedsUpdate();
{
mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/, clippingRect);
mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/, clippingRect);
{
mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/, clippingRect);
mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/, clippingRect);
- mCore->PostRender(false /*do not skip rendering*/);
bool TestGraphicsApplication::RenderOnly()
{
// Update Time values
bool TestGraphicsApplication::RenderOnly()
{
// Update Time values
- mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/);
+ mCore->PreRender(mRenderStatus, false /*do not force clear*/);
mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/);
mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/);
- mCore->PostRender(false /*do not skip rendering*/);
{
LOG_UPDATE_RENDER_TRACE;
{
LOG_UPDATE_RENDER_TRACE;
+ // For thread safe
+ bool uploadOnly = mUploadWithoutRendering;
+
// Performance statistics are logged upon a VSYNC tick so use this point for a VSync marker
AddPerformanceMarker(PerformanceInterface::VSYNC);
// Performance statistics are logged upon a VSYNC tick so use this point for a VSync marker
AddPerformanceMarker(PerformanceInterface::VSYNC);
nextFrameTime,
updateStatus,
renderToFboEnabled,
nextFrameTime,
updateStatus,
renderToFboEnabled,
+ isRenderingToFbo,
+ uploadOnly);
AddPerformanceMarker(PerformanceInterface::UPDATE_END);
unsigned int keepUpdatingStatus = updateStatus.KeepUpdating();
AddPerformanceMarker(PerformanceInterface::UPDATE_END);
unsigned int keepUpdatingStatus = updateStatus.KeepUpdating();
AddPerformanceMarker(PerformanceInterface::RENDER_START);
// Upload shared resources
AddPerformanceMarker(PerformanceInterface::RENDER_START);
// Upload shared resources
- mCore.PreRender(renderStatus, mForceClear, mUploadWithoutRendering);
+ mCore.PreRender(renderStatus, mForceClear);
- if(!mUploadWithoutRendering)
{
// Go through each window
WindowContainer windows;
{
// Go through each window
WindowContainer windows;
- if(!mUploadWithoutRendering)
{
graphics.PostRender();
}
{
graphics.PostRender();
}
- mCore.PostRender(mUploadWithoutRendering);
//////////////////////////////
// DELETE SURFACE
//////////////////////////////
// DELETE SURFACE