mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1006198 - Use 8byte aligned surface for CopyableCanvasLayer since that's the max WebGL supports for readback. r=nical
This commit is contained in:
parent
7c51423e57
commit
e20fd7254c
@ -17,6 +17,7 @@
|
||||
#include "gfxUtils.h" // for gfxUtils
|
||||
#include "gfx2DGlue.h" // for thebes --> moz2d transition
|
||||
#include "mozilla/gfx/BaseSize.h" // for BaseSize
|
||||
#include "mozilla/gfx/Tools.h"
|
||||
#include "nsDebug.h" // for NS_ASSERTION, NS_WARNING, etc
|
||||
#include "nsISupportsImpl.h" // for gfxContext::AddRef, etc
|
||||
#include "nsRect.h" // for nsIntRect
|
||||
@ -170,7 +171,9 @@ CopyableCanvasLayer::GetTempSurface(const IntSize& aSize,
|
||||
aSize != mCachedTempSurface->GetSize() ||
|
||||
aFormat != mCachedTempSurface->GetFormat())
|
||||
{
|
||||
mCachedTempSurface = Factory::CreateDataSourceSurface(aSize, aFormat);
|
||||
// Create a surface aligned to 8 bytes since that's the highest alignment WebGL can handle.
|
||||
uint32_t stride = GetAlignedStride<8>(aSize.width * BytesPerPixel(aFormat));
|
||||
mCachedTempSurface = Factory::CreateDataSourceSurfaceWithStride(aSize, aFormat, stride);
|
||||
}
|
||||
|
||||
return mCachedTempSurface;
|
||||
|
Loading…
Reference in New Issue
Block a user