/*
- * 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.
// INTERNAL INCLUDES
#include <dali/integration-api/core-enumerations.h>
-#include <dali/internal/render/gl-resources/context.h>
#include <dali/internal/update/render-tasks/scene-graph-render-task-list.h>
namespace Dali
namespace SceneGraph
{
Scene::Scene()
-: mContext(nullptr),
- mFrameRenderedCallbacks(),
+: mFrameRenderedCallbacks(),
mFramePresentedCallbacks(),
mSkipRendering(false),
mSurfaceRect(),
mSurfaceOrientation(0),
- mSurfaceRectChanged(false)
+ mSurfaceRectChanged(false),
+ mRotationCompletedAcknowledgement(false)
{
}
mFramePresentedCallbacks.clear();
}
-void Scene::Initialize(Context& context, Graphics::Controller& graphicsController, Integration::DepthBufferAvailable depthBufferAvailable, Integration::StencilBufferAvailable stencilBufferAvailable)
+void Scene::Initialize(Graphics::Controller& graphicsController, Integration::DepthBufferAvailable depthBufferAvailable, Integration::StencilBufferAvailable stencilBufferAvailable)
{
- mContext = &context;
-
// Create the render pass for the surface
std::vector<Graphics::AttachmentDescription> attachmentDescriptions;
mRenderPassNoClear = graphicsController.CreateRenderPass(rpInfo, nullptr); // Warning: Shallow ptr
}
-Context* Scene::GetContext()
-{
- return mContext;
-}
-
RenderInstructionContainer& Scene::GetRenderInstructions()
{
return mInstructions;
{
mSurfaceRect = rect;
mSurfaceRectChanged = true;
+
+ if(mRoot)
+ {
+ mRoot->SetUpdated(true);
+ }
}
const Rect<int32_t>& Scene::GetSurfaceRect() const
void Scene::SetSurfaceOrientation(int32_t orientation)
{
mSurfaceOrientation = orientation;
+
+ if(mRoot)
+ {
+ mRoot->SetUpdated(true);
+ }
}
int32_t Scene::GetSurfaceOrientation() const
return surfaceRectChanged;
}
+void Scene::SetRotationCompletedAcknowledgement()
+{
+ mRotationCompletedAcknowledgement = true;
+}
+
+bool Scene::IsRotationCompletedAcknowledgementSet()
+{
+ bool setRotationCompletedAcknowledgement = mRotationCompletedAcknowledgement;
+ mRotationCompletedAcknowledgement = false;
+ return setRotationCompletedAcknowledgement;
+}
+
+std::vector<DirtyRect>& Scene::GetItemsDirtyRects()
+{
+ return mItemsDirtyRects;
+}
+
} // namespace SceneGraph
} // namespace Internal