Fix OpenGL texture coordinate flipping in Advanced Layers. (bug 1377303, r=mattwoodrow)
authorDavid Anderson <danderson@mozilla.com>
Fri, 30 Jun 2017 11:45:02 -0700
changeset 367076 d4146ec1d551161062a97acc26fae6f4b66a7dca
parent 367075 5e37016d4dbe31df639ae3f8d4b2d70ca299dc8a
child 367077 72aa740f3363f8142d78dbb5d3b5c6214530da55
push id32117
push userphilringnalda@gmail.com
push dateSun, 02 Jul 2017 00:39:30 +0000
treeherdermozilla-central@4d3de12dcdc5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1377303
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Fix OpenGL texture coordinate flipping in Advanced Layers. (bug 1377303, r=mattwoodrow)
gfx/layers/mlgpu/RenderPassMLGPU.cpp
--- a/gfx/layers/mlgpu/RenderPassMLGPU.cpp
+++ b/gfx/layers/mlgpu/RenderPassMLGPU.cpp
@@ -547,17 +547,17 @@ TexturedRenderPass::AddClippedItem(Txn& 
   Rect textureRect(
     offset.x * xScale,
     offset.y * yScale,
     aDrawRect.width * xScale,
     aDrawRect.height * yScale);
 
   Rect textureCoords = TextureRectToCoords(textureRect, aTextureSize);
   if (mTextureFlags & TextureFlags::ORIGIN_BOTTOM_LEFT) {
-    textureCoords.y = textureCoords.YMost();
+    textureCoords.y = 1.0 - textureCoords.y;
     textureCoords.height = -textureCoords.height;
   }
 
   Rect layerRects[4];
   Rect textureRects[4];
   size_t numRects =
     DecomposeIntoNoRepeatRects(aDrawRect, textureCoords, &layerRects, &textureRects);