Core was only using it to get the Graphics::Controller.
Have modified Core interface to take a ref to the controller instead of the interface,
and am using Controller everywhere instead of Graphics interface.
Tidied up the API slightly.
Change-Id: I6c693811959f8542601708aa0d51a2642031e13a
mLastVSyncTime(0u),
mDataRetentionPolicy( policy )
{
- Dali::Integration::Graphics::GraphicsCreateInfo info;
- info.surfaceWidth = 480;
- info.surfaceHeight = 800;
- info.depthStencilMode = Integration::Graphics::DepthStencilMode::NONE;
- mGraphics = std::unique_ptr<Test::Graphics>( new Test::Graphics( info,
- Integration::DepthBufferAvailable::FALSE,
- Integration::StencilBufferAvailable::FALSE));
+ mGraphicsController = std::unique_ptr<Test::GraphicsController>( new Test::GraphicsController() );
Initialize();
}
mCore = Dali::Integration::Core::New( mRenderController,
mPlatformAbstraction,
- *mGraphics,
+ *mGraphicsController,
mGestureManager,
mDataRetentionPolicy,
Integration::RenderToFrameBuffer::FALSE,
#include <test-platform-abstraction.h>
#include "test-gesture-manager.h"
#include "test-render-controller.h"
-#include "test-graphics.h"
+#include "test-graphics-controller.h"
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/signals/connection-tracker.h>
#include <dali/integration-api/core.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
#include <dali/integration-api/resource-policies.h>
#include <dali/integration-api/trace.h>
protected:
TestPlatformAbstraction mPlatformAbstraction;
- std::unique_ptr<Test::Graphics> mGraphics;
+ std::unique_ptr<Test::GraphicsController> mGraphicsController;
TestRenderController mRenderController;
TestGestureManager mGestureManager;
GraphicsFramebufferFactory::GraphicsFramebufferFactory() = default;
GraphicsFramebufferFactory::~GraphicsFramebufferFactory() = default;
-Dali::Graphics::FramebufferFactory& GraphicsFramebufferFactory::SetSize( const Dali::Graphics::RectSize& size )
+Dali::Graphics::FramebufferFactory& GraphicsFramebufferFactory::SetSize( const Dali::Graphics::Extent2D& size )
{
return *this;
}
GraphicsFramebufferFactory();
virtual ~GraphicsFramebufferFactory();
- Dali::Graphics::FramebufferFactory& SetSize( const Dali::Graphics::RectSize& size ) override;
+ Dali::Graphics::FramebufferFactory& SetSize( const Dali::Graphics::Extent2D& size ) override;
Dali::Graphics::FramebufferFactory& SetColorAttachment( Dali::Graphics::TextureDetails::AttachmentId attachmentIndex,
const Dali::Graphics::Texture& texture,
{
return *this;
}
-Dali::Graphics::TextureFactory& GraphicsTextureFactory::SetSize(const Dali::Graphics::RectSize& size)
+Dali::Graphics::TextureFactory& GraphicsTextureFactory::SetSize(const Dali::Graphics::Extent2D& size)
{
return *this;
}
virtual ~GraphicsTextureFactory();
Dali::Graphics::TextureFactory& SetType(Dali::Graphics::TextureDetails::Type type) override;
- Dali::Graphics::TextureFactory& SetSize(const Dali::Graphics::RectSize& size) override;
+ Dali::Graphics::TextureFactory& SetSize(const Dali::Graphics::Extent2D& size) override;
Dali::Graphics::TextureFactory& SetFormat(Dali::Graphics::TextureDetails::Format format) override;
Dali::Graphics::TextureFactory& SetMipMapFlag(Dali::Graphics::TextureDetails::MipMapFlag mipMapFlag) override;
Dali::Graphics::TextureFactory& SetUsage( Dali::Graphics::TextureDetails::Usage usage ) override;
+++ /dev/null
-/*
- * Copyright (c) 2019 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "test-graphics.h"
-#include "test-graphics-controller.h"
-
-namespace Test
-{
-
-struct Graphics::Impl
-{
-public:
- GraphicsController controller;
-};
-
-
-
-Graphics::Graphics( const Dali::Integration::Graphics::GraphicsCreateInfo& info,
- Dali::Integration::DepthBufferAvailable depthBufferAvailable,
- Dali::Integration::StencilBufferAvailable stencilBufferRequired )
-: GraphicsInterface( info, depthBufferAvailable, stencilBufferRequired ),
- mImpl(new Graphics::Impl() )
-{
-}
-
-Graphics::~Graphics() = default;
-
-void Graphics::Initialize()
-{
-}
-
-void Graphics::Create()
-{
-}
-
-void Graphics::Destroy()
-{
-}
-
-void Graphics::Pause()
-{
-}
-
-void Graphics::Resume()
-{
-}
-
-void Graphics::PreRender()
-{
-}
-
-void Graphics::PostRender()
-{
-}
-
-Dali::Graphics::Controller& Graphics::GetController()
-{
- return mImpl->controller;
-}
-
-void Graphics::SurfaceResized( unsigned int width, unsigned int height )
-{
-}
-
-
-} // Namespace Test
+++ /dev/null
-#ifndef TEST_GRAPHICS_H
-#define TEST_GRAPHICS_H
-
-/*
- * Copyright (c) 2019 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali/integration-api/graphics/graphics-interface.h>
-
-// EXTERNAL INCLUDES
-#include <memory>
-
-#define EXPORT_API __attribute__ ((visibility ("default")))
-
-namespace Test
-{
-class Controller;
-
-/**
- * Graphics implementation class
- */
-class Graphics : public Dali::Integration::Graphics::GraphicsInterface
-{
-public:
-
- Graphics( const Dali::Integration::Graphics::GraphicsCreateInfo& info,
- Dali::Integration::DepthBufferAvailable depthBufferAvailable,
- Dali::Integration::StencilBufferAvailable stencilBufferRequired );
-
- ~Graphics();
-
- void Initialize() override;
-
- void Create() override;
-
- void Destroy() override;
-
- /**
- * Lifecycle event for pausing application
- */
- void Pause() override;
-
- /**
- * Lifecycle event for resuming application
- */
- void Resume() override;
-
- /**
- * Prerender
- */
- void PreRender() override;
-
- /*
- * Postrender
- */
- void PostRender() override;
-
- /**
- * Returns controller object
- * @return
- */
- Dali::Graphics::Controller& GetController();
-
- /*
- * Surface resized
- */
- void SurfaceResized( unsigned int width, unsigned int height );
-
- Dali::Integration::Graphics::GraphicsCreateInfo& GetCreateInfo()
- {
- return mCreateInfo;
- }
-
-private:
- Dali::Integration::Graphics::GraphicsCreateInfo mCreateInfo;
-
- struct Impl;
- Impl* mImpl;
-};
-
-
-} // Namespace Test
-
-#endif // TEST_GRAPHICS_H
# Install headers under the correct subdirectories
platformabstractiondir = $(includedir)/dali/integration-api
platformabstractioneventsdir = $(includedir)/dali/integration-api/events
-platformabstractiongraphicsdir = $(includedir)/dali/integration-api/graphics
platformabstraction_HEADERS = $(platform_abstraction_header_files)
platformabstractionevents_HEADERS = $(platform_abstraction_events_header_files)
-platformabstractiongraphics_HEADERS = $(graphics_integration_header_files)
# Graphics API (Integration)
graphicsapidir = $(includedir)/dali/graphics-api
linker_test_SOURCES = linker-test.cpp \
../../../automated-tests/src/dali/dali-test-suite-utils/test-application.cpp \
../../../automated-tests/src/dali/dali-test-suite-utils/test-graphics-controller.cpp \
- ../../../automated-tests/src/dali/dali-test-suite-utils/test-graphics.cpp \
../../../automated-tests/src/dali/dali-test-suite-utils/test-graphics-buffer-factory.cpp \
../../../automated-tests/src/dali/dali-test-suite-utils/test-graphics-framebuffer-factory.cpp \
../../../automated-tests/src/dali/dali-test-suite-utils/test-graphics-pipeline-factory.cpp \
$(graphics_api_src_dir)/graphics-api-texture-factory.h \
$(graphics_api_src_dir)/graphics-api-texture.h \
$(graphics_api_src_dir)/graphics-api-types-debug.h \
- $(graphics_api_src_dir)/graphics-api-types.h \
- $(graphics_api_src_dir)/graphics-api-utility.h
+ $(graphics_api_src_dir)/graphics-api-types.h
#include <dali/graphics-api/graphics-api-framebuffer.h>
#include <dali/graphics-api/graphics-api-texture-details.h>
#include <dali/graphics-api/graphics-api-texture.h>
-#include <dali/graphics-api/graphics-api-utility.h>
namespace Dali
{
/**
* @brief Set the size of framebuffer
*/
- virtual FramebufferFactory& SetSize( const RectSize& size ) = 0;
+ virtual FramebufferFactory& SetSize( const Extent2D& size ) = 0;
/**
* @brief Set a color attachment texture on the framebuffer
#include <dali/graphics-api/graphics-api-base-factory.h>
#include <dali/graphics-api/graphics-api-texture-details.h>
#include <dali/graphics-api/graphics-api-texture.h>
-#include <dali/graphics-api/graphics-api-utility.h>
namespace Dali
{
{
public:
virtual TextureFactory& SetType(TextureDetails::Type type) = 0;
- virtual TextureFactory& SetSize(const RectSize& size) = 0;
+ virtual TextureFactory& SetSize(const Extent2D& size) = 0;
virtual TextureFactory& SetFormat(TextureDetails::Format format) = 0;
virtual TextureFactory& SetMipMapFlag(TextureDetails::MipMapFlag mipMapFlag) = 0;
virtual TextureFactory& SetUsage( TextureDetails::Usage usage ) = 0;
*
*/
-#include <dali/graphics-api/graphics-api-utility.h>
#include <vector>
#include <string>
+++ /dev/null
-#ifndef DALI_GRAPHICS_API_UTILITY_H
-#define DALI_GRAPHICS_API_UTILITY_H
-
-/*
- * Copyright (c) 2019 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <cstdint>
-#include <cstdlib>
-
-namespace Dali
-{
-namespace Graphics
-{
-
-/**
- * Structure that represents a rectangular size
- */
-struct RectSize {
- size_t width = 0;
- size_t height = 0;
-};
-
-} // namespace Graphics
-} // namespace Dali
-
-#endif // DALI_GRAPHICS_API_UTILITY_H
#include <dali/public-api/common/dali-common.h>
#include <dali/integration-api/events/event.h>
#include <dali/integration-api/debug.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
+#include <dali/graphics-api/graphics-api-controller.h>
#include <dali/internal/common/core-impl.h>
-using Dali::Integration::Graphics::GraphicsInterface;
namespace Dali
{
Core* Core::New( RenderController& renderController,
PlatformAbstraction& platformAbstraction,
- GraphicsInterface& graphics,
+ Graphics::Controller& graphicsController,
GestureManager& gestureManager,
ResourcePolicy::DataRetention policy,
RenderToFrameBuffer renderToFboEnabled,
Core* instance = new Core;
instance->mImpl = new Internal::Core( renderController,
platformAbstraction,
- graphics,
+ graphicsController,
gestureManager,
policy,
renderToFboEnabled,
#define DALI_INTEGRATION_CORE_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
class Core;
}
-namespace Integration
-{
namespace Graphics
{
-class GraphicsInterface;
+class Controller;
}
+namespace Integration
+{
class Core;
class GestureManager;
class PlatformAbstraction;
* This object is used for integration with the native windowing system.
* @param[in] renderController The interface to an object which controls rendering.
* @param[in] platformAbstraction The interface providing platform specific services.
- * @param[in] graphics The interface providing graphics services
+ * @param[in] graphicsController The interface providing graphics services
* @param[in] gestureManager The interface providing gesture manager services.
* @param[in] policy The data retention policy. This depends on application setting
* and platform support. Dali should honour this policy when deciding to discard
*/
static Core* New( RenderController& renderController,
PlatformAbstraction& platformAbstraction,
- Graphics::GraphicsInterface& graphics,
+ Graphics::Controller& graphics,
GestureManager& gestureManager,
ResourcePolicy::DataRetention policy,
RenderToFrameBuffer renderToFboEnabled,
$(platform_abstraction_src_dir)/events/tap-gesture-event.h \
$(platform_abstraction_src_dir)/events/touch-event-combiner.h \
$(platform_abstraction_src_dir)/events/touch-event-integ.h
-
-graphics_integration_header_files = \
- $(platform_abstraction_src_dir)/graphics/graphics-interface.h
+++ /dev/null
-#ifndef DALI_INTEGRATION_GRAPHICS_INTERFACE_H
-#define DALI_INTEGRATION_GRAPHICS_INTERFACE_H
-
-/*
- * Copyright (c) 2019 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <dali/public-api/common/dali-common.h>
-#include <dali/integration-api/core-enumerations.h>
-#include <dali/graphics-api/graphics-api-controller.h>
-
-namespace Dali
-{
-
-namespace Integration
-{
-namespace Graphics
-{
-
-enum class DepthStencilMode
-{
- /**
- * No depth/stencil at all
- */
- NONE,
-
- /**
- * Optimal depth ( chosen by the implementation )
- */
- DEPTH_OPTIMAL,
-
- /**
- * Optimal depth and stencil ( chosen by the implementation )
- */
- DEPTH_STENCIL_OPTIMAL,
-
- /**
- * Depth and stencil with explicit format set in depthStencilFormat
- */
- DEPTH_STENCIL_EXPLICIT,
-};
-
-enum class SwapchainBufferingMode
-{
- OPTIMAL = 0,
- DOUBLE_BUFFERING = 2,
- TRIPLE_BUFFERING = 3,
-};
-
-struct GraphicsCreateInfo
-{
- uint32_t surfaceWidth;
- uint32_t surfaceHeight;
- DepthStencilMode depthStencilMode;
- SwapchainBufferingMode swapchainBufferingMode;
-};
-
-
-/**
- * Graphics interface
- */
-class DALI_CORE_API GraphicsInterface
-{
-public:
- /**
- * Constructor
- */
- GraphicsInterface( const GraphicsCreateInfo& info,
- Integration::DepthBufferAvailable depthBufferRequired,
- Integration::StencilBufferAvailable stencilBufferRequired )
- : mCreateInfo( info ),
- mDepthBufferRequired( depthBufferRequired ),
- mStencilBufferRequired( stencilBufferRequired )
- {
- }
-
-
- /**
- * Initialize the graphics interface
- */
- virtual void Initialize() = 0;
-
- /**
- * Create the Graphics Factory implementation
- */
- virtual void Create() = 0;
-
- /**
- * Destroy the Graphics Factory implementation
- */
- virtual void Destroy() = 0;
-
- /**
- * Lifecycle event for pausing application
- */
- virtual void Pause() = 0;
-
- /**
- * Lifecycle event for resuming application
- */
- virtual void Resume() = 0;
-
- /**
- * Prerender
- */
- virtual void PreRender() = 0;
-
- /*
- * Postrender
- */
- virtual void PostRender() = 0;
-
- /**
- * Returns controller object
- * @return
- */
- virtual Dali::Graphics::Controller& GetController() = 0;
-
- /*
- * Surface resized
- */
- virtual void SurfaceResized( unsigned int width, unsigned int height ) = 0;
-
- /**
- * Get whether the depth buffer is required
- * @return TRUE if the depth buffer is required
- */
- Integration::DepthBufferAvailable GetDepthBufferRequired() const
- {
- return mDepthBufferRequired;
- };
-
- /**
- * Get whether the stencil buffer is required
- * @return TRUE if the stencil buffer is required
- */
- Integration::StencilBufferAvailable GetStencilBufferRequired() const
- {
- return mStencilBufferRequired;
- };
-
-protected:
- // No destruction through this interface
- virtual ~GraphicsInterface() = default;
-
-protected:
- GraphicsCreateInfo mCreateInfo;
- const Integration::DepthBufferAvailable mDepthBufferRequired; ///< Whether the depth buffer is required
- const Integration::StencilBufferAvailable mStencilBufferRequired; ///< Whether the stencil buffer is required
-};
-
-} // namespace Graphics
-} // namespace Integration
-} // namespace Dali
-
-#endif //DALI_INTEGRATION_GRAPHICS_INTERFACE_H
#include <dali/integration-api/core.h>
#include <dali/integration-api/debug.h>
#include <dali/integration-api/events/event.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
#include <dali/integration-api/platform-abstraction.h>
#include <dali/integration-api/render-controller.h>
#include <dali/integration-api/system-overlay.h>
using Integration::Event;
using Integration::UpdateStatus;
using Integration::RenderStatus;
-using Integration::Graphics::GraphicsInterface;
+
Core::Core( RenderController& renderController,
PlatformAbstraction& platform,
- GraphicsInterface& graphics,
+ Graphics::Controller& graphicsController,
GestureManager& gestureManager,
ResourcePolicy::DataRetention dataRetentionPolicy,
Integration::RenderToFrameBuffer renderToFboEnabled,
Integration::StencilBufferAvailable stencilBufferAvailable )
: mRenderController( renderController ),
mPlatform(platform),
- mProcessingEvent(false),
- mGraphics(graphics)
+ mGraphicsController(graphicsController),
+ mProcessingEvent(false)
{
// Create the thread local storage
CreateThreadLocalStorage();
*mDiscardQueue,
renderController,
*mRenderTaskProcessor,
- graphics );
+ graphicsController );
mStage = IntrusivePtr<Stage>( Stage::New( *mAnimationPlaylist, *mPropertyNotificationManager, *mUpdateManager, *mNotificationManager, mRenderController ) );
// The stage-size may be less than surface-size (reduced by top-margin)
Vector2 size = mStage->GetSize();
mRelayoutController->SetStageSize( static_cast<uint32_t>( size.width ), static_cast<uint32_t>( size.height ) ); // values get truncated
-
- mGraphics.SurfaceResized( width, height );
}
void Core::SetTopMargin( uint32_t margin )
#include <dali/public-api/object/ref-object.h>
#include <dali/integration-api/core-enumerations.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
#include <dali/integration-api/resource-policies.h>
+#include <dali/graphics-api/graphics-api-controller.h>
#include <dali/internal/common/owner-pointer.h>
#include <dali/internal/event/animation/animation-playlist-declarations.h>
#include <dali/internal/event/common/stage-def.h>
*/
Core( Integration::RenderController& renderController,
Integration::PlatformAbstraction& platform,
- Integration::Graphics::GraphicsInterface& graphics,
+ Graphics::Controller& graphicsController,
Integration::GestureManager& gestureManager,
ResourcePolicy::DataRetention dataRetentionPolicy,
Integration::RenderToFrameBuffer renderToFboEnabled,
Integration::RenderController& mRenderController; ///< Reference to Render controller to tell it to keep rendering
Integration::PlatformAbstraction& mPlatform; ///< The interface providing platform specific services.
-
+ Graphics::Controller& mGraphicsController; ///< Graphics object
IntrusivePtr<Stage> mStage; ///< The current stage
AnimationPlaylistOwner mAnimationPlaylist; ///< For 'Fire and forget' animation support
OwnerPointer<PropertyNotificationManager> mPropertyNotificationManager; ///< For safe signal emmision of property changed notifications
IntrusivePtr< RelayoutController > mRelayoutController; ///< Size negotiation relayout controller
- bool mProcessingEvent : 1; ///< True during ProcessEvents()
-
- OwnerPointer<SceneGraph::RenderTaskProcessor> mRenderTaskProcessor; ///< Handles the processing of render tasks
- OwnerPointer<SceneGraph::UpdateManager> mUpdateManager; ///< Update manager
- OwnerPointer<SceneGraph::DiscardQueue> mDiscardQueue; ///< Used to cleanup nodes & resources when no longer in use.
- OwnerPointer<ShaderFactory> mShaderFactory; ///< Shader resource factory
- OwnerPointer<NotificationManager> mNotificationManager; ///< Notification manager
- OwnerPointer<GestureEventProcessor> mGestureEventProcessor; ///< The gesture event processor
- OwnerPointer<EventProcessor> mEventProcessor; ///< The event processor
- Dali::Vector<Integration::Processor*> mProcessors; ///< Registered processors (not owned)
-
- Integration::Graphics::GraphicsInterface& mGraphics; ///< Graphics object
+ OwnerPointer<SceneGraph::RenderTaskProcessor> mRenderTaskProcessor; ///< Handles the processing of render tasks
+ OwnerPointer<SceneGraph::UpdateManager> mUpdateManager; ///< Update manager
+ OwnerPointer<SceneGraph::DiscardQueue> mDiscardQueue; ///< Used to cleanup nodes & resources when no longer in use.
+ OwnerPointer<ShaderFactory> mShaderFactory; ///< Shader resource factory
+ OwnerPointer<NotificationManager> mNotificationManager; ///< Notification manager
+ OwnerPointer<GestureEventProcessor> mGestureEventProcessor; ///< The gesture event processor
+ OwnerPointer<EventProcessor> mEventProcessor; ///< The event processor
+ Dali::Vector<Integration::Processor*> mProcessors; ///< Registered processors (not owned)
+ bool mProcessingEvent : 1; ///< True during ProcessEvents()
friend class ThreadLocalStorage;
* @param renderInstructions container of render instructions
* @param bufferIndex current buffer index
*/
- void SubmitRenderInstructions(Graphics::Controller &graphics,
- SceneGraph::RenderInstructionContainer &renderInstructions,
- BufferIndex bufferIndex );
+ void SubmitRenderInstructions( Graphics::Controller &graphics,
+ SceneGraph::RenderInstructionContainer &renderInstructions,
+ BufferIndex bufferIndex );
void DiscardUnusedResources( Graphics::Controller& controller );
bool SetupPipelineViewportState( Graphics::ViewportState& outViewportState );
- void RecordRenderItemList(Graphics::Controller& graphics,
- BufferIndex bufferIndex,
- Graphics::RenderCommand::RenderTargetBinding& renderTargetBinding,
- Matrix viewProjection,
- RenderInstruction& instruction,
- const RenderList& renderItemList,
- std::vector<Graphics::RenderCommand*>& commandList);
-
- void RecordInstruction(Graphics::Controller& graphics,
- BufferIndex bufferIndex,
- RenderInstruction& instruction,
- std::vector<Graphics::RenderCommand*>& commandList);
+ void RecordRenderItemList( Graphics::Controller& graphics,
+ BufferIndex bufferIndex,
+ Graphics::RenderCommand::RenderTargetBinding& renderTargetBinding,
+ Matrix viewProjection,
+ RenderInstruction& instruction,
+ const RenderList& renderItemList,
+ std::vector<Graphics::RenderCommand*>& commandList);
+
+ void RecordInstruction( Graphics::Controller& graphics,
+ BufferIndex bufferIndex,
+ RenderInstruction& instruction,
+ std::vector<Graphics::RenderCommand*>& commandList);
bool PrepareGraphicsPipeline( Graphics::Controller& controller,
RenderInstruction& instruction,
#include <dali/internal/update/manager/update-manager.h>
// EXTERNAL INCLUDES
-#include <dali/graphics-api/graphics-api-controller.h>
// INTERNAL INCLUDES
#include <dali/public-api/common/stage.h>
#include <dali/integration-api/core.h>
#include <dali/integration-api/debug.h>
#include <dali/integration-api/render-controller.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
+#include <dali/graphics-api/graphics-api-controller.h>
#include <dali/devel-api/common/owner-container.h>
#include <dali/devel-api/threading/mutex.h>
using namespace Dali::Integration;
using Dali::Internal::Update::MessageQueue;
-using Dali::Integration::Graphics::GraphicsInterface;
+
namespace Dali
{
RenderController& renderController,
SceneGraphBuffers& sceneGraphBuffers,
RenderTaskProcessor& renderTaskProcessor,
- GraphicsInterface& graphics )
+ Graphics::Controller& graphicsController )
: notificationManager( notificationManager ),
transformManager(),
animationPlaylist( animationPlaylist ),
graphicsAlgorithms(),
renderInstructions( ),
renderTaskProcessor( renderTaskProcessor ),
- graphics( graphics ),
+ graphicsController( graphicsController ),
backgroundColor( Dali::Stage::DEFAULT_BACKGROUND_COLOR ),
renderers(),
textureSets(),
renderersAdded( false ),
surfaceRectChanged( false ),
graphicsShutdown( false ),
- shaderCache( graphics.GetController() )
+ shaderCache( graphicsController )
{
sceneController = new SceneControllerImpl( discardQueue );
GraphicsAlgorithms graphicsAlgorithms; ///< Graphics algorithms
RenderInstructionContainer renderInstructions; ///< List of current instructions per frame
RenderTaskProcessor& renderTaskProcessor; ///< Handles RenderTasks and RenderInstrucitons
-
- GraphicsInterface& graphics; ///< Graphics
+ Graphics::Controller& graphicsController; ///< Graphics controller
Vector4 backgroundColor; ///< The glClear color used at the beginning of each frame.
DiscardQueue& discardQueue,
RenderController& controller,
RenderTaskProcessor& renderTaskProcessor,
- GraphicsInterface& graphics )
+ Graphics::Controller& graphicsController )
: mImpl( new Impl( notificationManager,
animationFinishedNotifier,
propertyNotifier,
controller,
mSceneGraphBuffers,
renderTaskProcessor,
- graphics) )
+ graphicsController) )
{
}
void UpdateManager::AddShader( OwnerPointer< Shader >& shader )
{
- shader->Initialize( mImpl->graphics, mImpl->shaderCache );
+ shader->Initialize( mImpl->graphicsController, mImpl->shaderCache );
mImpl->shaders.PushBack( shader.Release() );
}
void UpdateManager::AddRenderer( OwnerPointer< Renderer >& renderer )
{
- renderer->Initialize( mImpl->graphics );
+ renderer->Initialize( mImpl->graphicsController );
mImpl->renderers.PushBack( renderer.Release() );
mImpl->renderersAdded = true;
}
//Process Touches & Gestures
const bool gestureUpdated = ProcessGestures( bufferIndex, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds );
- const bool resumed = mImpl->graphics.GetController().IsDrawOnResumeRequired();
+ const bool resumed = mImpl->graphicsController.IsDrawOnResumeRequired();
bool updateScene = // The scene-graph requires an update if..
(mImpl->nodeDirtyFlags & RenderableUpdateFlags) || // ..nodes were dirty in previous frame OR
// This may trigger garbage collection.
if( numberOfDiscardedRenderers > 0 )
{
- mImpl->graphics.GetController().RunGarbageCollector( numberOfDiscardedRenderers );
+ mImpl->graphicsController.RunGarbageCollector( numberOfDiscardedRenderers );
}
// generate graphics objects
PrepareNodes( bufferIndex );
PrepareRenderers( bufferIndex );
- mImpl->graphicsAlgorithms.SubmitRenderInstructions( mImpl->graphics.GetController(), mImpl->renderInstructions, bufferIndex );
+ mImpl->graphicsAlgorithms.SubmitRenderInstructions( mImpl->graphicsController, mImpl->renderInstructions, bufferIndex );
}
}
else
{
// Discard graphics resources
- mImpl->graphicsAlgorithms.DiscardUnusedResources( mImpl->graphics.GetController() );
+ mImpl->graphicsAlgorithms.DiscardUnusedResources( mImpl->graphicsController );
}
for( auto taskList : mImpl->taskLists )
// The update has finished; swap the double-buffering indices
mSceneGraphBuffers.Swap();
- mImpl->graphics.GetController().SwapBuffers();
+ mImpl->graphicsController.SwapBuffers();
return keepUpdating;
}
const BufferIndex bufferIndex = mSceneGraphBuffers.GetUpdateBufferIndex();
if( !mImpl->discardQueue.IsEmpty( bufferIndex ) ||
- !mImpl->graphics.GetController().IsDiscardQueueEmpty() )
+ !mImpl->graphicsController.IsDiscardQueueEmpty() )
{
keepUpdatingRequest |= KeepUpdating::DISCARD_RESOURCES;
}
void UpdateManager::AddSampler( OwnerPointer< SceneGraph::Sampler >& sampler )
{
- sampler->Initialize( mImpl->graphics );
+ sampler->Initialize( mImpl->graphicsController );
mImpl->samplerContainer.PushBack( sampler.Release() );
}
void UpdateManager::AddPropertyBuffer( OwnerPointer< SceneGraph::PropertyBuffer >& propertyBuffer )
{
- propertyBuffer->Initialize( mImpl->graphics );
+ propertyBuffer->Initialize( mImpl->graphicsController );
mImpl->propertyBufferContainer.PushBack( propertyBuffer.Release() );
}
void UpdateManager::AddGeometry( OwnerPointer< SceneGraph::Geometry >& geometry )
{
- geometry->Initialize( mImpl->graphics );
+ geometry->Initialize( mImpl->graphicsController );
mImpl->geometryContainer.PushBack( geometry.Release() );
}
void UpdateManager::AddTexture( OwnerPointer< SceneGraph::Texture >& texture )
{
- texture->Initialize( mImpl->graphics );
+ texture->Initialize( mImpl->graphicsController );
mImpl->textureContainer.PushBack( texture.Release() );
}
void UpdateManager::AddFrameBuffer( OwnerPointer< SceneGraph::FrameBuffer>& frameBuffer )
{
- frameBuffer->Initialize( mImpl->graphics );
+ frameBuffer->Initialize( mImpl->graphicsController );
mImpl->frameBufferContainer.PushBack( frameBuffer.Release() );
}
void UpdateManager::DestroyGraphicsObjects()
{
// Wait for the current frame to finish drawing
- mImpl->graphics.GetController().WaitIdle();
+ mImpl->graphicsController.WaitIdle();
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "Destroying graphics objects\n");
mImpl->shaderCache.DestroyGraphicsObjects();
// Ensure resources are discarded
- mImpl->graphicsAlgorithms.DiscardUnusedResources( mImpl->graphics.GetController() );
+ mImpl->graphicsAlgorithms.DiscardUnusedResources( mImpl->graphicsController );
mImpl->graphicsShutdown = true;
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/devel-api/common/stage-devel.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
-
#include <dali/internal/common/message.h>
-
#include <dali/internal/common/type-abstraction-enums.h>
#include <dali/internal/event/common/event-thread-services.h>
#include <dali/internal/event/rendering/texture-impl.h>
#include <dali/internal/update/rendering/scene-graph-shader.h> // for OwnerPointer< Shader >
#include <dali/internal/update/rendering/scene-graph-texture-set.h> // for OwnerPointer< TextureSet >
#include <dali/internal/update/render-tasks/scene-graph-render-task-list.h>
+
#include <dali/graphics-api/graphics-api-controller.h>
namespace Dali
* @param[in] discardQueue Nodes are added here when disconnected from the scene-graph.
* @param[in] controller After messages are flushed, we request a render from the RenderController.
* @param[in] renderTaskProcessor Handles RenderTasks and RenderInstrucitons.
- * @param[in] graphics The graphics backend
+ * @param[in] graphicsController The graphics backend
*/
UpdateManager( NotificationManager& notificationManager,
CompleteNotificationInterface& animationPlaylist,
DiscardQueue& discardQueue,
Integration::RenderController& controller,
RenderTaskProcessor& renderTaskProcessor,
- Dali::Integration::Graphics::GraphicsInterface& graphics);
+ Graphics::Controller& graphicsController );
/**
* Destructor.
// INTERNAL INCLUDES
#include <dali/internal/update/rendering/scene-graph-texture.h>
-#include <dali/graphics-api/graphics-api-controller.h>
#include <dali/graphics-api/graphics-api-texture-details.h>
#include <dali/graphics-api/graphics-api-framebuffer.h>
#include <dali/graphics-api/graphics-api-framebuffer-factory.h>
-#include <dali/graphics-api/graphics-api-utility.h>
namespace Dali
{
{
FrameBuffer::FrameBuffer( unsigned int width, unsigned int height, unsigned int attachments )
-: mGraphics( nullptr ),
+: mGraphicsController( nullptr ),
mGraphicsFramebuffer( nullptr ),
mWidth( width ),
mHeight( height )
FrameBuffer::~FrameBuffer() = default;
-void FrameBuffer::Initialize( Integration::Graphics::GraphicsInterface& graphics )
+void FrameBuffer::Initialize( Graphics::Controller& graphicsController )
{
- mGraphics = &graphics;
+ mGraphicsController = &graphicsController;
// Defer creation of framebuffer until a render instruction uses it
}
void FrameBuffer::PrepareFramebuffer()
{
- auto& controller = mGraphics->GetController();
-
// @todo Check if the color attachments or depth attachments have changed since the graphics object was created
if( !mGraphicsFramebuffer )
{
- auto& factory = controller.GetFramebufferFactory();
- factory.SetSize( Graphics::RectSize{ mWidth, mHeight } );
+ auto& factory = mGraphicsController->GetFramebufferFactory();
+ factory.SetSize( Graphics::Extent2D{ mWidth, mHeight } );
/**
* If the framebuffer has a color attachment without a graphics object, create one
}
}
- mGraphicsFramebuffer = controller.CreateFramebuffer( factory );
+ mGraphicsFramebuffer = mGraphicsController->CreateFramebuffer( factory );
}
}
// INTERNAL INCLUDES
#include <dali/public-api/rendering/frame-buffer.h>
#include <dali/internal/update/rendering/scene-graph-texture.h>
+#include <dali/graphics-api/graphics-api-controller.h>
#include <dali/graphics-api/graphics-api-framebuffer.h>
namespace Dali
*
* @param[in] graphics The Graphics API
*/
- void Initialize( Integration::Graphics::GraphicsInterface& graphics );
+ void Initialize( Graphics::Controller& graphics );
/**
* @brief Attach a texture for color rendering. Valid only for Framebuffers with COLOR attachments.
void DestroyGraphicsObjects();
private:
- Integration::Graphics::GraphicsInterface* mGraphics; ///< Graphics interface object
+ Graphics::Controller* mGraphicsController;
std::unique_ptr<Graphics::Framebuffer> mGraphicsFramebuffer;
struct Attachment
{
Geometry::Geometry()
-: mGraphics( nullptr ),
+: mGraphicsController( nullptr ),
mIndexBuffer{ nullptr },
mIndexBufferElementCount( 0 ),
mGeometryType( Dali::Geometry::TRIANGLES ),
{
}
-void Geometry::Initialize( Integration::Graphics::GraphicsInterface& graphics )
+void Geometry::Initialize( Graphics::Controller& graphics )
{
- mGraphics = &graphics;
+ mGraphicsController = &graphics;
}
void Geometry::AddPropertyBuffer( SceneGraph::PropertyBuffer* propertyBuffer )
void Geometry::SetIndexBuffer( Dali::Vector<unsigned short>& indices )
{
// set new index buffer
- auto& mController = mGraphics->GetController();
-
- // create index buffer]
auto sizeInBytes = uint32_t(indices.Size() * sizeof(indices[0]));
- auto indexBuffer = mController.CreateBuffer(
- mController.GetBufferFactory()
- .SetSize( uint32_t(indices.Size() * sizeof(indices[0])) )
- .SetUsageFlags( 0u | Graphics::BufferUsage::INDEX_BUFFER )
+ auto indexBuffer = mGraphicsController->CreateBuffer( mGraphicsController->GetBufferFactory()
+ .SetSize( uint32_t(indices.Size() * sizeof(indices[0])) )
+ .SetUsageFlags( 0u | Graphics::BufferUsage::INDEX_BUFFER )
);
// transfer data
#include <dali/public-api/rendering/geometry.h>
#include <dali/devel-api/common/owner-container.h>
#include <dali/graphics-api/graphics-api-controller.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
#include <dali/internal/common/message.h>
#include <dali/internal/common/owner-pointer.h>
#include <dali/internal/common/buffer-index.h>
*
* @param[in] graphics The Graphics API
*/
- void Initialize( Integration::Graphics::GraphicsInterface& graphics );
+ void Initialize( Graphics::Controller& graphics );
/**
* Adds a property buffer to the geometry
}
private:
- Integration::Graphics::GraphicsInterface* mGraphics; ///< Graphics interface object
+ Graphics::Controller* mGraphicsController; ///< Graphics interface object
// PropertyBuffers
Vector< SceneGraph::PropertyBuffer* > mVertexBuffers;
{
PropertyBuffer::PropertyBuffer()
-: mGraphics( nullptr ),
+: mGraphicsController( nullptr ),
mFormat( nullptr ),
mData( nullptr ),
mSize(0),
{
}
-void PropertyBuffer::Initialize( Integration::Graphics::GraphicsInterface& graphics )
+void PropertyBuffer::Initialize( Graphics::Controller& graphicsController )
{
- mGraphics = &graphics;
+ mGraphicsController = &graphicsController;
}
void PropertyBuffer::SetFormat( OwnerPointer< PropertyBuffer::Format >& format )
mSize = size;
mDataChanged = true;
- if( mGraphics )
+ if( mGraphicsController )
{
- auto& controller = mGraphics->GetController();
- mGraphicsBuffer = controller.CreateBuffer( controller.GetBufferFactory()
- .SetSize( uint32_t( mFormat->size * size) )
- .SetUsageFlags( 0u | Graphics::BufferUsage::VERTEX_BUFFER ));
+ mGraphicsBuffer = mGraphicsController->CreateBuffer( mGraphicsController->GetBufferFactory()
+ .SetSize( uint32_t( mFormat->size * size) )
+ .SetUsageFlags( 0u | Graphics::BufferUsage::VERTEX_BUFFER ));
}
}
{
if( !mGraphicsBuffer )
{
- mGraphicsBuffer = controller.CreateBuffer( controller.GetBufferFactory()
- .SetUsageFlags( mGraphicsBufferUsage )
- .SetSize( mSize ) );
+ mGraphicsBuffer = mGraphicsController->CreateBuffer( mGraphicsController->GetBufferFactory()
+ .SetUsageFlags( mGraphicsBufferUsage )
+ .SetSize( mSize ) );
}
// schedule deferred write
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/rendering/sampler.h>
#include <dali/graphics-api/graphics-api-buffer.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
+#include <dali/graphics-api/graphics-api-controller.h>
#include <dali/internal/common/message.h>
#include <dali/internal/common/owner-pointer.h>
#include <dali/internal/event/common/event-thread-services.h>
*
* @param[in] graphics The Graphics API
*/
- void Initialize( Integration::Graphics::GraphicsInterface& graphics );
+ void Initialize( Graphics::Controller& graphics );
/**
* @brief Set the format of the buffer
}
private:
- Integration::Graphics::GraphicsInterface* mGraphics; ///< Graphics interface object
+ Graphics::Controller* mGraphicsController; ///< Graphics controller
OwnerPointer< PropertyBuffer::Format > mFormat; ///< Format of the buffer
OwnerPointer< Dali::Vector< uint8_t > > mData; ///< Data
}
Renderer::Renderer()
-: mGraphics( nullptr ),
+: mGraphicsController( nullptr ),
mTextureSet( NULL ),
mGeometry( NULL ),
mShader( NULL ),
gRendererMemoryPool.FreeThreadSafe( static_cast<Renderer*>( ptr ) );
}
-void Renderer::Initialize( Integration::Graphics::GraphicsInterface& graphics )
+void Renderer::Initialize( Graphics::Controller& graphicsController )
{
- mGraphics = &graphics;
+ mGraphicsController = &graphicsController;
mRegenerateUniformMap = REGENERATE_UNIFORM_MAP;
}
void Renderer::PrepareRender( BufferIndex updateBufferIndex, RenderInstruction* renderInstruction )
{
- auto &controller = mGraphics->GetController();
- auto& renderCmd = mRenderCommands.AllocRenderCommand( renderInstruction, controller, updateBufferIndex );
+ auto& renderCmd = mRenderCommands.AllocRenderCommand( renderInstruction, *mGraphicsController, updateBufferIndex );
auto& cmd = renderCmd.GetGfxRenderCommand( updateBufferIndex );
if (!mShader->GetGfxObject())
else
{
// reinitialize sampler
- sampler->Initialize( *mGraphics );
+ sampler->Initialize( *mGraphicsController );
}
sampler->mIsDirty = false;
}
#include <dali/public-api/rendering/geometry.h>
#include <dali/public-api/rendering/renderer.h> // Dali::Renderer
-#include <dali/integration-api/graphics/graphics-interface.h>
#include <dali/internal/common/blending-options.h>
#include <dali/internal/common/type-abstraction-enums.h>
#include <dali/internal/event/common/event-thread-services.h>
#include <dali/internal/update/rendering/data-providers/uniform-map-data-provider.h>
#include <dali/internal/update/rendering/render-command-container.h>
#include <dali/internal/update/rendering/stencil-parameters.h>
-#include <dali/graphics-api/graphics-api-render-command.h>
-#include <dali/graphics-api/graphics-api-pipeline.h>
#include <dali/graphics-api/graphics-api-controller.h>
+#include <dali/graphics-api/graphics-api-pipeline.h>
+#include <dali/graphics-api/graphics-api-render-command.h>
#include <cstring>
namespace Dali
*
* @param[in] graphics The Graphics API
*/
- void Initialize( Integration::Graphics::GraphicsInterface& graphics );
+ void Initialize( Graphics::Controller& graphics );
/**
* Set the texture set for the renderer
Renderer();
private:
- Integration::Graphics::GraphicsInterface* mGraphics; ///< Graphics interface object
+ Graphics::Controller* mGraphicsController; ///< Graphics controller
CollectedUniformMap mCollectedUniformMap[2]; ///< Uniform maps collected by the renderer
TextureSet* mTextureSet; ///< The texture set this renderer uses. (Not owned)
#include <dali/internal/event/common/event-thread-services.h>
#include <dali/graphics-api/graphics-api-controller.h>
#include <dali/graphics-api/graphics-api-types.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
#include <memory>
* Constructor
*/
Sampler()
- : mGraphics( nullptr ),
+ : mGraphicsController( nullptr ),
mGfxSampler( nullptr ),
mMinificationFilter(FilterMode::DEFAULT),
mMagnificationFilter(FilterMode::DEFAULT),
return {};
}
- void Initialize( Integration::Graphics::GraphicsInterface& graphics )
+ void Initialize( Graphics::Controller& graphicsController )
{
- mGraphics = &graphics;
+ mGraphicsController = &graphicsController;
mGfxSampler.reset( nullptr );
- mGfxSampler = mGraphics->GetController().CreateSampler(
- mGraphics->GetController().GetSamplerFactory()
+ mGfxSampler = graphicsController.CreateSampler(
+ graphicsController.GetSamplerFactory()
.SetMinFilter( GetGfxFilter( mMinificationFilter ) )
.SetMagFilter( GetGfxFilter( mMagnificationFilter ) )
.SetAddressModeU( GetGfxSamplerAddressMode( mSWrapMode ) )
);
}
- Integration::Graphics::GraphicsInterface* mGraphics; ///< Graphics interface
+ Graphics::Controller* mGraphicsController; ///< Graphics interface
std::unique_ptr<Dali::Graphics::Sampler> mGfxSampler; ///< Graphics Sampler object, default sampler is nullptr
FilterMode mMinificationFilter : 4; ///< The minify filter
{
Shader::Shader( Dali::Shader::Hint::Value& hints )
-: mGraphics( nullptr ),
+: mGraphicsController( nullptr ),
mGraphicsShader( nullptr ),
mShaderCache( nullptr ),
mHints( hints ),
mConnectionObservers.Destroy( *this );
}
-void Shader::Initialize( Integration::Graphics::GraphicsInterface& graphics, ShaderCache& shaderCache )
+void Shader::Initialize( Graphics::Controller& graphicsController, ShaderCache& shaderCache )
{
- mGraphics = &graphics;
+ mGraphicsController = &graphicsController;
mShaderCache = &shaderCache;
}
#include <dali/graphics-api/graphics-api-controller.h>
#include <dali/graphics-api/graphics-api-shader.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
-
#include <dali/internal/common/message.h>
#include <dali/internal/common/shader-data.h>
#include <dali/internal/event/common/event-thread-services.h>
* @param[in] graphics The Graphics API
* @param[in] shaderCache A cache
*/
- void Initialize( Integration::Graphics::GraphicsInterface& graphics, ShaderCache& shaderCache );
+ void Initialize( Graphics::Controller& graphics, ShaderCache& shaderCache );
/**
* Query whether a shader hint is set.
void BuildReflection();
private: // Data
- Integration::Graphics::GraphicsInterface* mGraphics; ///< Graphics interface object
- Graphics::Shader* mGraphicsShader; ///< The graphics object ( owned by cache )
- ShaderCache* mShaderCache;
- Dali::Shader::Hint::Value mHints; ///< Hints for the shader
- ConnectionChangePropagator mConnectionObservers; ///< Watch for connection changes
-
+ Graphics::Controller* mGraphicsController; ///< Graphics interface object
+ Graphics::Shader* mGraphicsShader; ///< The graphics object ( owned by cache )
+ ShaderCache* mShaderCache;
+ Dali::Shader::Hint::Value mHints; ///< Hints for the shader
+ ConnectionChangePropagator mConnectionObservers; ///< Watch for connection changes
/**
* Struct ReflectionUniformInfo
*/
struct ReflectionUniformInfo
{
- size_t hashValue;
- bool hasCollision;
+ size_t hashValue;
+ bool hasCollision;
Graphics::Shader* graphicsShader;
Graphics::ShaderDetails::UniformInfo uniformInfo;
};
Texture::Texture( Type type, Pixel::Format format, ImageDimensions size )
-: mGraphics( nullptr ),
+: mGraphicsController( nullptr ),
mGraphicsTexture( nullptr ),
mNativeImage(),
mSampler(),
}
Texture::Texture( NativeImageInterfacePtr nativeImageInterface )
-: mGraphics( nullptr ),
+: mGraphicsController( nullptr ),
mGraphicsTexture( nullptr ),
mNativeImage( nativeImageInterface ),
mSampler(),
Texture::~Texture()
{}
-void Texture::Initialize( Integration::Graphics::GraphicsInterface& graphics )
+void Texture::Initialize( Graphics::Controller& graphicsController )
{
- mGraphics = &graphics;
+ mGraphicsController = &graphicsController;
}
const Graphics::Texture* Texture::GetGfxObject() const
void Texture::CreateTextureInternal( Usage usage, unsigned char* buffer, unsigned int bufferSize )
{
- if( mGraphics )
+ if( mGraphicsController )
{
- auto& controller = mGraphics->GetController();
-
Graphics::TextureDetails::Usage graphicsUsage{};
switch( usage )
{
}
// Convert DALi format to Graphics API format
- mGraphicsTexture = controller.CreateTexture( controller.GetTextureFactory()
+ mGraphicsTexture = mGraphicsController->CreateTexture( mGraphicsController->GetTextureFactory()
.SetFormat( ConvertPixelFormat( mFormat ) )
.SetUsage( graphicsUsage )
.SetSize( { mWidth, mHeight } )
#include <dali/public-api/images/image-operations.h> // Dali::ImageDimensions
#include <dali/public-api/rendering/sampler.h>
#include <dali/public-api/rendering/texture.h>
+#include <dali/graphics-api/graphics-api-controller.h>
#include <dali/graphics-api/graphics-api-texture.h>
-#include <dali/integration-api/graphics/graphics-interface.h>
#include <dali/internal/common/message.h>
#include <dali/internal/event/rendering/texture-impl.h>
#include <dali/internal/update/rendering/scene-graph-sampler.h>
*
* @param[in] graphics The Graphics API
*/
- void Initialize( Integration::Graphics::GraphicsInterface& graphics );
+ void Initialize( Graphics::Controller& graphics );
/**
* Retrieve wheter the texture has an alpha channel
void CreateTextureInternal( Usage usage, unsigned char* buffer, unsigned int bufferSize );
private:
- Integration::Graphics::GraphicsInterface* mGraphics; ///< Graphics interface object
+ Graphics::Controller* mGraphicsController; ///< Graphics interface object
std::unique_ptr<Graphics::Texture> mGraphicsTexture; ///< Graphics texture
NativeImageInterfacePtr mNativeImage; ///< Pointer to native image
* limitations under the License.
*/
-#include <dali/integration-api/graphics/graphics-interface.h>
+#include <dali/graphics-api/graphics-api-controller.h>
#include <dali/graphics-api/graphics-api-shader.h>
#include <dali/graphics-api/graphics-api-shader-details.h>
+#include <memory>
namespace Dali
{