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

Commit c453a50

Browse files
lhkbobreed-at-google
authored andcommitted
Rename fIH variable to fInvH
Change-Id: I742d684a6375f48f4612c9db7d12693b1813d778 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292850 Commit-Queue: Michael Ludwig <[email protected]> Auto-Submit: Michael Ludwig <[email protected]> Reviewed-by: Weston Tracey <[email protected]>
1 parent a3908ef commit c453a50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/gpu/ops/GrTextureOp.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static bool filter_has_effect(const GrQuad& srcQuad, const GrQuad& dstQuad) {
9595
// regular and rectangular textures, w/ or w/o origin correction.
9696
struct NormalizationParams {
9797
float fIW; // 1 / width of texture, or 1.0 for texture rectangles
98-
float fIH; // 1 / height of texture, or 1.0 for tex rects, X -1 if bottom-left origin
98+
float fInvH; // 1 / height of texture, or 1.0 for tex rects, X -1 if bottom-left origin
9999
float fYOffset; // 0 for top-left origin, height of [normalized] tex if bottom-left
100100
};
101101
static NormalizationParams proxy_normalization_params(const GrSurfaceProxy* proxy,
@@ -147,9 +147,9 @@ static SkRect normalize_and_inset_subset(GrSamplerState::Filter filter,
147147
ltrb = skvx::min(ltrb*flipHi, mid*flipHi)*flipHi;
148148

149149
// Normalize and offset
150-
ltrb = mad(ltrb, {params.fIW, params.fIH, params.fIW, params.fIH},
150+
ltrb = mad(ltrb, {params.fIW, params.fInvH, params.fIW, params.fInvH},
151151
{0.f, params.fYOffset, 0.f, params.fYOffset});
152-
if (params.fIH < 0.f) {
152+
if (params.fInvH < 0.f) {
153153
// Flip top and bottom to keep the rect sorted when loaded back to SkRect.
154154
ltrb = skvx::shuffle<0, 3, 2, 1>(ltrb);
155155
}
@@ -165,7 +165,7 @@ static void normalize_src_quad(const NormalizationParams& params,
165165
// The src quad should not have any perspective
166166
SkASSERT(!srcQuad->hasPerspective());
167167
skvx::Vec<4, float> xs = srcQuad->x4f() * params.fIW;
168-
skvx::Vec<4, float> ys = mad(srcQuad->y4f(), params.fIH, params.fYOffset);
168+
skvx::Vec<4, float> ys = mad(srcQuad->y4f(), params.fInvH, params.fYOffset);
169169
xs.store(srcQuad->xs());
170170
ys.store(srcQuad->ys());
171171
}

0 commit comments

Comments
 (0)