Skip to content

Commit 411efdf

Browse files
committed
Rename customRenderTarget
The currentRenderTarget is a misnomer as it's a custom RT. Rename it properly.
1 parent 6653c6c commit 411efdf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

filament/src/details/Renderer.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -818,14 +818,14 @@ void FRenderer::renderJob(RootArenaScope& rootArenaScope, FView& view) {
818818
blackboard["shadows"] = shadows;
819819
}
820820

821-
// When we don't have a custom RenderTarget, currentRenderTarget below is nullptr and is
821+
// When we don't have a custom RenderTarget, customRenderTarget below is nullptr and is
822822
// recorded in the list of targets already rendered into -- this ensures that
823823
// initializeClearFlags() is called only once for the default RenderTarget.
824824
auto& previousRenderTargets = mPreviousRenderTargets;
825-
FRenderTarget* const currentRenderTarget = downcast(view.getRenderTarget());
825+
FRenderTarget* const customRenderTarget = downcast(view.getRenderTarget());
826826
if (UTILS_LIKELY(
827-
previousRenderTargets.find(currentRenderTarget) == previousRenderTargets.end())) {
828-
previousRenderTargets.insert(currentRenderTarget);
827+
previousRenderTargets.find(customRenderTarget) == previousRenderTargets.end())) {
828+
previousRenderTargets.insert(customRenderTarget);
829829
initializeClearFlags();
830830
}
831831

@@ -842,10 +842,10 @@ void FRenderer::renderJob(RootArenaScope& rootArenaScope, FView& view) {
842842
const TargetBufferFlags keepOverrideStartFlags = TargetBufferFlags::ALL & ~discardStartFlags;
843843
TargetBufferFlags keepOverrideEndFlags = TargetBufferFlags::NONE;
844844

845-
if (currentRenderTarget) {
845+
if (customRenderTarget) {
846846
// For custom RenderTarget, we look at each attachment flag and if they have their
847847
// SAMPLEABLE usage bit set, we assume they must not be discarded after the render pass.
848-
keepOverrideEndFlags |= currentRenderTarget->getSampleableAttachmentsMask();
848+
keepOverrideEndFlags |= customRenderTarget->getSampleableAttachmentsMask();
849849
}
850850

851851
// Renderer's ClearOptions apply once at the beginning of the frame (not for each View),

0 commit comments

Comments
 (0)