Bug 1022140 - Fix corruption of Flash videos at www.weather.com etc. r=mattwoodrow
authorJonathan Watt <jwatt@jwatt.org>
Sat, 07 Jun 2014 19:02:41 +0100
changeset 207783 45eeaf4173cd4b1aea9b3455a59be43167c29f9b
parent 207711 a2f0e0619332ba4ae1f37aab37bff6e71ffa19ab
child 207784 650ea68d7ef295ae847d705919d3c494964acd65
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1022140
milestone32.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 1022140 - Fix corruption of Flash videos at www.weather.com etc. r=mattwoodrow
dom/plugins/ipc/PluginInstanceChild.cpp
--- a/dom/plugins/ipc/PluginInstanceChild.cpp
+++ b/dom/plugins/ipc/PluginInstanceChild.cpp
@@ -3195,22 +3195,21 @@ PluginInstanceChild::PaintRectToSurface(
     if (mHelperSurface) {
         // On X11 we can paint to non Xlib surface only with HelperSurface
         renderSurface = mHelperSurface;
     }
 #endif
 
     if (mIsTransparent && !CanPaintOnBackground()) {
         // Clear surface content for transparent rendering
-        ColorPattern color(ToColor(aColor));
-        RefPtr<DrawTarget> dt = CreateDrawTargetForSurface(renderSurface);
-        dt->FillRect(gfx::Rect(plPaintRect.x, plPaintRect.y,
-                               plPaintRect.width, plPaintRect.height),
-                     color,
-                     DrawOptions(1.f, CompositionOp::OP_SOURCE));
+        nsRefPtr<gfxContext> ctx = new gfxContext(renderSurface);
+        ctx->SetDeviceColor(aColor);
+        ctx->SetOperator(gfxContext::OPERATOR_SOURCE);
+        ctx->Rectangle(GfxFromNsRect(plPaintRect));
+        ctx->Fill();
     }
 
     PaintRectToPlatformSurface(plPaintRect, renderSurface);
 
     if (renderSurface != aSurface) {
         // Copy helper surface content to target
         RefPtr<DrawTarget> dt = CreateDrawTargetForSurface(aSurface);
         RefPtr<SourceSurface> surface =