From 9bd2c395c1eaa1c1eff7d7111a5a9b6b63d61ed4 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Fri, 29 Jul 2022 11:35:32 +0900 Subject: [PATCH] [Tizen] (DR) Fix texture binding Backporting of GLView Direct rendering feature Change-Id: I5eda9a16c769354485934c54136561d731e12ebe --- .../src/dali/dali-test-suite-utils/test-graphics-controller.cpp | 2 +- .../src/dali/dali-test-suite-utils/test-graphics-controller.h | 4 ++-- dali/graphics-api/graphics-controller.h | 4 ++-- dali/internal/render/renderers/render-renderer.cpp | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-graphics-controller.cpp b/automated-tests/src/dali/dali-test-suite-utils/test-graphics-controller.cpp index fc176e5..04d193c 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-graphics-controller.cpp +++ b/automated-tests/src/dali/dali-test-suite-utils/test-graphics-controller.cpp @@ -1302,7 +1302,7 @@ Graphics::MemoryRequirements TestGraphicsController::GetBufferMemoryRequirements return Graphics::MemoryRequirements{}; } -const Graphics::TextureProperties& TestGraphicsController::GetTextureProperties(const Graphics::Texture& texture) +Graphics::TextureProperties TestGraphicsController::GetTextureProperties(const Graphics::Texture& texture) { static Graphics::TextureProperties textureProperties{}; mCallStack.PushCall("GetTextureProperties", ""); diff --git a/automated-tests/src/dali/dali-test-suite-utils/test-graphics-controller.h b/automated-tests/src/dali/dali-test-suite-utils/test-graphics-controller.h index cabc414..81b93d2 100644 --- a/automated-tests/src/dali/dali-test-suite-utils/test-graphics-controller.h +++ b/automated-tests/src/dali/dali-test-suite-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. @@ -354,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 diff --git a/dali/graphics-api/graphics-controller.h b/dali/graphics-api/graphics-controller.h index 7aa13b0..bba245a 100644 --- a/dali/graphics-api/graphics-controller.h +++ b/dali/graphics-api/graphics-controller.h @@ -2,7 +2,7 @@ #define DALI_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. @@ -349,7 +349,7 @@ public: * * @return Returns the TextureProperties object */ - virtual const TextureProperties& GetTextureProperties(const Texture& texture) = 0; + virtual TextureProperties GetTextureProperties(const Texture& texture) = 0; /** * @brief Returns the reflection of the given program diff --git a/dali/internal/render/renderers/render-renderer.cpp b/dali/internal/render/renderers/render-renderer.cpp index 105b496..efbd5b0 100644 --- a/dali/internal/render/renderers/render-renderer.cpp +++ b/dali/internal/render/renderers/render-renderer.cpp @@ -466,10 +466,10 @@ bool Renderer::Render(Graphics::CommandBuffer& comma auto& textureImpl = GetImplementation(texture); auto graphicsTexture = textureImpl.GetRenderObject()->GetGraphicsObject(); - const auto& properties = mGraphicsController->GetTextureProperties(*graphicsTexture); + auto properties = mGraphicsController->GetTextureProperties(*graphicsTexture); mRenderCallbackTextureBindings.emplace_back(graphicsTexture); - mRenderCallbackInput.textureBindings[i] = properties.nativeHandle; + mRenderCallbackInput.textureBindings[i++] = properties.nativeHandle; } info.textureCount = mRenderCallbackTextureBindings.size(); info.textureList = mRenderCallbackTextureBindings.data(); -- 2.7.4