From 9a725569b5872d0d4e0c450cbc826b4944ac8f6d Mon Sep 17 00:00:00 2001 From: Benoit Girard Date: Tue, 14 Feb 2012 13:16:18 -0500 Subject: [PATCH] Remove adreno fix, it only makes the crash less likely --- gfx/thebes/gfxSharedImageSurface.cpp | 8 +------- gfx/thebes/gfxSharedImageSurface.h | 16 ---------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/gfx/thebes/gfxSharedImageSurface.cpp b/gfx/thebes/gfxSharedImageSurface.cpp index 9478f4e7fc4..cbb42b8253e 100644 --- a/gfx/thebes/gfxSharedImageSurface.cpp +++ b/gfx/thebes/gfxSharedImageSurface.cpp @@ -80,13 +80,7 @@ gfxSharedImageSurface::gfxSharedImageSurface(const gfxIntSize& aSize, mSize = aSize; mFormat = aFormat; - - int w = aSize.width; - int h = aSize.height; - if ((aSize.width%MOZ_IMG_MEM_ALIGN) != 0) - w = aSize.width + MOZ_IMG_MEM_ALIGN - (aSize.width%MOZ_IMG_MEM_ALIGN); - mStride = ComputeStride(gfxIntSize(w, h), aFormat); - + mStride = ComputeStride(aSize, aFormat); mShmem = aShmem; mData = aShmem.get(); cairo_surface_t *surface = diff --git a/gfx/thebes/gfxSharedImageSurface.h b/gfx/thebes/gfxSharedImageSurface.h index 0538bf63dfb..a7dfd103b30 100644 --- a/gfx/thebes/gfxSharedImageSurface.h +++ b/gfx/thebes/gfxSharedImageSurface.h @@ -39,14 +39,6 @@ #ifndef GFX_SHARED_IMAGESURFACE_H #define GFX_SHARED_IMAGESURFACE_H -#if ANDROID - // Using an 64 align prevents us from crashing in driver - // code when doing RGB565 uploads. See bug 721489 - #define MOZ_IMG_MEM_ALIGN 64 -#else - #define MOZ_IMG_MEM_ALIGN 1 -#endif - #include "mozilla/ipc/Shmem.h" #include "mozilla/ipc/SharedMemory.h" @@ -122,14 +114,6 @@ private: Shmem shmem; long stride = ComputeStride(aSize, aFormat); size_t size = GetAlignedSize(aSize, stride); - - int w = aSize.width; - int h = aSize.height; - if ((aSize.width%MOZ_IMG_MEM_ALIGN) != 0) - w = aSize.width + MOZ_IMG_MEM_ALIGN - (aSize.width%MOZ_IMG_MEM_ALIGN); - stride = ComputeStride(gfxIntSize(w, h), aFormat); - size = GetAlignedSize(aSize, stride); - if (!Unsafe) { if (!aAllocator->AllocShmem(size, aShmType, &shmem)) return nsnull;