From 3579bc01735660a84c16e4c0f9522beac473dcbb Mon Sep 17 00:00:00 2001 From: zhanghongquan112 Date: Wed, 16 Feb 2022 16:28:00 +0800 Subject: [PATCH] Support dumping intermediate images during the process. Fix the size problem when only connecting Input to Output. Delete unnecessary swaping command. Signed-off-by: zhanghongquan112 Change-Id: Id67daa8d96964e3fe64ac66756b2c76247e8752a --- rosen/modules/effect/effectChain/src/gaussian_blur_filter.cpp | 1 - rosen/modules/effect/effectChain/src/output.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/rosen/modules/effect/effectChain/src/gaussian_blur_filter.cpp b/rosen/modules/effect/effectChain/src/gaussian_blur_filter.cpp index bd9fb793c6..b334c3ab2c 100644 --- a/rosen/modules/effect/effectChain/src/gaussian_blur_filter.cpp +++ b/rosen/modules/effect/effectChain/src/gaussian_blur_filter.cpp @@ -41,7 +41,6 @@ void GaussianBlurFilter::DoProcess(ProcessData& data) horizontalBlurFilter_->Process(data); verticalBlurFilter_->Process(data); upSampleFilter_->Process(data); - std::swap(data.srcTextureID, data.dstTextureID); } void GaussianBlurFilter::SetValue(const std::string& key, void* value, int size) diff --git a/rosen/modules/effect/effectChain/src/output.cpp b/rosen/modules/effect/effectChain/src/output.cpp index 1284c8ab86..e89ba76307 100644 --- a/rosen/modules/effect/effectChain/src/output.cpp +++ b/rosen/modules/effect/effectChain/src/output.cpp @@ -43,6 +43,7 @@ void Output::DoProcess(ProcessData& data) glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, data.textureWidth, data.textureHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, data.dstTextureID, 0); Use(); + glViewPort(0, 0, data.textureWidth, data.textureHeight); glBindVertexArray(mesh_->VAO_); glBindTexture(GL_TEXTURE_2D, data.srcTextureID); glDrawElements(GL_TRIANGLES, AlgoFilter::DRAW_ELEMENTS_NUMBER, GL_UNSIGNED_INT, 0); @@ -70,7 +71,6 @@ void Output::DoProcess(ProcessData& data) imagePacker.AddImage(*pixelMap); int64_t packedSize = 0; imagePacker.FinalizePacking(packedSize); - AddNextFilter(nullptr); } void Output::SetValue(const std::string& key, void* value, int size)