Bug 1001682 - Don't reverse the R and B components in the GL CopyDataSourceSurface code for SurfaceFormat::R5G6B5. r=mattwoodrow
authorJonathan Watt <jwatt@jwatt.org>
Tue, 29 Apr 2014 00:26:53 +0100
changeset 181042 2c14ea7a713c2c96458b1cef262c4b41d3b794f6
parent 181041 d7c07694f3392e453619adee3aeede9473757f6b
child 181043 b437c670e0907e03e170a3062c2b0c8ec128f1b8
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersmattwoodrow
bugs1001682
milestone32.0a1
Bug 1001682 - Don't reverse the R and B components in the GL CopyDataSourceSurface code for SurfaceFormat::R5G6B5. r=mattwoodrow
gfx/gl/GLReadTexImageHelper.cpp
--- a/gfx/gl/GLReadTexImageHelper.cpp
+++ b/gfx/gl/GLReadTexImageHelper.cpp
@@ -257,18 +257,17 @@ static void CopyDataSourceSurface(DataSo
   size_t srcRowHole = aSource->Stride() - srcRowBytes;
 
   uint8_t *destRow = aDest->GetData();
   size_t destRowBytes = aDest->GetSize().width * BytesPerPixel(aDest->GetFormat());
   size_t destRowHole = aDest->Stride() - destRowBytes;
 
   bool needsRBSwap = false;
   if (aDest->GetFormat() == SurfaceFormat::B8G8R8A8 ||
-      aDest->GetFormat() == SurfaceFormat::B8G8R8X8 ||
-      aDest->GetFormat() == SurfaceFormat::R5G6B5) {
+      aDest->GetFormat() == SurfaceFormat::B8G8R8X8) {
       needsRBSwap = true;
   }
 
   bool needsConvertTo16Bits = false;
   if (aDest->GetFormat() == SurfaceFormat::R5G6B5) {
       needsConvertTo16Bits = true;
   }