зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1285692 - Acquire surface to allow FB completeness. - r=jrmuizel
MozReview-Commit-ID: H9IidhUqqw9
This commit is contained in:
Родитель
f20e108935
Коммит
4f5557b7e1
|
@ -945,9 +945,20 @@ ReadBuffer::Create(GLContext* gl,
|
|||
|
||||
GLenum err = localError.GetError();
|
||||
MOZ_ASSERT_IF(err != LOCAL_GL_NO_ERROR, err == LOCAL_GL_OUT_OF_MEMORY);
|
||||
if (err || !gl->IsFramebufferComplete(fb)) {
|
||||
ret = nullptr;
|
||||
if (err)
|
||||
return nullptr;
|
||||
|
||||
const bool needsAcquire = !surf->IsProducerAcquired();
|
||||
if (needsAcquire) {
|
||||
surf->ProducerAcquire();
|
||||
}
|
||||
const bool isComplete = gl->IsFramebufferComplete(fb);
|
||||
if (needsAcquire) {
|
||||
surf->ProducerRelease();
|
||||
}
|
||||
|
||||
if (!isComplete)
|
||||
return nullptr;
|
||||
|
||||
return Move(ret);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче