Bug 1215089 - P11. Correctly use stride parameter in place of width with webrender. r=mattwoodrow

MozReview-Commit-ID: KcI6fcOgSkX

--HG--
extra : rebase_source : 2293c2be075f7a24472a8d58752982b153c5d6f5
This commit is contained in:
Jean-Yves Avenard 2017-10-05 01:42:28 +02:00
Родитель d28995afd5
Коммит 7c9ee7c537
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -597,8 +597,8 @@ BufferTextureHost::PushResourceUpdates(wr::ResourceUpdateQueue& aResources,
MOZ_ASSERT(aImageKeys.length() == 3);
const layers::YCbCrDescriptor& desc = mDescriptor.get_YCbCrDescriptor();
wr::ImageDescriptor yDescriptor(desc.ySize(), desc.ySize().width, gfx::SurfaceFormat::A8);
wr::ImageDescriptor cbcrDescriptor(desc.cbCrSize(), desc.cbCrSize().width, gfx::SurfaceFormat::A8);
wr::ImageDescriptor yDescriptor(desc.ySize(), desc.yStride(), gfx::SurfaceFormat::A8);
wr::ImageDescriptor cbcrDescriptor(desc.cbCrSize(), desc.cbCrStride(), gfx::SurfaceFormat::A8);
(aResources.*method)(aImageKeys[0], yDescriptor, aExtID, bufferType, 0);
(aResources.*method)(aImageKeys[1], cbcrDescriptor, aExtID, bufferType, 1);
(aResources.*method)(aImageKeys[2], cbcrDescriptor, aExtID, bufferType, 2);

Просмотреть файл

@ -67,15 +67,15 @@ RenderBufferTextureHost::Lock()
const layers::YCbCrDescriptor& desc = mDescriptor.get_YCbCrDescriptor();
mYSurface = gfx::Factory::CreateWrappingDataSourceSurface(layers::ImageDataSerializer::GetYChannel(GetBuffer(), desc),
desc.ySize().width,
desc.yStride(),
desc.ySize(),
gfx::SurfaceFormat::A8);
mCbSurface = gfx::Factory::CreateWrappingDataSourceSurface(layers::ImageDataSerializer::GetCbChannel(GetBuffer(), desc),
desc.cbCrSize().width,
desc.cbCrStride(),
desc.cbCrSize(),
gfx::SurfaceFormat::A8);
mCrSurface = gfx::Factory::CreateWrappingDataSourceSurface(layers::ImageDataSerializer::GetCrChannel(GetBuffer(), desc),
desc.cbCrSize().width,
desc.cbCrStride(),
desc.cbCrSize(),
gfx::SurfaceFormat::A8);
if (NS_WARN_IF(!mYSurface || !mCbSurface || !mCrSurface)) {