Bug 599507. Propagate opacity and transform from single-child ContainerLayerOGL to child. r=joe, a=blocker
This commit is contained in:
@@ -371,7 +371,9 @@ ImageLayerOGL::GetLayer()
|
||||
|
||||
void
|
||||
ImageLayerOGL::RenderLayer(int,
|
||||
const nsIntPoint& aOffset)
|
||||
const nsIntPoint& aOffset,
|
||||
float aOpacity,
|
||||
const gfx3DMatrix& aMatrix)
|
||||
{
|
||||
if (!GetContainer())
|
||||
return;
|
||||
@@ -410,8 +412,8 @@ ImageLayerOGL::RenderLayer(int,
|
||||
program->SetLayerQuadRect(nsIntRect(0, 0,
|
||||
yuvImage->mSize.width,
|
||||
yuvImage->mSize.height));
|
||||
program->SetLayerTransform(GetEffectiveTransform());
|
||||
program->SetLayerOpacity(GetOpacity());
|
||||
program->SetLayerTransform(GetEffectiveTransform() * aMatrix);
|
||||
program->SetLayerOpacity(GetOpacity() * aOpacity);
|
||||
program->SetRenderOffset(aOffset);
|
||||
program->SetYCbCrTextureUnits(0, 1, 2);
|
||||
|
||||
@@ -439,8 +441,8 @@ ImageLayerOGL::RenderLayer(int,
|
||||
program->SetLayerQuadRect(nsIntRect(0, 0,
|
||||
cairoImage->mSize.width,
|
||||
cairoImage->mSize.height));
|
||||
program->SetLayerTransform(GetEffectiveTransform());
|
||||
program->SetLayerOpacity(GetOpacity());
|
||||
program->SetLayerTransform(GetEffectiveTransform() * aMatrix);
|
||||
program->SetLayerOpacity(GetOpacity() * aOpacity);
|
||||
program->SetRenderOffset(aOffset);
|
||||
program->SetTextureUnit(0);
|
||||
|
||||
@@ -787,7 +789,9 @@ ShadowImageLayerOGL::GetLayer()
|
||||
|
||||
void
|
||||
ShadowImageLayerOGL::RenderLayer(int aPreviousFrameBuffer,
|
||||
const nsIntPoint& aOffset)
|
||||
const nsIntPoint& aOffset,
|
||||
float aOpacity,
|
||||
const gfx3DMatrix& aMatrix)
|
||||
{
|
||||
mOGLManager->MakeCurrent();
|
||||
|
||||
@@ -801,8 +805,8 @@ ShadowImageLayerOGL::RenderLayer(int aPreviousFrameBuffer,
|
||||
|
||||
program->Activate();
|
||||
program->SetLayerQuadRect(nsIntRect(nsIntPoint(0, 0), mTexImage->GetSize()));
|
||||
program->SetLayerTransform(mTransform);
|
||||
program->SetLayerOpacity(GetOpacity());
|
||||
program->SetLayerTransform(mTransform * aMatrix);
|
||||
program->SetLayerOpacity(GetOpacity() * aOpacity);
|
||||
program->SetRenderOffset(aOffset);
|
||||
program->SetTextureUnit(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user