Closed
Bug 902330
Opened 12 years ago
Closed 12 years ago
Fix shmem texture clients for D3D9 and 11 compositors
Categories
(Core :: Graphics: Layers, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: nrc, Assigned: nrc)
References
Details
Attachments
(4 files, 2 obsolete files)
|
27.46 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
|
3.71 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
|
333 bytes,
text/html
|
Details | |
|
2.10 KB,
patch
|
nrc
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•12 years ago
|
||
SupportsAzureContent is a total nightmare, it is rarely safe to use. This patch adds a safer alternative and fixes up a bunch of its uses
Attachment #786762 -
Flags: review?(matt.woodrow)
| Assignee | ||
Comment 2•12 years ago
|
||
Attachment #786763 -
Flags: review?(matt.woodrow)
Comment 3•12 years ago
|
||
Comment on attachment 786762 [details] [diff] [review]
fix SupportsAzureContent
Review of attachment 786762 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/client/CompositableClient.cpp
@@ +127,1 @@
> }
Don't comment this out.
Attachment #786762 -
Flags: review?(matt.woodrow) → review+
Comment 4•12 years ago
|
||
Comment on attachment 786763 [details] [diff] [review]
Clear the non-opaque surfaces on creation for shmem texture clients and other minor fixups
Review of attachment 786763 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/client/TextureClient.cpp
@@ +327,5 @@
> + nsRefPtr<gfxContext> context = new gfxContext(GetSurface());
> + context->SetColor(gfxRGBA(0, 0, 0, 0));
> + context->SetOperator(gfxContext::OPERATOR_SOURCE);
> + context->Paint();
> + }
Why do we need to do this? Normally we rely on the ContentClient's BeginPaint function to do any clearing that might be required.
| Assignee | ||
Comment 5•12 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #4)
> Comment on attachment 786763 [details] [diff] [review]
> Clear the non-opaque surfaces on creation for shmem texture clients and
> other minor fixups
>
> Review of attachment 786763 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: gfx/layers/client/TextureClient.cpp
> @@ +327,5 @@
> > + nsRefPtr<gfxContext> context = new gfxContext(GetSurface());
> > + context->SetColor(gfxRGBA(0, 0, 0, 0));
> > + context->SetOperator(gfxContext::OPERATOR_SOURCE);
> > + context->Paint();
> > + }
>
> Why do we need to do this? Normally we rely on the ContentClient's
> BeginPaint function to do any clearing that might be required.
Do you mean ThebesLayerBuffer::BeingPaint? ContentClient does nothing to clear. TLB::BeginPaint only clears buffers we've used before, not new buffers. If we have a new buffer then it assumes we don't need to clear it. This patch clears new buffers to make them actually zero, rather than uninitialised data.
Updated•12 years ago
|
Attachment #786763 -
Flags: review?(matt.woodrow) → review+
Updated•12 years ago
|
Attachment #786763 -
Flags: review+ → review-
Comment 6•12 years ago
|
||
Changed my mind.
We manage to get away without doing this on some platforms, right? B2G, android should be hitting this?
We should try figure out what conditions give us actual clear surfaces, and what ones don't, rather than just always clearing.
Comment 7•12 years ago
|
||
I think we may also be hitting this with BasicCompositor. I noticed that some tests end up rendering some blocks that should be a solid color but end up being random garbage.
| Assignee | ||
Comment 8•12 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #6)
> Changed my mind.
>
> We manage to get away without doing this on some platforms, right? B2G,
> android should be hitting this?
>
> We should try figure out what conditions give us actual clear surfaces, and
> what ones don't, rather than just always clearing.
My theory is that we just don't notice on these platforms. The only reason I noticed on windows is that there is a great big chunk of transparent thebes layer over the title bar. I never saw this with web content. I guess it is pretty hard to come up with a case to repro this, its not covered by our tests and no-one has noticed on mobile/mac.
| Assignee | ||
Comment 9•12 years ago
|
||
I'll try to come up with a test case.
| Assignee | ||
Comment 10•12 years ago
|
||
OK, I made a test case and it is broken on Android and on Windows only with OMTC. Could you test on mac too please? (Coming soon...)
| Assignee | ||
Comment 11•12 years ago
|
||
I'll make this into a ref test somehow later - gradients are really bad for ref tests.
Anyway, if this passes, then you should see a very pale pink square with a subtle gradient (that is it should be 50% opaque and you should see the gradient coming through). If it fails you should see an opaque or nearly opaque (on windows, alpha = 0xcd, different on Android) white or grey square. On Android the test becomes correct when you zoom in. I haven't checked if these patches fix android or not.
Comment 12•12 years ago
|
||
Passes just fine on mac, because we always clear in ContentClientIncremental.
You should get rid of that clear if you're going to add this one :)
Updated•12 years ago
|
Attachment #786763 -
Flags: review- → review+
| Assignee | ||
Comment 13•12 years ago
|
||
| Assignee | ||
Comment 14•12 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #12)
> Passes just fine on mac, because we always clear in ContentClientIncremental.
>
> You should get rid of that clear if you're going to add this one :)
Filed bug 903129 for that because it might get a bit big if we have to clear in other texture clients.
| Assignee | ||
Comment 15•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/0428fd3a0d3a
https://hg.mozilla.org/integration/mozilla-inbound/rev/cc3ab8b0a16c
(ref test still to come)
Whiteboard: [leave open]
Comment 16•12 years ago
|
||
| Assignee | ||
Comment 17•12 years ago
|
||
Attachment #793337 -
Flags: review?(matt.woodrow)
| Assignee | ||
Comment 18•12 years ago
|
||
apparently canvas and content do integer division differently :-p
Attachment #793337 -
Attachment is obsolete: true
Attachment #793337 -
Flags: review?(matt.woodrow)
Attachment #793377 -
Flags: review?(matt.woodrow)
Updated•12 years ago
|
Attachment #793377 -
Flags: review?(matt.woodrow) → review+
| Assignee | ||
Comment 19•12 years ago
|
||
| Assignee | ||
Updated•12 years ago
|
Whiteboard: [leave open]
| Assignee | ||
Comment 20•12 years ago
|
||
Reftest with fuzz, because no-one can seem to agree on how to divide by two. Sigh.
Carrying r=mattwoodrow (since it was he suggested fuzzing on irc).
Attachment #793377 -
Attachment is obsolete: true
Attachment #793810 -
Flags: review+
| Assignee | ||
Comment 21•12 years ago
|
||
Comment 22•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•