Syncing task from Mir.

** Changed in: mir (Ubuntu)
   Importance: Undecided => Medium

** Changed in: mir (Ubuntu)
       Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mir in Ubuntu.
https://bugs.launchpad.net/bugs/1288021

Title:
  MirResizeEvent's width/height fields are not in sync with the next
  buffer the client receives

Status in Mir:
  Triaged
Status in mir package in Ubuntu:
  Triaged

Bug description:
  MirResizeEvent's width/height fields are not in sync with the next
  buffer the client receives.

  This is because they represent the latest dimensions of a surface.
  However, due to compositing and frame scheduling, MirResizeEvent
  arrives a significant time before the client gets any buffers with the
  new dimensions. So if the client actually tries to use the
  width/height provided in MirResizeEvent, it will render incorrectly
  with ugly artefacts.

  Clients should always be using the latest _buffer_ dimensions, and not
  the latest surface dimensions. As demonstrated in examples/* the
  latest buffer dimensions are available via:

  mir_buffer_usage_software: Use the width/height returned by
  mir_surface_get_graphics_region().

  mir_buffer_usage_hardware: Use the actual buffer dimensions as
  accurately reported by EGL as soon as you get a new buffer from
  eglSwapBuffers:

      eglSwapBuffers(egldisplay, eglsurface);

      if (eglQuerySurface(egldisplay, eglsurface, EGL_WIDTH, &width) &&
          eglQuerySurface(egldisplay, eglsurface, EGL_HEIGHT, &height))
      {
          glViewport(0, 0, width, height);
      }

  This is current best practice, and will result in smooth client
  resizing. Unfortunately it means the width/height fields in the
  MirResizeEvent structure should be ignored. Perhaps we need to
  deprecate them, or perhaps we should enhance them to represent buffer
  dimensions instead...

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1288021/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to