#include <dali/graphics/vulkan/api/internal/vulkan-api-descriptor-set-allocator.h>
#include <dali/graphics/thread-pool.h>
+#include <iostream>
namespace Dali
{
std::vector<DescriptorSetList> mDescriptorSetsFreeList;
uint32_t mBufferIndex{0u};
+ bool mDrawOnResume{ false };
};
// TODO: @todo temporarily ignore missing return type, will be fixed later
void Controller::BeginFrame()
{
+ mImpl->mDrawOnResume = false;
mStats.samplerTextureBindings = 0;
mStats.uniformBufferBindings = 0;
void Controller::Pause()
{
+ std::cout << "VulkanAPIController::Pause()" << std::endl;
}
void Controller::Resume()
{
+ std::cout << "VulkanAPIController::Resume()" << std::endl;
+
+ // Ensure we re-draw at least once:
+ mImpl->mDrawOnResume = true;
}
API::TextureFactory& Controller::GetTextureFactory() const
return mImpl->IsDiscardQueueEmpty();
}
+bool Controller::IsDrawOnResumeRequired()
+{
+ return mImpl->mDrawOnResume;
+}
+
void Controller::WaitIdle()
{
mImpl->mGraphics.GetGraphicsQueue(0u).GetVkHandle().waitIdle();
#include <dali/graphics-api/graphics-api-buffer-factory.h>
#include <dali/graphics-api/graphics-api-buffer.h>
+#include <iostream>
// Un-comment to enable node tree debug logging
//#define NODE_TREE_LOGGING 1
//Process Touches & Gestures
const bool gestureUpdated = ProcessGestures( bufferIndex, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds );
+ const bool resumed = mImpl->graphics.GetController().IsDrawOnResumeRequired();
- bool updateScene = // The scene-graph requires an update if..
- (mImpl->nodeDirtyFlags & RenderableUpdateFlags) || // ..nodes were dirty in previous frame OR
- IsAnimationRunning() || // ..at least one animation is running OR
- mImpl->messageQueue.IsSceneUpdateRequired() || // ..a message that modifies the scene graph node tree is queued OR
- gestureUpdated; // ..a gesture property was updated
+ bool updateScene = // The scene-graph requires an update if..
+ (mImpl->nodeDirtyFlags & RenderableUpdateFlags) || // ..nodes were dirty in previous frame OR
+ IsAnimationRunning() || // ..at least one animation is running OR
+ mImpl->messageQueue.IsSceneUpdateRequired() || // ..a message that modifies the scene graph node tree is queued OR
+ gestureUpdated; // ..a gesture property was updated OR
// Although the scene-graph may not require an update, we still need to synchronize double-buffered
// values if the scene was updated in the previous frame.
// be set again
updateScene |= mImpl->messageQueue.ProcessMessages( bufferIndex );
+ std::cout << "Update: updateScene:" << updateScene << std::endl;
+ std::cout << " resumed:" << resumed << std::endl;
+
+ updateScene |= resumed;
+
// Although the scene-graph may not require an update, we still need to synchronize double-buffered
// renderer lists if the scene was updated in the previous frame.
// We should not start skipping update steps or reusing lists until there has been two frames where nothing changes