← Back to team overview

desktop-packages team mailing list archive

[Bug 1406725] Re: Severe graphical corruption running software clients (including Xmir) on android

 

OK, I think this might be the problem. The client API is releasing its
shared pointer the the software buffer region prematurely (before
mir_buffer_stream_get_graphics_region even returns). This means we are
calling Android's gralloc->unlock() way before the client has even
started filling the buffer!


void mir_buffer_stream_get_graphics_region(
    MirBufferStream *buffer_stream,
    MirGraphicsRegion *region_out)
try
{
    mcl::ClientBufferStream *bs = reinterpret_cast<mcl::ClientBufferStream*>(buffer_stream);

    auto secured_region = bs->secure_for_cpu_write();
    region_out->width = secured_region->width.as_uint32_t();
    region_out->height = secured_region->height.as_uint32_t();
    region_out->stride = secured_region->stride.as_uint32_t();
    region_out->pixel_format = secured_region->format;
    region_out->vaddr = secured_region->vaddr.get();
}
catch (std::exception const& ex)
{
    MIR_LOG_UNCAUGHT_EXCEPTION(ex);
}


** Changed in: mir
     Assignee: (unassigned) => Daniel van Vugt (vanvugt)

** Changed in: mir
    Milestone: None => 0.17.0

** Changed in: mir
       Status: Triaged => In Progress

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to xorg-server in Ubuntu.
https://bugs.launchpad.net/bugs/1406725

Title:
  Severe graphical corruption running software clients (including Xmir)
  on android

Status in Mir:
  In Progress
Status in xorg-server package in Ubuntu:
  Invalid

Bug description:
  I'm seeing severe graphical corruption running mir_demo_client_flicker
  on mako.

  Start a few instances of the client (or just one flicker and some
  other clients) and you'll see the mir_demo_client_flicker window
  contains significant corruption.

  I don't think it's an overlays issue. The problem occurs even without
  overlays.

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