ecore_wl2: Disable horizontal resize optimization
authorDerek Foreman <derekf@osg.samsung.com>
Tue, 27 Feb 2018 22:24:25 +0000 (16:24 -0600)
committerWonki Kim <wonki_.kim@samsung.com>
Tue, 10 Apr 2018 11:10:42 +0000 (20:10 +0900)
We had a "clever" optimization that would keep a buffer on resize
if it was resizing up horizontal and fit within the previously
allocated stride.

Unfortunately, there still needs to be a buffer reconfigure between
client and compositor that wasn't taking place.  Remove this for now.

src/lib/ecore_wl2/ecore_wl2_buffer.c
src/lib/ecore_wl2/ecore_wl2_surface_module_dmabuf.c

index a7cb174..19f8bb5 100644 (file)
@@ -729,6 +729,17 @@ ecore_wl2_buffer_age_inc(Ecore_Wl2_Buffer *buffer)
    buffer->age++;
 }
 
+/* The only user of this function has been removed, but it
+ * will likely come back later.  The problem is that
+ * a dmabuf buffer needs to be resized on the compositor
+ * even if the allocation still fits.  Doing the resize
+ * properly isn't something that will be fixed in the 1.21
+ * timeframe, so the optimization has been (temporarily)
+ * removed.
+ *
+ * This is currently beta api - don't move it out of beta
+ * with no users...
+ */
 EAPI Eina_Bool
 ecore_wl2_buffer_fit(Ecore_Wl2_Buffer *b, int w, int h)
 {
index 7cb7911..d9baeff 100644 (file)
@@ -58,9 +58,12 @@ _evas_dmabuf_surface_reconfigure(Ecore_Wl2_Surface *s EINA_UNUSED, void *priv_da
    if ((!w) || (!h)) return;
    EINA_LIST_FOREACH_SAFE(p->buffers, l, tmp, b)
      {
+/*      This would be nice, but requires a partial create to follow,
+        and that partial create is buffer type specific.
+
         if (ecore_wl2_buffer_fit(b, w, h))
           continue;
-
+*/
         ecore_wl2_buffer_destroy(b);
         p->buffers = eina_list_remove_list(p->buffers, l);
      }