diff --git a/impeller/aiks/paint_pass_delegate.cc b/impeller/aiks/paint_pass_delegate.cc index e942222a11d6d..019a67602386b 100644 --- a/impeller/aiks/paint_pass_delegate.cc +++ b/impeller/aiks/paint_pass_delegate.cc @@ -42,6 +42,7 @@ std::shared_ptr PaintPassDelegate::CreateContentsForSubpassTarget( const Matrix& effect_transform) { auto contents = TextureContents::MakeRect(Rect::MakeSize(target->GetSize())); contents->SetTexture(target); + contents->SetLabel("Subpass"); contents->SetSourceRect(Rect::MakeSize(target->GetSize())); contents->SetOpacity(paint_.color.alpha); contents->SetDeferApplyingOpacity(true); @@ -134,6 +135,7 @@ OpacityPeepholePassDelegate::CreateContentsForSubpassTarget( std::shared_ptr target, const Matrix& effect_transform) { auto contents = TextureContents::MakeRect(Rect::MakeSize(target->GetSize())); + contents->SetLabel("Subpass"); contents->SetTexture(target); contents->SetSourceRect(Rect::MakeSize(target->GetSize())); contents->SetOpacity(paint_.color.alpha); diff --git a/impeller/entity/contents/texture_contents.cc b/impeller/entity/contents/texture_contents.cc index 575ed1f83d3e9..90b3e157d853b 100644 --- a/impeller/entity/contents/texture_contents.cc +++ b/impeller/entity/contents/texture_contents.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "texture_contents.h" +#include "impeller/entity/contents/texture_contents.h" #include #include @@ -105,13 +105,13 @@ std::optional TextureContents::RenderToSnapshot( } static TextureFillVertexShader::PerVertexData ComputeVertexData( - const Point& vtx, + const Point& position, const Rect& coverage_rect, const ISize& texture_size, const Rect& source_rect) { TextureFillVertexShader::PerVertexData data; - data.position = vtx; - auto coverage_coords = (vtx - coverage_rect.origin) / coverage_rect.size; + data.position = position; + auto coverage_coords = (position - coverage_rect.origin) / coverage_rect.size; data.texture_coords = (source_rect.origin + source_rect.size * coverage_coords) / texture_size; return data; @@ -131,9 +131,9 @@ bool TextureContents::Render(const ContentContext& renderer, } VertexBufferBuilder vertex_builder; - for (const auto vtx : rect_.GetPoints()) { + for (const auto position : rect_.GetPoints()) { vertex_builder.AppendVertex(ComputeVertexData( - vtx, coverage_rect, texture_->GetSize(), source_rect_)); + position, coverage_rect, texture_->GetSize(), source_rect_)); } auto& host_buffer = pass.GetTransientsBuffer(); diff --git a/impeller/entity/entity_pass.cc b/impeller/entity/entity_pass.cc index ddb0d443a0a8a..87ff23e0094b5 100644 --- a/impeller/entity/entity_pass.cc +++ b/impeller/entity/entity_pass.cc @@ -283,6 +283,7 @@ bool EntityPass::Render(ContentContext& renderer, contents->SetTexture( offscreen_target.GetRenderTarget().GetRenderTargetTexture()); contents->SetSourceRect(size_rect); + contents->SetLabel("Root pass blit"); Entity entity; entity.SetContents(contents);