зеркало из https://github.com/mozilla/gecko-dev.git
Bug 850566 - Part 2: Render gralloc buffer by using image size. r=roc, a=tef+
This commit is contained in:
Родитель
52fe7717a6
Коммит
df05e11542
|
@ -960,6 +960,7 @@ ShadowImageLayerOGL::RenderLayer(int aPreviousFrameBuffer,
|
|||
const SurfaceDescriptorGralloc& desc = img->get_SurfaceDescriptor().get_SurfaceDescriptorGralloc();
|
||||
sp<GraphicBuffer> graphicBuffer = GrallocBufferActor::GetFrom(desc);
|
||||
mSize = gfxIntSize(graphicBuffer->getWidth(), graphicBuffer->getHeight());
|
||||
mPictureRect = nsIntRect(0, 0, desc.size().width, desc.size().height);
|
||||
if (!mExternalBufferTexture.IsAllocated()) {
|
||||
mExternalBufferTexture.Allocate(gl());
|
||||
}
|
||||
|
@ -1025,14 +1026,17 @@ ShadowImageLayerOGL::RenderLayer(int aPreviousFrameBuffer,
|
|||
|
||||
program->Activate();
|
||||
program->SetLayerQuadRect(nsIntRect(0, 0,
|
||||
mSize.width, mSize.height));
|
||||
mPictureRect.width,
|
||||
mPictureRect.height));
|
||||
program->SetLayerTransform(GetEffectiveTransform());
|
||||
program->SetLayerOpacity(GetEffectiveOpacity());
|
||||
program->SetRenderOffset(aOffset);
|
||||
program->SetTextureUnit(0);
|
||||
program->LoadMask(GetMaskLayer());
|
||||
|
||||
mOGLManager->BindAndDrawQuad(program);
|
||||
mOGLManager->BindAndDrawQuadWithTextureRect(program,
|
||||
mPictureRect,
|
||||
nsIntSize(mSize.width, mSize.height));
|
||||
|
||||
// Make sure that we release the underlying external image
|
||||
gl()->fActiveTexture(LOCAL_GL_TEXTURE0);
|
||||
|
|
Загрузка…
Ссылка в новой задаче