X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftest-graphics-controller.h;h=81b93d28728cc9a959a9e9d7320907a40d0c95c5;hb=026a32be68bfde3ccce97b366b1098df731354e4;hp=1d93bfa33965033b00ec5e44f74f53a19b7b4168;hpb=5e1dae0562fcc34734aaec2b4ee1d187d76a6e38;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.h index 1d93bfa..81b93d2 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-graphics-controller.h @@ -2,7 +2,7 @@ #define TEST_GRAPHICS_CONTROLLER_H /* - * 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. @@ -20,10 +20,10 @@ #include #include "test-gl-abstraction.h" #include "test-gl-context-helper-abstraction.h" -#include "test-gl-sync-abstraction.h" #include "test-graphics-command-buffer.h" #include "test-graphics-program.h" #include "test-graphics-reflection.h" +#include "test-graphics-sync-impl.h" namespace Dali { @@ -85,6 +85,12 @@ T* Uncast(const Graphics::RenderTarget* object) return const_cast(static_cast(object)); } +template +T* Uncast(const Graphics::SyncObject* object) +{ + return const_cast(static_cast(object)); +} + class TestGraphicsController : public Dali::Graphics::Controller { public: @@ -102,14 +108,14 @@ public: return mGl; } - Integration::GlSyncAbstraction& GetGlSyncAbstraction() override + Integration::GlContextHelperAbstraction& GetGlContextHelperAbstraction() override { - return mGlSyncAbstraction; + return mGlContextHelperAbstraction; } - Integration::GlContextHelperAbstraction& GetGlContextHelperAbstraction() override + TestGraphicsSyncImplementation& GetGraphicsSyncImpl() { - return mGlContextHelperAbstraction; + return mGraphicsSyncImpl; } void SubmitCommandBuffers(const Graphics::SubmitInfo& submitInfo) override; @@ -162,6 +168,12 @@ public: const std::vector& sourceList) override; /** + * Auto generates mipmaps for the texture + * @param[in] texture The texture + */ + void GenerateTextureMipmaps(const Graphics::Texture& texture) override; + + /** * TBD: do we need those functions in the new implementation? */ bool EnableDepthStencilBuffer(bool enableDepth, bool enableStencil) override; @@ -268,11 +280,20 @@ public: Graphics::UniquePtr CreateRenderTarget(const Graphics::RenderTargetCreateInfo& renderTargetCreateInfo, Graphics::UniquePtr&& oldRenderTarget) override; /** + * @brief Creates new sync object + * Could add timeout etc to createinfo... but nah. + * + * @return pointer to the SyncObject + */ + Graphics::UniquePtr CreateSyncObject(const Graphics::SyncObjectCreateInfo& syncObjectCreateInfo, + Graphics::UniquePtr&& oldSyncObject) override; + + /** * @brief Maps memory associated with Buffer object * * @param[in] mapInfo Filled details of mapped resource * - * @return Returns pointer to Memory object or Graphicsnullptr on error + * @return Returns pointer to Memory object or nullptr on error */ Graphics::UniquePtr MapBufferRange(const Graphics::MapBufferInfo& mapInfo) override; @@ -333,7 +354,7 @@ public: * * @return Returns the TextureProperties object */ - const Graphics::TextureProperties& GetTextureProperties(const Graphics::Texture& texture) override; + Graphics::TextureProperties GetTextureProperties(const Graphics::Texture& texture) override; /** * @brief Returns the reflection of the given program @@ -391,7 +412,7 @@ public: mutable std::vector mSubmitStack; TestGlAbstraction mGl; - TestGlSyncAbstraction mGlSyncAbstraction; + TestGraphicsSyncImplementation mGraphicsSyncImpl; TestGlContextHelperAbstraction mGlContextHelperAbstraction; bool isDiscardQueueEmptyResult{true};