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 #4059

Merged
merged 1 commit into from Aug 15, 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 1658858 - Implement ImageRendering filtering parameter for SwComp…

  • Loading branch information
mattwoodrow authored and moz-gfx committed Aug 15, 2020
commit afd027a5143824f9d56f07774a95c886f03a2d70
@@ -4190,7 +4190,7 @@ void UnlockResource(LockedTexture* resource) {
void Composite(LockedTexture* lockedDst, LockedTexture* lockedSrc, GLint srcX,
GLint srcY, GLsizei srcWidth, GLsizei srcHeight, GLint dstX,
GLint dstY, GLsizei dstWidth, GLsizei dstHeight,
GLboolean opaque, GLboolean flip) {
GLboolean opaque, GLboolean flip, GLenum filter) {
if (!lockedDst || !lockedSrc) {
return;
}
@@ -4224,7 +4224,6 @@ void Composite(LockedTexture* lockedDst, LockedTexture* lockedSrc, GLint srcX,

IntRect srcReq = {srcX, srcY, srcX + srcWidth, srcY + srcHeight};
IntRect dstReq = {dstX, dstY, dstX + dstWidth, dstY + dstHeight};
GLenum filter = GL_LINEAR; // TODO

if (opaque) {
if (!srcReq.same_size(dstReq) && filter == GL_LINEAR) {
@@ -299,6 +299,7 @@ extern "C" {
dst_height: GLsizei,
opaque: GLboolean,
flip: GLboolean,
filter: GLenum,
);
fn CreateContext() -> *mut c_void;
fn ReferenceContext(ctx: *mut c_void);
@@ -2301,6 +2302,7 @@ impl LockedResource {
dst_height: GLsizei,
opaque: bool,
flip: bool,
filter: GLenum,
) {
unsafe {
Composite(
@@ -2316,6 +2318,7 @@ impl LockedResource {
dst_height,
opaque as GLboolean,
flip as GLboolean,
filter,
);
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.