Skip to content
Snippets Groups Projects
  1. May 24, 2013
  2. May 23, 2013
    • Pekka Paalanen's avatar
      compositor-x11: fix default output scale · daaddc60
      Pekka Paalanen authored
      
      Default output scale of 256 makes little sense. Actually this is a type
      mismatch between wl_fixed and int, probably a leftover from when the
      scale factor was proposed as a fixed point number.
      
      Scale 256 probably causes the Window creation to fail, but that actually
      leads to a segfault in Mesa libEGL later:
      
      Program received signal SIGSEGV, Segmentation fault.
      0  dri2_create_window_surface (drv=0x645060, disp=0x646610, conf=<optimized out>, window=<optimized out>, attrib_list=<optimized out>)
          at platform_x11.c:291
      
      291	   surf->SwapInterval = 1;
      Here 'surf' is NULL.
      
      1  0x00007ffff76c0709 in eglCreateWindowSurface (dpy=0x646610, config=<optimized out>, window=58720261, attrib_list=0x0) at eglapi.c:534
      2  0x0000000000421549 in gl_renderer_output_create (output=0x673ae0, window=58720261) at gl-renderer.c:1661
      3  0x00007ffff41c456b in x11_compositor_create_output (c=0x6388b0, x=0, y=0, width=1024, height=640, fullscreen=0, no_input=0,
          configured_name=0x0, transform=0, scale=256) at compositor-x11.c:928
      4  0x00007ffff41c5ca0 in x11_compositor_create (display=0x631950, fullscreen=0, no_input=0, use_pixman=0, argc=0x7fffffffda7c,
          argv=0x7fffffffdd18, config_fd=14) at compositor-x11.c:1596
      5  0x00007ffff41c63db in backend_init (display=0x631950, argc=0x7fffffffda7c, argv=0x7fffffffdd18, config_fd=14) at compositor-x11.c:1746
      6  0x000000000040fcb7 in main (argc=1, argv=0x7fffffffdd18) at compositor.c:3293
      
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Cc: Alexander Larsson <alexl@redhat.com>
      daaddc60
    • Kristian Høgsberg's avatar
      785e1f34
    • Hardening's avatar
      rdp: Improve raw surfaces · fe36a13a
      Hardening authored
      This patch does miscellanous improvements with raw surfaces:
      * some frames markers are sent to identify a single frame made of
      multiple surface updates
      * we send the dirty sub-rectangles instead of the full bouncing box
      * the size of the fragmentation buffer is now honored, so that our big
      surface updates don't look like a DoS
      * the subtile and image flipping are done in one step (not requiring a
      temporary tile)
      * we don't care about the size of the dirty region and always use the
      preferred codec for surface update
      fe36a13a
    • Hardening's avatar
      rdp: Don't rely on Synchronize packet for first screen refresh · c39118be
      Hardening authored
      Last FreeRDP don't send Synchronize packets anymore, so send the
      first screen refresh when we're "connected". The client cursor is
      also disabled during this step.
      c39118be
    • Hardening's avatar
      rdp: Fixed codec initialisations · 827358e0
      Hardening authored
      This patch fixes NSC codec initialisation that was not done (an
      erronous copy'n paste).
      The remoteFx context must be resetted when we go through an activation
      sequence
      827358e0
    • Hardening's avatar
      rdp: Drop unneeded main_seat · 7d79dcc5
      Hardening authored
      With recent changes in shell.c the fake seat is not required to
      start a compositor, this patch removes it.
      7d79dcc5
    • Hardening's avatar
      rdp: Fix compilation against FreeRDP and weston · a1ce6cd1
      Hardening authored
      The stream utils of FreeRDP have changed recently, this patch fixes
      the compositor compilation against FreeRdp master.
      The backend_init() prototype has changed too, this fixes it.
      a1ce6cd1
  3. May 22, 2013
    • Pekka Paalanen's avatar
      screenshooter: print info to log · d0cbf18d
      Pekka Paalanen authored
      
      Print the recording info to Weston log, not stderr.
      
      Also fix the frame counter.
      
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      d0cbf18d
    • Louis-Francis Ratté-Boulianne's avatar
      toytoolkit: Make the window resizing optimization optional · 6cd1de33
      Louis-Francis Ratté-Boulianne authored
      Whether or not a shm pool is used for resizing is now configurable at
      build time (--disable-resize-optimization).
      
      [pq: removed an unnecessary hunk from the patch]
      6cd1de33
    • Pekka Paalanen's avatar
      desktop-shell: new wallpaper mode scale-crop · a402b056
      Pekka Paalanen authored
      
      Scale-crop mode scales the wallpaper to tightly fill the whole output,
      but preserving wallpaper aspect ratio. If aspect ratio differs from the
      output's, the wallpaper is centered cutting it from top/bottom or
      left/right.
      
      Add this to the weston.ini man page, and explain all three modes.
      
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      a402b056
    • Pekka Paalanen's avatar
      shell: wait for desktop-shell init before fade in · 79346ab3
      Pekka Paalanen authored
      
      On Raspberry Pi, weston-desktop-shell is so slow to start, that the
      compositor has time to run the fade-in before the wallpaper is up. The
      user launching Weston sees the screen flipping to black, the fbcon
      fading in, and then the desktop popping up.
      
      To fix this, wait for the weston-desktop-shell to draw
      everything before starting the initial fade-in. A new request is
      added to the private desktop-shell protocol to signal it. If a
      desktop-shell client does not support the new request, the fade-in
      happens already at bind time.
      
      If weston-desktop-shell crashes, or does not send the 'desktop_ready'
      request in 15 seconds, the compositor will fade in anyway. This should
      avoid a blocked screen in case weston-desktop-shell malfunction.
      
      shell_fade_startup() does not directly start the fade-in but schedules
      an idle callback, so that the compositor can process all pending events
      before starting the fade clock. Otherwise (on RPi) we risk skipping part
      of the animation. Yes, it is a hack, that should have been done in
      window.c and weston-desktop-shell instead.
      
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      79346ab3
    • Pekka Paalanen's avatar
      rpi: remove weston_plane support · 17bd884b
      Pekka Paalanen authored
      
      There is no need to support weston_plane anymore.
      The max-planes option is removed as unused.
      
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      17bd884b
    • Pekka Paalanen's avatar
      rpi: switch to rpi-renderer · e31e0533
      Pekka Paalanen authored
      
      Replace the GL renderer with the new rpi-renderer on the Raspberry Pi
      backend. This makes Weston on rpi not use EGL or GL anymore, at all.
      
      The weston_plane feature is disabled, since the rpi-renderer does the
      same, but better.
      
      Add a command line option to select the output transform. It is not a
      weston.ini option for now, since the rpi backend does not read the
      configuration file yet. Hopefully that will be done later with some
      shared code.
      
      Add the rpi options to 'weston --help' output.
      
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      e31e0533
    • Pekka Paalanen's avatar
      rpi: add a Dispmanx renderer · d7265bc4
      Pekka Paalanen authored
      
      Dispmanx is the prorietary display API on the Raspberry Pi, which
      provides hardware compositing. Every visible surface is assigned a
      Dispmanx element, and the hardware or firmware will do all compositing
      onto screen. The API supports translation, scaling, flips, discrete
      rotations in 90-degree steps, alpha channel on the surfaces, and
      full-surface alpha on top.
      
      Previously, Dispmanx capabilities were used via the weston_plane
      mechanism, where surfaces were assigned to planes when possible, and
      otherwise transparently falling back to GLESv2 compositing. Because we
      have no way to use the same memory buffer as a GL texture and a Dispmanx
      resource, we had to prepare for both. In the worst case, that means one GL
      texture, and two (double-buffered case) Dispmanx resources, all the size
      of a whole surface, for all surfaces. This was eating memory fast. To
      make things worse (and less slow), the wl_shm buffer was kept around,
      since it was copied to either a texture or a resource as needed. This
      caused all clients to need two buffers. In a Dispmanx-only renderer, we
      can drop the GL texture, and we can release wl_shm buffer immediately
      after the first copy, so clients become effectively single-buffered. So
      from the worst case of 5 buffers per surface, we go down to 3 or just
      2 (single-buffered Dispmanx element, one wl_shm buffer in the client)
      buffers per surface.
      
      As this will replace the GL renderer on rpi, we cannot fall back to the
      GLESv2 compositing anymore. We lose arbitrary surface rotation, but we
      lose also the GL fallback, which caused glitches.
      
      This patch depends on new RaspberryPi firmware. Older firmware may not
      render ARGB surfaces correctly, solid color surfaces maybe cause a
      performance hit, and the output may completely fail in case the firmware
      does not fall back internal off-line compositing properly as needed.
      
      This new rpi-renderer support surface translation and scaling, but not
      rotation or transpose (not even in 90-deg steps). In theory, 90-deg step
      surface rotation is possible to support. Output transformations are
      supported, but flipped variants do not seem to work right.
      
      As a detail, menus and other surfaces that are simply translated with
      respect to another surface caused falling back to the GL renderer. The
      rpi-renderer handles them directly.
      
      This patch only adds the new renderer, but does not hook it up into use.
      
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      d7265bc4
    • Pekka Paalanen's avatar
      compositor: add capability CAPTURE_YFLIP · 4fc5dd00
      Pekka Paalanen authored
      
      Both GL and pixman renderer (pixman probably only because GL did?)
      return the screen capture image as y-flipped, therefore Weston y-flips
      it again. However, the future rpi-renderer can produce only right-way-up
      (non-flipped) screen captures, and does not need an y-flip.
      
      Add a capability flag for y-flip, which the rpi-renderer will not set,
      to get screen captures the right way up.
      
      The wcap recording code needs yet another temporary buffer for the
      non-flipped case, since the WCAP format is flipped, and the code
      normally overwrites the input image as it compresses it. This becomes
      difficult, if the compressor is supposed to flip while processing.
      
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      4fc5dd00
    • Pekka Paalanen's avatar
      compositor: add capability flag for arbitrary surface rotation · 7bb65107
      Pekka Paalanen authored
      
      The upcoming rpi-renderer cannot handle arbitrary rotations. Introduce
      Weston capability bits, and add a bit for arbitrary rotation. GL and
      Pixman renderers support it.
      
      Shell or any other module must not produce surface transformations with
      rotation, if the capability bit is not set. Do not register the surface
      rotation binding in desktop shell, if arbitary rotation is not
      supported.
      
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      7bb65107
    • Ander Conselvan de Oliveira's avatar
      weston-launch: Fix failure to exec weston due to initalized argv values · 9bdfc48f
      Ander Conselvan de Oliveira authored
      The array of arguments supplied to execv must be NULL terminated. If
      unitialized values are used as pointers the exec call may fail with a
      EFAULT error ("Bad address").
      
      https://bugs.freedesktop.org/show_bug.cgi?id=64874
      9bdfc48f
    • Alexander Larsson's avatar
      compositor-drm: Support output scaling · d9a7bb75
      Alexander Larsson authored
      If you specify e.g. scale=2 in an output section in weston.ini
      we scale all modes by that factor.
      
      We also correctly scale cursor positioning, but ATM there is no
      scaling of the cursor sprite itself.
      d9a7bb75
    • Alexander Larsson's avatar
      compositor-x11: Only repaint the damaged region · 80f9163a
      Alexander Larsson authored
      Set a clip on the GC when painting the damaged region so that
      we don't copy the entire shadow buffer each time.
      80f9163a
    • Alexander Larsson's avatar
      compositor: Support output/buffer scaling · 4ea9552d
      Alexander Larsson authored
      If you specify e.g. scale=2 in weston.ini an output section for the
      X11 backend we automatically upscale all normal surfaces by this
      amount. Additionally we respect a buffer_scale set on the buffer to
      mean that the buffer is already in a scaled form.
      
      This works with both the gl and the pixman renderer. The non-X
      backends compile and work, but don't support changing the output
      scale (they do downscale as needed due to buffer_scale though).
      
      This also sends the new "scale" and "done" events on wl_output,
      making clients aware of the scale.
      4ea9552d
    • Alexander Larsson's avatar
      pixman-renderer: Fix up transform handling · 1f206b4c
      Alexander Larsson authored
      Rather than storing the shadow_image in the untransformed space
      and rotating on copy to hw_buffer we store both on the transformed
      space. This means a copy between them is a straight copy, and that
      apps supplying correctly transformed surface buffers need not
      change them.
      
      We also correctly handle all output transform including the previously
      unhandled flipped ones, as well as client supplied buffer_transforms (which
      were previously ignored).
      
      We also simplify the actual rendering by just converting any damage
      region to output coordinates and set it on a clip and composite
      the whole buffer, letting pixman do the rectangle handling. This
      means we always do all the transforms, including the surface positioning
      as a pixman_image transform. This simplifies the code and sets us up
      for handling scaling at a later stage.
      
      The transform looks complicated, but in practice it ends up being
      an integer translation almost always, so it will hit the pixman
      fastpaths.
      1f206b4c
    • Alexander Larsson's avatar
      transformed: Add keyboard shortcuts to change transform · 95289831
      Alexander Larsson authored
      This makes it easy to test buffer_transform and buffer_scale handling.
      left-right: rotate
      space: toggle inverse
      z: toggle scale between 1 and 2
      95289831
    • Alexander Larsson's avatar
      terminal: Handle output transform · de79dd04
      Alexander Larsson authored
      We pick the highest scale of any output the terminal is on, and the
      transform from the last one it entered.
      de79dd04
    • Alexander Larsson's avatar
      window: Add window_get_output_scale() · d68f523f
      Alexander Larsson authored
      This lets you find the maximal scale for all the outputs a window
      is on, which is useful for picking a buffer_scale.
      d68f523f
    • Alexander Larsson's avatar
      desktop-shell: Respect output scale and translate · c584fa60
      Alexander Larsson authored
      We pick the window scale/tranform based on what the output uses, which means
      we can avoid rotations in the compositor, and get sharper rendering
      in scaled outputs.
      c584fa60
    • Alexander Larsson's avatar
      window: Store server_allocation in surface size · 1818e310
      Alexander Larsson authored
      We used to just store the buffer size here which is not right if the
      surface has a buffer_transform or a buffer_scale. To fix this we pass
      the transform and scale into the toysurface prepare and swap calls and
      move both the surface to buffer and the buffer to surface size
      conversion there.
      
      Without this interactive resize on the top or left sides of a transformed
      or scaled surface will not work correctly.
      1818e310
    • Alexander Larsson's avatar
      01441299
    • Alexander Larsson's avatar
    • Alexander Larsson's avatar
      5e9b652a
    • Alexander Larsson's avatar
      window: Track output scales · afd319af
      Alexander Larsson authored
      afd319af
    • Alexander Larsson's avatar
      transformed: Rely on transformation in widget_cairo_create · fd456fb5
      Alexander Larsson authored
      Rather than doing our own transformation handling when drawing we
      just rely on the generic code in widget_cairo_create
      fd456fb5
    • Alexander Larsson's avatar
      window: Support transform in widget_cairo_create() · 15901f03
      Alexander Larsson authored
      If a buffer_transform it specified in the window we automatically
      compensate for it in the cairo_t
      15901f03
    • Pekka Paalanen's avatar
      window: avoid a gcc warning in buffer release handler · 9777744c
      Pekka Paalanen authored
      
      Apparently some compilers complain about set but not used variables
      'available' and 'bufs', but I don't get the warning. Still, separate the
      debugging code from shm_surface_buffer_release(), so that we only
      compute 'bufs' when it is printed. This should fix the warnings.
      
      The debugging code now prints the shm_surface buffer state before and
      after, instead of just after.
      
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      9777744c
    • Kristian Høgsberg's avatar
  4. May 20, 2013
Loading