Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Implement 2 suggested Clang Tidy fixes we don't look for yet. #44816

Merged
merged 2 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions impeller/entity/contents/content_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ std::shared_ptr<Texture> ContentContext::MakeSubpass(
RenderTarget subpass_target;
if (context->GetCapabilities()->SupportsOffscreenMSAA() && msaa_enabled) {
subpass_target = RenderTarget::CreateOffscreenMSAA(
*context, *GetRenderTargetCache().get(), texture_size,
*context, *GetRenderTargetCache(), texture_size,
SPrintF("%s Offscreen", label.c_str()),
RenderTarget::kDefaultColorAttachmentConfigMSAA //
#ifndef FML_OS_ANDROID // Reduce PSO variants for Vulkan.
Expand All @@ -372,7 +372,7 @@ std::shared_ptr<Texture> ContentContext::MakeSubpass(
);
} else {
subpass_target = RenderTarget::CreateOffscreen(
*context, *GetRenderTargetCache().get(), texture_size,
*context, *GetRenderTargetCache(), texture_size,
SPrintF("%s Offscreen", label.c_str()),
RenderTarget::kDefaultColorAttachmentConfig //
#ifndef FML_OS_ANDROID // Reduce PSO variants for Vulkan.
Expand Down
8 changes: 4 additions & 4 deletions impeller/entity/contents/scene_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ bool SceneContents::Render(const ContentContext& renderer,
}

RenderTarget subpass_target = RenderTarget::CreateOffscreenMSAA(
*renderer.GetContext(), // context
*renderer.GetRenderTargetCache().get(), // allocator
ISize(coverage.value().size), // size
"SceneContents", // label
*renderer.GetContext(), // context
*renderer.GetRenderTargetCache(), // allocator
ISize(coverage.value().size), // size
"SceneContents", // label
RenderTarget::AttachmentConfigMSAA{
.storage_mode = StorageMode::kDeviceTransient,
.resolve_storage_mode = StorageMode::kDevicePrivate,
Expand Down
18 changes: 9 additions & 9 deletions impeller/entity/entity_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ static EntityPassTarget CreateRenderTarget(ContentContext& renderer,
RenderTarget target;
if (context->GetCapabilities()->SupportsOffscreenMSAA()) {
target = RenderTarget::CreateOffscreenMSAA(
*context, // context
*renderer.GetRenderTargetCache().get(), // allocator
size, // size
"EntityPass", // label
*context, // context
*renderer.GetRenderTargetCache(), // allocator
size, // size
"EntityPass", // label
RenderTarget::AttachmentConfigMSAA{
.storage_mode = StorageMode::kDeviceTransient,
.resolve_storage_mode = StorageMode::kDevicePrivate,
Expand All @@ -223,10 +223,10 @@ static EntityPassTarget CreateRenderTarget(ContentContext& renderer,
);
} else {
target = RenderTarget::CreateOffscreen(
*context, // context
*renderer.GetRenderTargetCache().get(), // allocator
size, // size
"EntityPass", // label
*context, // context
*renderer.GetRenderTargetCache(), // allocator
size, // size
"EntityPass", // label
RenderTarget::AttachmentConfig{
.storage_mode = StorageMode::kDevicePrivate,
.load_action = LoadAction::kDontCare,
Expand Down Expand Up @@ -386,7 +386,7 @@ bool EntityPass::Render(ContentContext& renderer,
// provided by the caller.
else {
root_render_target.SetupStencilAttachment(
*renderer.GetContext(), *renderer.GetRenderTargetCache().get(),
*renderer.GetContext(), *renderer.GetRenderTargetCache(),
color0.texture->GetSize(),
renderer.GetContext()->GetCapabilities()->SupportsOffscreenMSAA(),
"ImpellerOnscreen",
Expand Down
2 changes: 1 addition & 1 deletion impeller/entity/render_target_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void RenderTargetCache::Start() {
void RenderTargetCache::End() {
std::vector<TextureData> retain;

for (auto td : texture_data_) {
for (const auto& td : texture_data_) {
if (td.used_this_frame) {
retain.push_back(td);
}
Expand Down