mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1717572 - Remove gfxUtils::ConvertBGRAtoRGBA() call in AndroidCompositorWidget::EndRemoteDrawingInRegion() r=lsalzman,gfx-reviewers
gfxUtils::ConvertBGRAtoRGBA() could be removed. BGRA->RBGA conversion could be done by DrawTargetSkia::CopySurface() in RenderCompositorSWGL::CommitMappedBuffer(). Though DrawTargetCairo::CopySurface() does not do the conversion. On Android, RenderCompositorSWGL is not expected to be used on release. It is only for testing for now. Differential Revision: https://phabricator.services.mozilla.com/D118449
This commit is contained in:
parent
165b6e2e26
commit
c9240ccd99
@ -51,9 +51,9 @@ AndroidCompositorWidget::StartRemoteDrawingInRegion(
|
||||
}
|
||||
|
||||
const int bpp = 4;
|
||||
gfx::SurfaceFormat format = gfx::SurfaceFormat::B8G8R8A8;
|
||||
gfx::SurfaceFormat format = gfx::SurfaceFormat::R8G8B8A8;
|
||||
if (mFormat == WINDOW_FORMAT_RGBX_8888) {
|
||||
format = gfx::SurfaceFormat::B8G8R8X8;
|
||||
format = gfx::SurfaceFormat::R8G8B8X8;
|
||||
}
|
||||
|
||||
RefPtr<gfx::DrawTarget> dt = gfx::Factory::CreateDrawTargetForData(
|
||||
@ -66,10 +66,6 @@ AndroidCompositorWidget::StartRemoteDrawingInRegion(
|
||||
|
||||
void AndroidCompositorWidget::EndRemoteDrawingInRegion(
|
||||
gfx::DrawTarget* aDrawTarget, const LayoutDeviceIntRegion& aInvalidRegion) {
|
||||
// XXX Needs convert BGRA to RGBA. RGBA is not supported by sw-wr
|
||||
const int bpp = 4;
|
||||
gfxUtils::ConvertBGRAtoRGBA((uint8_t*)mBuffer.bits,
|
||||
mBuffer.stride * mBuffer.height * bpp);
|
||||
ANativeWindow_unlockAndPost(mNativeWindow);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user