OSDN Git Service

Revert "Clip Viewport to DisplayFrame bounds when not using Scalar."
authorKalyan Kondapally <kalyan.kondapally@intel.com>
Sun, 24 Dec 2017 17:08:42 +0000 (09:08 -0800)
committerKalyan Kondapally <kalyan.kondapally@intel.com>
Sun, 24 Dec 2017 17:10:13 +0000 (09:10 -0800)
Fixes bugs related to popups being displayed in wrong position.

This reverts commit 644a9828859793da2b39689caa004985cfc5d47e.

common/compositor/gl/glrenderer.cpp

index 794e87a..377e2f6 100644 (file)
@@ -82,24 +82,10 @@ bool GLRenderer::Init() {
 
 bool GLRenderer::Draw(const std::vector<RenderState> &render_states,
                       NativeSurface *surface) {
-  GLuint frame_width;
-  GLuint frame_height;
-  GLuint left;
-  GLuint top;
-  const OverlayLayer *layer = surface->GetLayer();
-  if (!layer->IsUsingPlaneScalar()) {
-    const HwcRect<int> &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<float> &source_crop = layer->GetSourceCrop();
-    frame_width = layer->GetSourceCropWidth();
-    frame_height = layer->GetSourceCropHeight();
-    left = static_cast<GLuint>(source_crop.left);
-    top = static_cast<GLuint>(source_crop.top);
-  }
+  GLuint frame_width = surface->GetWidth();
+  GLuint frame_height = surface->GetHeight();
+  GLuint left = 0;
+  GLuint top = 0;
 
   if (!surface->MakeCurrent())
     return false;