Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync changes from mozilla-central gfx/wr #4060

Merged
merged 1 commit into from Aug 16, 2020
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Bug 1659274 - silence build warnings in SWGL linear_composite. r=jimb

  • Loading branch information
Lee Salzman authored and moz-gfx committed Aug 16, 2020
commit 1601ec5ffd7c54f5d17c8f8040c500146f7ada7a
@@ -4011,8 +4011,8 @@ static void linear_row_composite(uint32_t* dest, int span,
static void linear_composite(Texture& srctex, const IntRect& srcReq, int srcZ,
Texture& dsttex, const IntRect& dstReq, int dstZ,
bool invertY) {
assert(srctex.internal_format == GL_RGBA8 ||
srctex.internal_format == GL_R8 || srctex.internal_format == GL_RG8);
assert(srctex.bpp() == 4);
assert(dsttex.bpp() == 4);
// Compute valid dest bounds
IntRect dstBounds = dsttex.sample_bounds(dstReq, invertY);
// Check if sampling bounds are empty
@@ -4035,8 +4035,6 @@ static void linear_composite(Texture& srctex, const IntRect& srcReq, int srcZ,
srcUV = linearQuantize(srcUV + 0.5f, 128);
srcDUV *= 128.0f;
// Calculate dest pointer from clamped offsets
int bpp = dsttex.bpp();
assert(bpp == 4);
int destStride = dsttex.stride();
char* dest = dsttex.sample_ptr(dstReq, dstBounds, dstZ, invertY);
// Inverted Y must step downward along dest rows
@@ -4197,6 +4195,7 @@ void Composite(LockedTexture* lockedDst, LockedTexture* lockedSrc, GLint srcX,
Texture& srctex = *lockedSrc;
Texture& dsttex = *lockedDst;
assert(srctex.bpp() == 4);
assert(dsttex.bpp() == 4);
const int bpp = 4;
size_t src_stride = srctex.stride();
size_t dest_stride = dsttex.stride();
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.