1. 24 Apr, 2013 2 commits
    • Alexander Larsson's avatar
      gdkframeclock: Loop the layout phase if needed · 0d9b189a
      Alexander Larsson authored
      In the case where the layout phase queued a layout we don't
      want to progress to the paint phase with invalid allocations, so
      we loop the layout. This shouldn't normally happen, but it may
      happen in some edge cases like if user/wm resizes clash with
      natural window size changes from a gtk widget. This should not
      generally loop though, so we detect this after 4 cycles and
      print a warning.
      
      This was detected because of an issue in GtkWindow where it
      seems to incorrectly handle the case of a user interactive resize.
      It seems gtk_window_move_resize() believes that configure_request_size_changed
      changed due to hitting some corner case so it calls
      gtk_widget_queue_resize_no_redraw(), marking the window as need_alloc
      after the layout phase. This commit fixes the issue, but we should
      also look into if we can fix that.
      0d9b189a
    • Alexander Larsson's avatar
      Change the way we draw (again) · fe70c2db
      Alexander Larsson authored
      We can't really just draw by walking down the widget hierarchy, as
      this doesn't get the right clipping (so e.g. widgets doing cairo_paint
      may draw outside the expected gdkwindow subarea) nor does it let
      us paint window backgrounds.
      
      So, we now do multiple draws for each widget, once for each expose event
      although we still do it at the same base cairo_t that we get for the
      toplevel native window.
      
      We also collect all the windows of a widget so we can expose them inside
      the same opacity group if needed.
      fe70c2db
  2. 23 Apr, 2013 1 commit
  3. 20 Apr, 2013 3 commits
  4. 19 Apr, 2013 1 commit
    • Alexander Larsson's avatar
      gdkwindow: Simplify invalidation · 472081c0
      Alexander Larsson authored
      Now that all windows are non-opaque we can simplify the invalidation
      a lot. There is no need to clip the invalidate area to child regions,
      because we will always redraw everything under all the children.
      We only have to handle native childen specially.
      472081c0
  5. 17 Apr, 2013 8 commits
    • Alexander Larsson's avatar
      gdkwindow: Remove implicit paints · 08159b89
      Alexander Larsson authored
      We now only do one expose event per native window, so there will
      only be one begin/end_paint() call. This means all the work with
      implicit paints to combine the paints on a single double buffer
      surface is unnecessary, so we can just delete it.
      08159b89
    • Alexander Larsson's avatar
      Only handle exposes on native window, propagate to children via draw() · fc88ce08
      Alexander Larsson authored
      We now consider non-native windows non-opaque, which means any invalid
      area in a subwindow will also be invalid all the way up to the nearest
      native windows. We take advantage of this by ignoring all expose events
      on non-native windows (which typically means just the toplevel) and instead
      propagating down the draw() calls to children directly via
      gtk_container_propagate_draw.
      
      This is nice as it means we always draw widgets the same way, and it
      will let us do some interesting ways in the future.
      
      We also clean up the GtkWidget opacity handling as we can now always
      rely on the draing happening via cairo.
      
      NOTE: This change neuters gtk_widget_set_double_buffered for
      widgets without native windows
      fc88ce08
    • Alexander Larsson's avatar
      gdkwindow: Remove ancient USE_BACKING_STORE define · d0a10c84
      Alexander Larsson authored
      This is always set anyway.
      d0a10c84
    • Alexander Larsson's avatar
      gdkwindow: Simplify clip region calculations · 20ed384e
      Alexander Larsson authored
      Since we no longer make overlapping siblings affect clip_region we
      can further simplify the clip region calculation and updating.
      20ed384e
    • Alexander Larsson's avatar
      gdkwindow: Simplify clip region handling · 73107e0a
      Alexander Larsson authored
      Since we dropped the move region optimization there is really no need
      to try carefully keep track of opaque non-overlapped regions, as we
      don't use this information to trigger the optimization anymore.
      
      So, by assuming that all windows are non-opaque we can vastly simplify
      the clip region stuff. First of all, we don't need clip_region_with_children,
      as each window will need to draw under all children anyway. Secondly, we
      don't remove overlapping sibling areas from clip_region, as these are
      all non-opaque anyway and we need to draw under them
      
      Finally, we don't need to track the layered region anymore as its
      essentially unused. The few times something like it is needed we can
      compute it explicitly.
      
      For the case of native children of widgets we may cause a repaint
      under native windows that are guaranteed to be opaque, but these
      will be clipped by the native child anyway.
      73107e0a
    • Alexander Larsson's avatar
      gdkwindow: Remove translate vfunc · c95bcc2a
      Alexander Larsson authored
      This is not used anymore
      c95bcc2a
    • Alexander Larsson's avatar
      gdkwindow: Remove outstanding_moves stuff · 36e71d80
      Alexander Larsson authored
      Since we now never move regions directly on the window we can
      remove all the stuff that track outstanding moves and flushes then.
      36e71d80
    • Alexander Larsson's avatar
      gdk: Don't ever do copies from the window · dacd8209
      Alexander Larsson authored
      This basically neuters gdk_window_move_region, gdk_window_scroll
      and gdk_window_move_resize, in that they now never copy any bits but
      just invalidate the source and destination regions. This is a performance
      loss, but the hope is that the simplifications it later allows will let
      us recover this performance loss (which mainly affects scrolling).
      dacd8209
  6. 16 Apr, 2013 10 commits
  7. 15 Apr, 2013 8 commits
  8. 14 Apr, 2013 4 commits
  9. 13 Apr, 2013 3 commits