зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
d71d764018
Коммит
ca8c744c5d
|
@ -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);
|
||||
}
|
||||
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче