Bug 934886 - Fix incorrect color format of GetThebesSurfaceForDrawTarget when use SKIA as backend. r=gw280
authorPeter Chang <pchang@mozilla.com>
Thu, 07 Nov 2013 09:20:58 -0500
changeset 154008 73061d362809ea863942b13bb60fcd958bc69d11
parent 154007 aa013ffd209b94cb06151a39c5212884cefce0aa
child 154009 b740d99717716a1c79a52f0f62c88d6e90f967da
push id25617
push userryanvm@gmail.com
push dateThu, 07 Nov 2013 19:45:30 +0000
treeherdermozilla-central@545887140a1b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgw280
bugs934886
milestone28.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 934886 - Fix incorrect color format of GetThebesSurfaceForDrawTarget when use SKIA as backend. r=gw280
gfx/thebes/gfxPlatform.cpp
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -933,17 +933,17 @@ gfxPlatform::GetThebesSurfaceForDrawTarg
   RefPtr<SourceSurface> source = aTarget->Snapshot();
   RefPtr<DataSourceSurface> data = source->GetDataSurface();
 
   if (!data) {
     return nullptr;
   }
 
   IntSize size = data->GetSize();
-  gfxImageFormat format = OptimalFormatForContent(ContentForFormat(data->GetFormat()));
+  gfxImageFormat format = SurfaceFormatToImageFormat(data->GetFormat());
 
 
   nsRefPtr<gfxASurface> surf =
     new gfxImageSurface(data->GetData(), gfxIntSize(size.width, size.height),
                         data->Stride(), format);
 
   surf->SetData(&kDrawSourceSurface, data.forget().drop(), DataSourceSurfaceDestroy);
   // keep the draw target alive as long as we need its data