зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1276096 - Forbid reads from backbuffer with readBuffer(NONE). - r=jrmuizel
This commit is contained in:
Родитель
3773a30362
Коммит
42afe56497
|
@ -1882,6 +1882,14 @@ WebGLContext::ValidateCurFBForRead(const char* funcName,
|
||||||
GLenum* const out_mode)
|
GLenum* const out_mode)
|
||||||
{
|
{
|
||||||
if (!mBoundReadFramebuffer) {
|
if (!mBoundReadFramebuffer) {
|
||||||
|
const GLenum readBufferMode = gl->Screen()->GetReadBufferMode();
|
||||||
|
if (readBufferMode == LOCAL_GL_NONE) {
|
||||||
|
ErrorInvalidOperation("%s: Can't read from backbuffer when readBuffer mode is"
|
||||||
|
" NONE.",
|
||||||
|
funcName);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ClearBackbufferIfNeeded();
|
ClearBackbufferIfNeeded();
|
||||||
|
|
||||||
// FIXME - here we're assuming that the default framebuffer is backed by
|
// FIXME - here we're assuming that the default framebuffer is backed by
|
||||||
|
|
Загрузка…
Ссылка в новой задаче