Bug 1596248 - Don't treat CompositorOGL coordinates differently in offscreen GL contexts. r=jgilbert

This code was trying to not render things upside down when rendering to offscreen contexts.
But this code path was never used and it wasn't fully working.
I would like to make our compositor contexts go through GLContextProviderCGL::CreateHeadless,
which creates an "offscreen" GLContext, so now this broken code is kicking in. Let's remove it.

Differential Revision: https://phabricator.services.mozilla.com/D52917

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Markus Stange 2019-11-19 03:11:58 +00:00
Родитель d71d764018
Коммит ca8c744c5d
1 изменённых файлов: 3 добавлений и 9 удалений

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

@ -589,15 +589,9 @@ void CompositorOGL::PrepareViewport(CompositingRenderTargetOGL* aRenderTarget) {
// Matrix to transform (0, 0, aWidth, aHeight) to viewport space (-1.0, 1.0,
// 2, 2) and flip the contents.
Matrix viewMatrix;
if (mGLContext->IsOffscreen() && !gIsGtest) {
// In case of rendering via GL Offscreen context, disable Y-Flipping
viewMatrix.PreTranslate(-1.0, -1.0);
viewMatrix.PreScale(2.0f / float(size.width), 2.0f / float(size.height));
} else {
viewMatrix.PreTranslate(-1.0, 1.0);
viewMatrix.PreScale(2.0f / float(size.width), 2.0f / float(size.height));
viewMatrix.PreScale(1.0f, -1.0f);
}
MOZ_ASSERT(mCurrentRenderTarget, "No destination");
// If we're drawing directly to the window then we want to offset