discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=462d79e14787a3365ffbfb50a859fd02d0e733ce

commit 462d79e14787a3365ffbfb50a859fd02d0e733ce
Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Aug 22 09:52:42 2014 -0400

    redo/simplify PRESENT usage in compositor to no longer use PRESENT
    
    keith said no
---
 src/bin/e_comp_x.c | 27 +++------------------------
 src/bin/e_pixmap.c |  5 ++---
 2 files changed, 5 insertions(+), 27 deletions(-)

diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index 0728f2c..3df9d09 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -210,8 +210,6 @@ _e_comp_x_client_new_helper(E_Client *ec)
    e_pixmap_visual_cmap_set(ec->pixmap, 
ec->comp_data->initial_attributes.visual, 
ec->comp_data->initial_attributes.colormap);
    if (ec->override && (!ec->internal))
      ecore_x_window_shape_events_select(win, 1);
-   if (ec->override && (!ec->input_only))
-     ecore_x_present_select_events(win, 
ECORE_X_PRESENT_EVENT_MASK_CONFIGURE_NOTIFY);
    if (ec->override && (!(ec->comp_data->initial_attributes.event_mask.mine & 
ECORE_X_EVENT_MASK_WINDOW_PROPERTY)))
      ecore_x_event_mask_set(win, ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
 
@@ -573,9 +571,11 @@ _e_comp_x_post_client_idler_cb(void *d EINA_UNUSED)
              ecore_x_window_prop_card32_set(e_client_util_win_get(ec), 
ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, &opacity, 1);
              /* flag gets unset in property cb to avoid fetching opacity after 
we just set it */
           }
-        if (ec->post_resize && (!ecore_x_present_exists()))
+        if (ec->post_resize)
           e_pixmap_dirty(ec->pixmap);
         e_comp_object_render_update_del(ec->frame);
+        ec->comp_data->pw = ec->client.w;
+        ec->comp_data->ph = ec->client.h;
         ec->post_move = 0;
         ec->post_resize = 0;
      }
@@ -2557,24 +2557,6 @@ _e_comp_x_grab_replay(void *data EINA_UNUSED, int type, 
void *event)
                                         &ev2, NULL);
 }
 
-static Eina_Bool
-_e_comp_x_present_configure(void *data EINA_UNUSED, int t EINA_UNUSED, 
Ecore_X_Event_Present_Configure *ev)
-{
-   E_Client *ec;
-
-   ec = _e_comp_x_client_find_by_window(ev->win);
-   if (!ec) return ECORE_CALLBACK_RENEW;
-   if (e_pixmap_size_changed(ec->pixmap, ev->pixmap_width, ev->pixmap_height))
-     {
-        //WRN("PRESENT %p: %dx%d", ec, ev->pixmap_width, ev->pixmap_height);
-        e_pixmap_dirty(ec->pixmap);
-        e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
-        ec->comp_data->pw = ev->pixmap_width;
-        ec->comp_data->ph = ev->pixmap_height;
-     }
-   return ECORE_CALLBACK_RENEW;
-}
-
 static void
 _e_comp_x_hook_client_eval_end(void *d EINA_UNUSED, E_Client *ec)
 {
@@ -2710,7 +2692,6 @@ _e_comp_x_hook_client_pre_frame_assign(void *d 
EINA_UNUSED, E_Client *ec)
         pwin = ecore_x_window_override_new(ec->comp->man->root, ec->client.x, 
ec->client.y, w, h);
         ecore_x_window_shape_events_select(pwin, !ec->internal); //let's just 
agree never to do this with our own windows...
      }
-   ecore_x_present_select_events(pwin, 
ECORE_X_PRESENT_EVENT_MASK_CONFIGURE_NOTIFY);
 
    if (ec->client.w && ec->client.h)
      /* force a resize here (no-op most of the time)
@@ -5194,8 +5175,6 @@ e_comp_x_init(void)
    E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_SYNC_ALARM,
                          _e_comp_x_sync_alarm, NULL);
 
-   E_LIST_HANDLER_APPEND(handlers, ECORE_X_EVENT_PRESENT_CONFIGURE, 
_e_comp_x_present_configure, NULL);
-
    E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_BUTTON_DOWN,
                          _e_comp_x_mouse_down, NULL);
    E_LIST_HANDLER_APPEND(handlers, ECORE_EVENT_MOUSE_BUTTON_UP,
diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c
index be8c296..60ecd7d 100644
--- a/src/bin/e_pixmap.c
+++ b/src/bin/e_pixmap.c
@@ -332,9 +332,8 @@ e_pixmap_refresh(E_Pixmap *cp)
              e_comp_object_native_surface_set(cp->client->frame, 0);
            success = !!pixmap;
            if (!success) break;
-           if (ecore_x_present_exists() && cp->client->comp_data &&
-               cp->client->comp_data->pw && cp->client->comp_data->ph &&
-               (!e_client_util_resizing_get(cp->client))) //PRESENT is 
unreliable during resizes
+           if (cp->client->comp_data &&
+               cp->client->comp_data->pw && cp->client->comp_data->ph)
              {
                 pw = cp->client->comp_data->pw;
                 ph = cp->client->comp_data->ph;

-- 


Reply via email to