1. 03 Aug, 2022 1 commit
  2. 02 Aug, 2022 13 commits
    • Florian Müllner's avatar
      ci: Include gcr4 in image · d3a7e9a7
      Florian Müllner authored
      Needed in order to port gnome-shell to the new major version
      (gnome-shell!2386)
      
      Part-of: <!2547>
      d3a7e9a7
    • Robert Mader's avatar
      tests/wayland: Add test for single pixel buffer protocol · 5b868a2b
      Robert Mader authored and Marge Bot's avatar Marge Bot committed
      The protocol is supposed to be used together with `wp_viewporter`
      thus add both protocols to client-utils.
      
      Part-of: <!2246>
      5b868a2b
    • Robert Mader's avatar
      tests/wayland: Print error messages for wl_display_dispatch() · 45ccf10e
      Robert Mader authored and Marge Bot's avatar Marge Bot committed
      Failing in `wait_for_effects_completed()` or `wait_for_view_verified()
      indicates client- or compositor-bugs. As hitting those is quite likely
      during test development, print error messages to simplify debugging.
      
      Part-of: <!2246>
      45ccf10e
    • Jonas Ådahl's avatar
      wayland: Add single pixel buffer support · 2cb74997
      Jonas Ådahl authored and Marge Bot's avatar Marge Bot committed
      The "single pixel buffer" Wayland protocol extension provides a way for
      clients to create 1x1 buffers with a single color, specified by
      providing the color channels (red, green and blue) as well as the
      alpha channel as a 32 bit unsigned integer.
      
      For now, this is turned into a 1x1 texture. Future potential
      improvements is to hook things up to the scanout candidate logic and
      turn it into a scanout capable DMA buffer.
      
      Part-of: <!2246>
      2cb74997
    • Robert Mader's avatar
      Bump required wayland-protocols version · 823e3a5c
      Robert Mader authored and Marge Bot's avatar Marge Bot committed
      For `wp_single_pixel_buffer_v1`
      
      Part-of: <!2246>
      823e3a5c
    • Robert Mader's avatar
      clutter/stage-view: Defer and accumulate redraw-clip on scanout · 550f09a5
      Robert Mader authored and Robert Mader's avatar Robert Mader committed
      When taking the scanout path we still want to clear the
      redraw-clip from the stage-view in order to ensure we skip
      frames in `handle_frame_clock_frame()` if no new redraw-clip
      was recorded.
      This was not done previously as the accumulated redraw-clip was
      needed for the next repaint, likely under the assumption that
      scheduling a scanout repeatedly would be computationally cost-free.
      This assumption does not hold in a VRR world.
      
      In order to archive both, an accumulated redraw-clip for the next
      paint and frame-skipping during scanout, introduce new API to defer
      and accumulate redraw-clips until the next repaint.
      
      Part-of: <!2480>
      550f09a5
    • Jonas Ådahl's avatar
      wayland/dma-buf: Always send modifiers if AddFB2() is supported · 34475e7e
      Jonas Ådahl authored and Marge Bot's avatar Marge Bot committed
      To Wayland clients, it doesn't matter how we configure our onscreen
      buffers, since they don't necessarily have the same bandwidth issues
      related to mode setting, whichis the primary reason why we disable
      modifiers using the udev rule, so simply check whether importing with
      modifiers will work at all and advertise modifiers if so is the case.
      
      This might help avoid issues using legacy non-modifiers path in drivers.
      
      Part-of: <!2546>
      34475e7e
    • Jonas Ådahl's avatar
      kms/device: Differentiate between lack of AddFb2() and udev rule · 50396fc0
      Jonas Ådahl authored and Marge Bot's avatar Marge Bot committed
      We disable modifiers for two reasons: an udev rule saying so, or the
      lack of a working drmModeAddFB2(). However, to the users, this is not
      granular enough. While the current user, whether to enable modifiers in
      MetaRendererNative, doesn't need more granularity, we want to send
      modifiers to Wayland clients even if the onscreen framebuffers should
      still be allocated without modifiers.
      
      Prepare for differentiating between how Wayland DMA buffers work and how
      onscreen buffer allocation work by separating the relevant device flags.
      
      Part-of: <!2546>
      50396fc0
    • Jonas Ådahl's avatar
      wayland/dma-buf: Get backend via MetaContext · 1844dcc0
      Jonas Ådahl authored and Marge Bot's avatar Marge Bot committed
      Part-of: <!2546>
      1844dcc0
    • Jonas Ådahl's avatar
      wayland/compositor: Add MetaContext getter · bd4dd6b1
      Jonas Ådahl authored and Marge Bot's avatar Marge Bot committed
      Part-of: <!2546>
      bd4dd6b1
    • Bilal Elmoussaoui's avatar
      clutter: Remove all the since annotations · a73ae93d
      Bilal Elmoussaoui authored
      Since they are all refer to the days clutter used to be a separate
      library
      
      Part-of: <!2441>
      a73ae93d
    • Bilal Elmoussaoui's avatar
      cally: Migrate to gi-docgen · 7b7e1c6f
      Bilal Elmoussaoui authored
      Similar to the clutter commits
      - Drop all the private structs documentations
      - Make use of gi-docgen items linking as much as possible
      - Use markdown formatting for code snippets
      
      Part-of: <!2441>
      7b7e1c6f
    • Bilal Elmoussaoui's avatar
      clutter: Migrate to gi-docgen · c8e63866
      Bilal Elmoussaoui authored
      - Drop all the private structs documentations
      - Make use of gi-docgen items linking as much as possible
      - Use markdown formatting for code snippets
      
      Part-of: <!2441>
      c8e63866
  3. 01 Aug, 2022 7 commits
    • Dor Askayo's avatar
      compositor/native: Add support for direct scanout per view · 4736f873
      Dor Askayo authored and Marge Bot's avatar Marge Bot committed
      This uses MetaCompositorViewNative to find a candidate surface for
      scanout and to keep track of it separately for each view, effectively
      allowing each CRTC to use a different buffer for direct scanout.
      
      There are three parts for potentially assigning a buffer for direct
      scanout at the compositor level:
        1. Finding a candidate surface actor on the view (if any)
        2. Attempting to assign the candidate's buffer for direct scanout
        3. Updating references relating to the scanout candidate as needed
      
      The three parts were moved in their entirety from being handled by the
      MetaCompositorNative to being handled by the MetaCompositorViewNative.
      As part of this transition, the logic was also slightly refactored so
      that each of the three parts is handled by its own helper function.
      This allowed to avoid the use of "goto" statements and hopefully make
      the logic easier to read and follow.
      
      The first part mentioned above was changed in this commit to make use
      o...
      4736f873
    • Dor Askayo's avatar
      compositor/native: Remove redundant function · ad0e19a0
      Dor Askayo authored and Marge Bot's avatar Marge Bot committed
      All of the checks this function performed internally were already
      done before calling it, making it a simple wrapper function without a
      meaningful purpose.
      
      Removing this function also reduces the chance of additional checks
      being added to the MetaSurfaceActor after it is already chosen as a
      scanout candidate.
      
      Part-of: <!2526>
      ad0e19a0
    • Dor Askayo's avatar
      compositor/native: Don't allow obscured surface actors as scanout candidates · 66e938bc
      Dor Askayo authored and Marge Bot's avatar Marge Bot committed
      This check was previously done after it was already determined that
      a surface actor is suitable for scanout.
      
      Part-of: <!2526>
      66e938bc
    • Dor Askayo's avatar
      compositor: Introduce MetaCompositorViewNative · 259a9998
      Dor Askayo authored and Marge Bot's avatar Marge Bot committed
      This class is meant to hold logic specific to the native backend
      in the context of a MetaCompositorView.
      
      Its addition requires making MetaCompositorView inheritable, and an
      addition of a virtual function which allows each compositor to create
      its own MetaCompositorView instance.
      
      In the case of the MetaCompositorNative, a MetaCompositorViewNative
      is created. In all other cases, a MetaCompositorView is created.
      
      Part-of: <!2526>
      259a9998
    • Dor Askayo's avatar
      compositor: Keep track of the top window actor on each view · 85b8632c
      Dor Askayo authored and Marge Bot's avatar Marge Bot committed
      First, add logic in MetaCompositorView to find topmost visible
      MetaWindowActor on its view, and expose it through a new API.
      
      Then, queue an update to find the top MetaWindowActor of each
      MetaCompositorView in the following cases:
        1. The MetaCompositor is in its initial state.
        2. The window stack order has changed.
        3. A window has changed its visibility.
        4. A "stage-views-changed" signal was emitted for a MetaWindowActor.
      
      Finally, perform the queued update in meta_compositor_before_paint (),
      and assert that an update isn't queued during painting. This ensures
      that the top window actor in the MetaCompositorView remains up-to-date
      and available to child classes of MetaCompositor throughout the entire
      paint stage.
      
      Part-of: <!2526>
      85b8632c
    • Dor Askayo's avatar
      compositor: Expose the MetaCompositorView in before_paint () vfunc · 2ead3874
      Dor Askayo authored and Marge Bot's avatar Marge Bot committed
      The idea is that the state of the MetaCompositorView shall be
      up-to-date only in specific scenarios, thus allowing operations
      performed on it to be queued and aggregated to be handled in the
      right time, and only if they are still necessary.
      
      For example, in a following commit, the top window actor in each
      view will be planned (if needed) only once before painting a frame,
      rendering the top window actor in the MetaCompositorView potentially
      stale in all other times.
      
      Similarly, if a MetaCompositorView is destroyed before the beginning
      of the frame, a queued operation to update its top window actor can be
      discarded.
      
      As an interface segragation measure, and as part of an attempt to
      avoid the use of g_return_if_fail () to check the validity of the
      MetaCompositorView's state in multiple places (which is still prone to
      human error), the interfaces through which a MetaCompositorView is
      made available would only ones where it's state is gurenteed to be
      up-to-date.
      
      Specifically, this commit gurentees that the state of the
      MetaCompositorView would be up-to-date during the before_paint () and
      after_paint () vfuncs exposed to child classes of the MetaCompositor.
      
      The frame_in_progress variable will be used in a following commit to
      guarantee that the MetaCompositorView's state is not invalidated during
      this time.
      
      Part-of: <!2526>
      2ead3874
    • Dor Askayo's avatar
      compositor: Introduce MetaCompositorView · 049db7c7
      Dor Askayo authored and Marge Bot's avatar Marge Bot committed
      MetaCompositorView is a class which contains compositor logic
      specific to ClutterStageViews.
      
      Each MetaCompositorView is "attached" to a ClutterStageView as an
      opaque pointer using g_object_set_qdata_full (), and is freed when
      the ClutterStageView is destroyed. This ensures that the lifetime of
      the MetaCompositorView can't extend beyond the lifetime of its
      ClutterStageView.
      
      In a following commit, MetaCompositorView will be expanded to allow
      keeping track of the top MetaWindowActor located on each
      ClutterStageView.
      
      Part-of: <!2526>
      049db7c7
  4. 31 Jul, 2022 1 commit
    • Michel Dänzer's avatar
      clutter/frame-clock: Fix handling of equal next_presentation_time_us · 1f7527bb
      Michel Dänzer authored and Marge Bot's avatar Marge Bot committed
      This can happen with the native backend if the previous frame clock
      dispatch didn't result in any KMS update, e.g. because it was triggered
      by an input event, but the HW cursor didn't need updating on the stage
      view. (This is likely to happen on some out of multiple stage views,
      but might be possible even with a single stage view if the cursor isn't
      visible)
      
      We would previously delay next_presentation_time_us by one refresh
      interval in this case, which could result in spuriously leaving one
      refresh cycle unused.
      
      Part-of: <!2498>
      1f7527bb
  5. 29 Jul, 2022 4 commits
  6. 28 Jul, 2022 14 commits