Bug 1051636. Don't mark video ImageLayers as opaque. r=tn
authorRobert O'Callahan <robert@ocallahan.org>
Tue, 16 Sep 2014 17:04:53 +1200
changeset 205580 66bad3def0255c3a692a6f1fed1781a9c1856292
parent 205579 ec335dbccfbdf490769fa7e8e45f4f8f36e55a13
child 205581 750e7aaf09cbe56f7bee01d1890774e03ffa0938
push id27498
push userkwierso@gmail.com
push dateWed, 17 Sep 2014 00:06:56 +0000
treeherdermozilla-central@8252eae8278c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstn
bugs1051636
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1051636. Don't mark video ImageLayers as opaque. r=tn The visible region of the layer is not necessarily restricted to the image that is will be rendered. Also, we don't know for sure an opaque video frame is going to appear.
layout/generic/nsVideoFrame.cpp
--- a/layout/generic/nsVideoFrame.cpp
+++ b/layout/generic/nsVideoFrame.cpp
@@ -215,17 +215,16 @@ nsVideoFrame::BuildLayer(nsDisplayListBu
   if (!layer) {
     layer = aManager->CreateImageLayer();
     if (!layer)
       return nullptr;
   }
 
   layer->SetContainer(container);
   layer->SetFilter(nsLayoutUtils::GetGraphicsFilterForFrame(this));
-  layer->SetContentFlags(Layer::CONTENT_OPAQUE);
   // Set a transform on the layer to draw the video in the right place
   gfxPoint p = r.TopLeft() + aContainerParameters.mOffset;
   Matrix transform = Matrix::Translation(p.x, p.y);
   transform.PreScale(r.Width() / frameSize.width,
                      r.Height() / frameSize.height);
   layer->SetBaseTransform(gfx::Matrix4x4::From2D(transform));
   nsRefPtr<Layer> result = layer.forget();
   return result.forget();