1. 26 Apr, 2018 2 commits
  2. 25 Apr, 2018 6 commits
  3. 24 Apr, 2018 32 commits
    • cairocontext: Remove fallback implementations · ae7a6773
      Now that all Cairo contexts are ported to managing cairo surfaces
      themselves, the old fallback code that didi the managing is no longer
      Also clarify the behavior of gdk_cairo_context_cairo_create() wrt the
      vfunc by doing the early exit and the clipping outside of it.
      Benjamin Otte authored
    • GDK W32: Switch to GdkCairoContext · 7002f08c
      * Remove DC refcounting (we trust GDK to always do
        begin_frame/end_frame calls in pairs)
      * Now that there's no GDK-provided double-buffer up the stack,
        double-buffering is implemented here
        (though it's disabled by default - in my tests it didn't provide
         any visual improvements, but did decrease performance).
      * For some reason delaying window resizes until the point where
        we need to blit the double-buffer into the window leads
        to visual glitches, so doulbe-buffered windows are resized
        in begin_frame, same as non-double-buffered ones.
      * New code to clear the paint region, for all drawing modes.
        Hopefully, it isn't duplicated anywhere up the stack.
      * GL has its own context now, so remove any GL-related comments.
      * Layered windows are still used (because cairo actually works
        better with them)
      * A bit more code re-use for layered windows
      * Some functions that were local to gdksurface-win32.c are made
        usable for the whole backend
      * Drag-indicator drawing is temporarily commented out to match
        a similar change in X11 backend
      LRN authored
    • broadway: Handle offset nodes · 8c5d31d1
      Alexander Larsson authored
    • drawcontext: Only pass the region that matters · 83ea0b37
      We used to pass 2 regions to GdkDrawCotnext.end_frame() but code was
      confusing what they meant. So we now don't do that anymore and only pass
      the region that matters: The frame region.
      Benjamin Otte authored
    • drawcontext: Add gdk_draw_context_in_frame() API · fd686afe
      This makes the previous gdk_draw_context_is_drawing() function public
      under a new name.
      I decided against the old name because we use the term "frame" for a
      drawing operation, so I wanted to have this boolean flag reuse the term.
      Benjamin Otte authored
    • drawcontext: Move variable into private struct · 6aa89f21
      ... and get rid of duplicate variable in the process.
      Benjamin Otte authored
    • gdk: Move begin/end_frame() functions · a8656215
      As they require a draw context and the draw context is already bound to
      the surface, it makes much more sense and reduces abiguity by moving
      these APIs to the draw context.
      As a side effect, we simplify GdkSurface APIs to a point where
      GdkSurface now does not concern itself with drawing anymore at all,
      apart from being the object that creates draw contexts.
      Benjamin Otte authored
    • gdk: Get rid of GdkDrawingContext · 48fc18c3
      All information is kept in GdkDrawContext these days, so use that one.
      Benjamin Otte authored
    • gdk: Get rid of gdk_drawing_context_get_clip() · c6ae0ff2
      Use the identical gdk_draw_context_get_frame_region() instead.
      Benjamin Otte authored
    • gdk: Add gdk_draw_context_get_frame_region() · dbe4f1d7
      This does the same as gdk_drawing_context_get_clip().
      Benjamin Otte authored
    • gdk: Remove gdk_gl_context_get_damage() · e7d6648f
      Remove it only form public API, because we still use the vfunc to figure
      out the damage area in begin_frame().
      Benjamin Otte authored
    • gsk: Refactor damage computation for GL renderer · 4d481ecb
      Previously, we got the damage, then computed the changed area, then
      started a frame with that changed area.
      But starting a frame computes the damage for us.
      So now we start a frame, then get the damage area from that, then
      compute the change area.
      Benjamin Otte authored
    • wayland: Rewrite Cairo rendering · 4aac0760
      Also, split it into its own file - which was the original reason for
      looking at this code, the rewrite was an unintentional side effect.
      This changes the context to create surfaces on demand.
      So whenever the compositor holds onto a surface while GDK wants to
      render, it just creates a new surface. If the compositor releases
      surfaces, we will retain one for the next frame to be rendered, but free
      all extra ones.
      This way, we should get to a stage where we have exactly as many
      surfaces as needed and never allocate/free any.
      Benjamin Otte authored
    • x11: Move implementation of Cairo context backends · 03e6cefe
      Also, don't implement SurfaceClass.ref_cairo_surface() anymore. This
      means calls to it will crash now. But as they only happen in the generic
      GdkCairoContext implementation, we shouldn't be affected by that.
      Plus, once all backends have been ported, that call is going away
      Benjamin Otte authored
    • surface: Merge function into only caller · c48d7852
      Benjamin Otte authored
    • gdk: Remove GDK_DEBUG=cairo-image · 899674d4
      This is the default now - at least until cairo rendering gets split
      into backends.
      Benjamin Otte authored
    • surface: Fold function into only user · 54a83d02
      Benjamin Otte authored
    • gdk: Remove unused GL setting · a6553b0e
      Benjamin Otte authored
    • gdk: Add Cairo context implementations for all backends · 813e9c95
      And make the GdkCairoContext as abstract.
      The idea of this and thje following commits is to get rid of all
      Cairo code in gdksurface.c (and $backend/gdksurface-$backend.c)
      by moving that code into the Cairo context files.
      In particular, the GdkSurfaceClass.begin_frame/end_frame()
      functions (which are currently exclusively used by the Cairo code
      should end up being moved to GdkDrawContextClass.begin/end_frame().
      This has multiple benefits:
      1. It unifies code between the different drawing contexts.
         GL lives in GLContext, Vulkan in VulkanContext and Cairo in
         CairoContext. In turn, this makes it way easier to reason about
         what's going on in surface-specific code. Currently pretty much
         all backends do things wrong when they want to sync to drawing
         or to the frame clock.
      2. It makes the API of GdkSurface smaller. No drawing code (apart
         from creating the contexts) needs to remain.
      3. It confines Cairo to the Drawcontext, thereby making it way
         more obvious when backends are still using it in situations
         where it may now conflict with OpenGL (like when doing the dnd
         failed animation or in the APIs that I'm removing in this
      4. We have 2 very different types of Cairo contexts: The X/win32
         model, where we have a natively supported Cairo backend but do
         double buffering ourselves and use similar surfaces and the
         Wayland/Broadway model where we use image surfaces without any
         Cairo backend support and have to submit the buffers manually.
         By not sharing code between those 2 versions, we can make the
         actual code way smaller. We also get around the need to create
         1x1 image surfaces in the Wayland backend where we pretend
         there's a native Cairo surface.
      Benjamin Otte authored
    • cairocontext: Move a function · a83487a0
      A function of GdkDrawingContext is only used when drawing with Cairo, so
      move it to GdkCairoContext.
      Benjamin Otte authored
    • gdk: Move Cairo code from surface to CairoContext · 52de880c
      This just moves code, no actual changes to functionality are happening.
      Benjamin Otte authored
    • gdk: Add GdkCairoContext · f3967860
      This does nothing but disallow passing NULL to gdk_surface_begin_paint()
      and instead require this context.
      The ultimate goal is to split out Cairo drawing into its own source file
      so it doesn't clutter up the generic rendering path.
      Benjamin Otte authored
    • gtk-demo: Merge widgetbowl into fishbowl · 2210b9a3
      Benjamin Otte authored
    • demo: Clean up GtkFishbowl widget · aa2f4152
      1. Remove set_icons property
      2. Make it a GtkWidget subclass
      3. Add gtk_fishbowl_set_creation_func()
      4. Make the widgetbowl use the new benchmarking infrastructure of the
      Benjamin Otte authored
    • Update Esperanto translation · 87567485
      Kristjan Esperanto authored
    • testentrycompletion: Use the model we already got · 1e5c79ed
      cherry-pick of gtk-3-22 commit af350b20
      Daniel Boles authored