mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1012407 - Part 9: Use CLAMP instead of GL_REPEAT to draw quads (r=Bas)
This commit is contained in:
parent
37ea7c31b8
commit
1bd8b3e051
@ -116,18 +116,6 @@ FlagsToGLFlags(TextureFlags aFlags)
|
||||
return static_cast<gl::TextureImage::Flags>(result);
|
||||
}
|
||||
|
||||
static GLenum
|
||||
WrapMode(gl::GLContext *aGl, TextureFlags aFlags)
|
||||
{
|
||||
if ((aFlags & TextureFlags::ALLOW_REPEAT) &&
|
||||
(aGl->IsExtensionSupported(GLContext::ARB_texture_non_power_of_two) ||
|
||||
aGl->IsExtensionSupported(GLContext::OES_texture_npot) ||
|
||||
aGl->IsExtensionSupported(GLContext::IMG_texture_npot))) {
|
||||
return LOCAL_GL_REPEAT;
|
||||
}
|
||||
return LOCAL_GL_CLAMP_TO_EDGE;
|
||||
}
|
||||
|
||||
CompositableDataGonkOGL::CompositableDataGonkOGL()
|
||||
: mTexture(0)
|
||||
, mBoundEGLImage(EGL_NO_IMAGE)
|
||||
@ -262,7 +250,7 @@ TextureImageTextureSourceOGL::Update(gfx::DataSourceSurface* aSurface,
|
||||
// texture image.
|
||||
mTexImage = CreateBasicTextureImage(mGL, size,
|
||||
gfx::ContentForFormat(aSurface->GetFormat()),
|
||||
WrapMode(mGL, mFlags),
|
||||
LOCAL_GL_CLAMP_TO_EDGE,
|
||||
FlagsToGLFlags(mFlags),
|
||||
SurfaceFormatToImageFormat(aSurface->GetFormat()));
|
||||
} else {
|
||||
@ -273,6 +261,7 @@ TextureImageTextureSourceOGL::Update(gfx::DataSourceSurface* aSurface,
|
||||
mTexImage = CreateTextureImage(mGL,
|
||||
size,
|
||||
gfx::ContentForFormat(aSurface->GetFormat()),
|
||||
LOCAL_GL_CLAMP_TO_EDGE,
|
||||
WrapMode(mGL, mFlags),
|
||||
FlagsToGLFlags(mFlags),
|
||||
SurfaceFormatToImageFormat(aSurface->GetFormat()));
|
||||
@ -298,7 +287,7 @@ TextureImageTextureSourceOGL::EnsureBuffer(const nsIntSize& aSize,
|
||||
mTexImage = CreateTextureImage(mGL,
|
||||
aSize.ToIntSize(),
|
||||
aContentType,
|
||||
WrapMode(mGL, mFlags),
|
||||
LOCAL_GL_CLAMP_TO_EDGE,
|
||||
FlagsToGLFlags(mFlags));
|
||||
}
|
||||
mTexImage->Resize(aSize.ToIntSize());
|
||||
|
Loading…
Reference in New Issue
Block a user