b=621067; Update angle to r515 to pick up crash fix; r+a=vlad
authorVladimir Vukicevic <vladimir@pobox.com>
Wed, 22 Dec 2010 15:31:02 -0800
changeset 59620 8232a1410e4241fd68d63e4a671788deebd1b5b4
parent 59619 ad071e6d8bb340b6db40c049ef0689f6159bede3
child 59621 307f6c854845706f8c59f30d78b82f8eaf5b7312
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
bugs621067
milestone2.0b9pre
b=621067; Update angle to r515 to pick up crash fix; r+a=vlad
gfx/angle/README.mozilla
gfx/angle/src/libGLESv2/Texture.cpp
--- a/gfx/angle/README.mozilla
+++ b/gfx/angle/README.mozilla
@@ -1,11 +1,11 @@
 This is the ANGLE project, from http://code.google.com/p/angleproject/.
 
-Current revision: r511
+Current revision: r515
 
 Local patches:
     angle-shared.patch - add declspec dllexport/dllimport support on win32
 
     angle-fixes.patch - fix angle issues 51 & 52
 
 == Visual Studio Solution Files ==
 
--- a/gfx/angle/src/libGLESv2/Texture.cpp
+++ b/gfx/angle/src/libGLESv2/Texture.cpp
@@ -982,29 +982,29 @@ void Texture::copyNonRenderable(Image *i
         {
           case D3DFMT_X8R8G8B8:
           case D3DFMT_A8R8G8B8:
             switch(getD3DFormat())
             {
               case D3DFMT_L8:
                 for(int y = 0; y < height; y++)
                 {
-                    for(int x = 0; x < height; x++)
+                    for(int x = 0; x < width; x++)
                     {
                         dest[x] = source[x * 4 + 2];
                     }
 
                     source += sourceLock.Pitch;
                     dest += destLock.Pitch;
                 }
                 break;
               case D3DFMT_A8L8:
                 for(int y = 0; y < height; y++)
                 {
-                    for(int x = 0; x < height; x++)
+                    for(int x = 0; x < width; x++)
                     {
                         dest[x * 2 + 0] = source[x * 4 + 2];
                         dest[x * 2 + 1] = source[x * 4 + 3];
                     }
 
                     source += sourceLock.Pitch;
                     dest += destLock.Pitch;
                 }
@@ -1014,30 +1014,64 @@ void Texture::copyNonRenderable(Image *i
             }
             break;
           case D3DFMT_R5G6B5:
             switch(getD3DFormat())
             {
               case D3DFMT_L8:
                 for(int y = 0; y < height; y++)
                 {
-                    for(int x = 0; x < height; x++)
+                    for(int x = 0; x < width; x++)
                     {
                         unsigned char red = source[x * 2 + 1] & 0xF8;
                         dest[x] = red | (red >> 5);
                     }
 
                     source += sourceLock.Pitch;
                     dest += destLock.Pitch;
                 }
                 break;
               default:
                 UNREACHABLE();
             }
             break;
+          case D3DFMT_A1R5G5B5:
+            switch(getD3DFormat())
+            {
+              case D3DFMT_L8:
+                for(int y = 0; y < height; y++)
+                {
+                    for(int x = 0; x < width; x++)
+                    {
+                        unsigned char red = source[x * 2 + 1] & 0x7C;
+                        dest[x] = (red << 1) | (red >> 4);
+                    }
+
+                    source += sourceLock.Pitch;
+                    dest += destLock.Pitch;
+                }
+                break;
+              case D3DFMT_A8L8:
+                for(int y = 0; y < height; y++)
+                {
+                    for(int x = 0; x < width; x++)
+                    {
+                        unsigned char red = source[x * 2 + 1] & 0x7C;
+                        dest[x * 2 + 0] = (red << 1) | (red >> 4);
+                        dest[x * 2 + 1] = (signed char)source[x * 2 + 1] >> 7;
+                    }
+
+                    source += sourceLock.Pitch;
+                    dest += destLock.Pitch;
+                }
+                break;
+              default:
+                UNREACHABLE();
+            }
+            break;
           default:
             UNREACHABLE();
         }
 
         image->dirty = true;
         mDirtyMetaData = true;    
     }