ImageClient updates may race on D3D11

RESOLVED FIXED in mozilla35

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: nical, Assigned: nical)

Tracking

unspecified
mozilla35
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

When setting an image that can't be shared in an ImageClient, we need to copy it into a TextureClient. In the case of D3D11 (and more generally when the texture doesn't have an internal buffer) we should not use a single buffered ImageClient which writes directly into the front buffer, because it breaks the transactional guarantee of layer updates.
Assignee: nobody → nical.bugzilla
Attachment #8495431 - Flags: review?(matt.woodrow)
Comment on attachment 8495431 [details] [diff] [review]
use double buffered ImageClient with D3D11.

Review of attachment 8495431 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/client/ClientImageLayer.cpp
@@ +104,5 @@
>        mImageClientTypeContainer = CompositableType::BUFFER_BRIDGE;
>        return mImageClientTypeContainer;
>      }
>  
> +    if (ClientManager()->GetCompositorBackendType() == LayersBackend::LAYERS_D3D11) {

Add a comment about why d3d11 is annoying.

::: gfx/layers/client/ImageClient.cpp
@@ +34,5 @@
>  #include "mozilla/gfx/2D.h"
>  #ifdef MOZ_WIDGET_GONK
>  #include "GrallocImages.h"
>  #endif
> +#include "nsExpirationTracker.h"

Remove this
Attachment #8495431 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/d84db3f0c1ab
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Depends on: 1098895
You need to log in before you can comment on or make changes to this bug.