mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 824642 - PlanarYCbCrImage::GetAsSurface does not create surface optimized for platform. r=joe, r=nsilva
This commit is contained in:
parent
18cbda81f3
commit
d496a1e052
@ -17,6 +17,7 @@
|
||||
#include "gfxSharedImageSurface.h"
|
||||
#include "yuv_convert.h"
|
||||
#include "gfxUtils.h"
|
||||
#include "gfxPlatform.h"
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include "mozilla/gfx/QuartzSupport.h"
|
||||
@ -477,6 +478,14 @@ PlanarYCbCrImage::SetData(const Data &aData)
|
||||
CopyData(aData);
|
||||
}
|
||||
|
||||
gfxASurface::gfxImageFormat
|
||||
PlanarYCbCrImage::GetOffscreenFormat()
|
||||
{
|
||||
return mOffscreenFormat != gfxASurface::ImageFormatUnknown ?
|
||||
gfxPlatform::GetPlatform()->GetOffscreenFormat() :
|
||||
mOffscreenFormat;
|
||||
}
|
||||
|
||||
already_AddRefed<gfxASurface>
|
||||
PlanarYCbCrImage::GetAsSurface()
|
||||
{
|
||||
@ -486,7 +495,6 @@ PlanarYCbCrImage::GetAsSurface()
|
||||
}
|
||||
|
||||
gfxASurface::gfxImageFormat format = GetOffscreenFormat();
|
||||
|
||||
gfxIntSize size(mSize);
|
||||
gfxUtils::GetYCbCrToRGBDestFormatAndSize(mData, format, size);
|
||||
if (size.width > PlanarYCbCrImage::MAX_DIMENSION ||
|
||||
|
@ -722,7 +722,7 @@ protected:
|
||||
already_AddRefed<gfxASurface> GetAsSurface();
|
||||
|
||||
void SetOffscreenFormat(gfxASurface::gfxImageFormat aFormat) { mOffscreenFormat = aFormat; }
|
||||
gfxASurface::gfxImageFormat GetOffscreenFormat() { return mOffscreenFormat; }
|
||||
gfxASurface::gfxImageFormat GetOffscreenFormat();
|
||||
|
||||
nsAutoArrayPtr<uint8_t> mBuffer;
|
||||
uint32_t mBufferSize;
|
||||
|
Loading…
Reference in New Issue
Block a user