mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1143979 - Use RAII local instead of useless temporary. - r=kamidphish
This commit is contained in:
parent
284019a956
commit
5e28351c78
@ -179,6 +179,8 @@ void
|
|||||||
WebGLRenderbuffer::RenderbufferStorage(GLsizei samples, GLenum internalFormat,
|
WebGLRenderbuffer::RenderbufferStorage(GLsizei samples, GLenum internalFormat,
|
||||||
GLsizei width, GLsizei height) const
|
GLsizei width, GLsizei height) const
|
||||||
{
|
{
|
||||||
|
MOZ_ASSERT(mContext->mBoundRenderbuffer == this);
|
||||||
|
|
||||||
gl::GLContext* gl = mContext->gl;
|
gl::GLContext* gl = mContext->gl;
|
||||||
MOZ_ASSERT(samples >= 0 && samples <= 256); // Sanity check.
|
MOZ_ASSERT(samples >= 0 && samples <= 256); // Sanity check.
|
||||||
|
|
||||||
|
@ -599,10 +599,10 @@ ClearWithTempFB(WebGLContext* webgl, GLuint tex,
|
|||||||
|
|
||||||
gl::ScopedRenderbuffer rb(gl);
|
gl::ScopedRenderbuffer rb(gl);
|
||||||
{
|
{
|
||||||
gl::ScopedBindRenderbuffer(gl, rb.RB());
|
// Only GLES guarantees RGBA4.
|
||||||
gl->fRenderbufferStorage(LOCAL_GL_RENDERBUFFER,
|
GLenum format = gl->IsGLES() ? LOCAL_GL_RGBA4 : LOCAL_GL_RGBA8;
|
||||||
LOCAL_GL_RGBA4,
|
gl::ScopedBindRenderbuffer rbBinding(gl, rb.RB());
|
||||||
width, height);
|
gl->fRenderbufferStorage(LOCAL_GL_RENDERBUFFER, format, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
gl->fFramebufferRenderbuffer(LOCAL_GL_FRAMEBUFFER, LOCAL_GL_COLOR_ATTACHMENT0,
|
gl->fFramebufferRenderbuffer(LOCAL_GL_FRAMEBUFFER, LOCAL_GL_COLOR_ATTACHMENT0,
|
||||||
|
Loading…
Reference in New Issue
Block a user