зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 3644926d994a (bug 1322650)
This commit is contained in:
Родитель
e3ef2e2a78
Коммит
8f099b6d5e
|
@ -684,8 +684,30 @@ GLBlitHelper::BindAndUploadEGLImage(EGLImage image, GLuint target)
|
|||
bool
|
||||
GLBlitHelper::BlitSurfaceTextureImage(layers::SurfaceTextureImage* stImage)
|
||||
{
|
||||
// FIXME
|
||||
return false;
|
||||
AndroidSurfaceTexture* surfaceTexture = stImage->GetSurfaceTexture();
|
||||
|
||||
ScopedBindTextureUnit boundTU(mGL, LOCAL_GL_TEXTURE0);
|
||||
|
||||
if (NS_FAILED(surfaceTexture->Attach(mGL, PR_MillisecondsToInterval(ATTACH_WAIT_MS))))
|
||||
return false;
|
||||
|
||||
// UpdateTexImage() changes the EXTERNAL binding, so save it here
|
||||
// so we can restore it after.
|
||||
int oldBinding = 0;
|
||||
mGL->fGetIntegerv(LOCAL_GL_TEXTURE_BINDING_EXTERNAL, &oldBinding);
|
||||
|
||||
surfaceTexture->UpdateTexImage();
|
||||
|
||||
gfx::Matrix4x4 transform;
|
||||
surfaceTexture->GetTransformMatrix(transform);
|
||||
|
||||
mGL->fUniformMatrix4fv(mTextureTransformLoc, 1, false, &transform._11);
|
||||
mGL->fDrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4);
|
||||
|
||||
surfaceTexture->Detach();
|
||||
|
||||
mGL->fBindTexture(LOCAL_GL_TEXTURE_EXTERNAL, oldBinding);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
Загрузка…
Ссылка в новой задаче