Change setScissor() to take in Vulkan coordinate convention.
* Cache dimensions in GLSurface and GLFramebuffer so that we don't have
to query properties through gl.
* Change argument to const Rect&
Bug: 114439058
Change-Id: Ia5ba9405af92819152e26e13508e0b57bc73f233
Test: SurfaceFlinger_Test, go/wm-smoke
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index f17710e..506099f 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2493,8 +2493,8 @@
renderSurface->setCritical(state.type == DisplayDevice::DISPLAY_PRIMARY);
renderSurface->setAsync(state.isVirtual());
renderSurface->setNativeWindow(nativeWindow.get());
- const int displayWidth = renderSurface->queryWidth();
- const int displayHeight = renderSurface->queryHeight();
+ const int displayWidth = renderSurface->getWidth();
+ const int displayHeight = renderSurface->getHeight();
// Make sure that composition can never be stalled by a virtual display
// consumer that isn't processing buffers fast enough. We have to do this
@@ -3205,9 +3205,7 @@
// the GL scissor so we don't draw anything where we shouldn't
// enable scissor for this frame
- const uint32_t height = display->getHeight();
- getBE().mRenderEngine->setScissor(scissor.left, height - scissor.bottom,
- scissor.getWidth(), scissor.getHeight());
+ getBE().mRenderEngine->setScissor(scissor);
}
}