From c8a2e81c63692f1a7b933b0c7164852ef80a49bd Mon Sep 17 00:00:00 2001 From: Kalyan Kondapally Date: Sun, 24 Dec 2017 09:08:42 -0800 Subject: [PATCH] Revert "Clip Viewport to DisplayFrame bounds when not using Scalar." Fixes bugs related to popups being displayed in wrong position. This reverts commit 644a9828859793da2b39689caa004985cfc5d47e. --- common/compositor/gl/glrenderer.cpp | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/common/compositor/gl/glrenderer.cpp b/common/compositor/gl/glrenderer.cpp index 794e87a..377e2f6 100644 --- a/common/compositor/gl/glrenderer.cpp +++ b/common/compositor/gl/glrenderer.cpp @@ -82,24 +82,10 @@ bool GLRenderer::Init() { bool GLRenderer::Draw(const std::vector &render_states, NativeSurface *surface) { - GLuint frame_width; - GLuint frame_height; - GLuint left; - GLuint top; - const OverlayLayer *layer = surface->GetLayer(); - if (!layer->IsUsingPlaneScalar()) { - const HwcRect &display_rect = layer->GetDisplayFrame(); - frame_width = (layer->GetDisplayFrameWidth() + display_rect.left); - frame_height = (layer->GetDisplayFrameHeight() + display_rect.top); - left = 0; - top = 0; - } else { - const HwcRect &source_crop = layer->GetSourceCrop(); - frame_width = layer->GetSourceCropWidth(); - frame_height = layer->GetSourceCropHeight(); - left = static_cast(source_crop.left); - top = static_cast(source_crop.top); - } + GLuint frame_width = surface->GetWidth(); + GLuint frame_height = surface->GetHeight(); + GLuint left = 0; + GLuint top = 0; if (!surface->MakeCurrent()) return false; -- 2.11.0