зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1143979 - Use RAII local instead of useless temporary. - r=kamidphish
This commit is contained in:
Родитель
bcbe4c71e2
Коммит
f1a5b9e646
|
@ -179,6 +179,8 @@ void
|
|||
WebGLRenderbuffer::RenderbufferStorage(GLsizei samples, GLenum internalFormat,
|
||||
GLsizei width, GLsizei height) const
|
||||
{
|
||||
MOZ_ASSERT(mContext->mBoundRenderbuffer == this);
|
||||
|
||||
gl::GLContext* gl = mContext->gl;
|
||||
MOZ_ASSERT(samples >= 0 && samples <= 256); // Sanity check.
|
||||
|
||||
|
|
|
@ -599,10 +599,10 @@ ClearWithTempFB(WebGLContext* webgl, GLuint tex,
|
|||
|
||||
gl::ScopedRenderbuffer rb(gl);
|
||||
{
|
||||
gl::ScopedBindRenderbuffer(gl, rb.RB());
|
||||
gl->fRenderbufferStorage(LOCAL_GL_RENDERBUFFER,
|
||||
LOCAL_GL_RGBA4,
|
||||
width, height);
|
||||
// Only GLES guarantees RGBA4.
|
||||
GLenum format = gl->IsGLES() ? LOCAL_GL_RGBA4 : LOCAL_GL_RGBA8;
|
||||
gl::ScopedBindRenderbuffer rbBinding(gl, rb.RB());
|
||||
gl->fRenderbufferStorage(LOCAL_GL_RENDERBUFFER, format, width, height);
|
||||
}
|
||||
|
||||
gl->fFramebufferRenderbuffer(LOCAL_GL_FRAMEBUFFER, LOCAL_GL_COLOR_ATTACHMENT0,
|
||||
|
|
Загрузка…
Ссылка в новой задаче