Repository navigation
refactor(transform): split TransformModel::present into private steps (move-only) - #481
Merged
Merged
Conversation
Move-only step of the TransformModel::present split (#476); review with git diff --color-moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
Move-only step of the TransformModel::present split (#476); review with git diff --color-moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
Move-only step of the TransformModel::present split (#476); review with git diff --color-moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
Move-only step of the TransformModel::present split (#476); review with git diff --color-moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
Move-only step of the TransformModel::present split (#476); review with git diff --color-moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
Move-only step of the TransformModel::present split (#476); review with git diff --color-moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
…utTransform (#476) Move-only step of the TransformModel::present split (#476); review with git diff --color-moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
Move-only step of the TransformModel::present split (#476); review with git diff --color-moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
Move-only step of the TransformModel::present split (#476); review with git diff --color-moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
Move-only step of the TransformModel::present split (#476); review with git diff --color-moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
Move-only step of the TransformModel::present split (#476); review with git diff --color-moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
Names the private steps TransformModel::present now runs and points the write-clamp reference at writeSiteTransform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #476
Splits
TransformModel::present(src/transform_model.cpp, 562 lines on main, 509-1070) into private member functions declared insrc/transform_model.hin call order.presentis now 61 lines (1063-1123) and reads as the tick's step sequence.Extracted functions (line ranges on this branch)
resolveLeveltxMaxStepPct), smooth-zoom ladder,RampStepHeldapplySamplingModewriteSiteTransformComputeMagTransform, 16-bit backstop,tdrTest==2probeswitchDwmCentrewriteAndWarmpublishInputTransformguardInputTransformStompweldPointerpresentCursorappendTracetxTracering rowpinAndGhostUpkeepMove-only
Every block was moved verbatim by a script (cut a contiguous line range, paste it as the body of the new function), with its comments. The only new lines are the function signatures and closing braces, the call sites, the returns (
return applyLevel;,return m;,return changed;,return ixForce;), one out-param hand-off (preLadderOut = preLadderLevel;), the header declarations and#include "transform.h"in the header (forMagTransform). Locals the blocks wrote are now reference parameters under the same names (txWroteThisTick,trChanged,trWarm,preLadderOut), so the moved lines did not need edits. Side-effect order, theensureMag()early return, logging and spans are unchanged.How I checked:
transform_model.cppand.honorigin/mainagainst this branch. Zero lines were removed, and every added line is in the list above.git diff --color-movedper commit shows each block as moved.Left inside
presenton purpose: the source-rect recompute for a capped level,ClickInProgress/DeliverOwedNudge/ensureMag(the early return has to stay inpresent), the trace-input capture, thepauseWritesgate and the edge-clip call. Each is a few lines and splitting them out would only scatter the order.Docs:
docs/architecture/05-transform-engine.mdgets a short "The tick path" section naming the steps, and the write-clamp reference now points atwriteSiteTransform.Gates
build.bat check: pass (only pre-existing C4996fopenwarnings in other files)build.bat test: exit 0, 643/643 test cases, 98940 assertionsbuild.bat: linksWind.exeandWindTray.exesrc/config_uiandui/untouched, so the config build and Playwright were not needed🤖 Generated with Claude Code
https://claude.ai/code/session_01TdjopXZfsUiesYxYLYHEdH