Skip to content

Commit

Permalink
Bug 1215089 - P11. Correctly use stride parameter in place of width w…
Browse files Browse the repository at this point in the history
…ith webrender. r=mattwoodrow
  • Loading branch information
hawkeye116477 committed Oct 3, 2019
1 parent 3e1017a commit 4e300fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions gfx/layers/composite/TextureHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ BufferTextureHost::AddWRImage(wr::WebRenderAPI* aAPI,
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);;
aAPI->AddExternalImage(aImageKeys[0],
yDescriptor,
aExtID,
Expand Down
6 changes: 3 additions & 3 deletions gfx/webrender_bindings/RenderBufferTextureHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,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)) {
Expand Down

0 comments on commit 4e300fc

Please sign in to comment.