Closed Bug 930516 Opened 6 years ago Closed 6 years ago

Add a gfxPlatform::ScreenReferenceDrawTarget() static method

Categories

(Core :: Graphics, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: jwatt, Assigned: jwatt)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
Blocks: 930468
Attached patch patchSplinter Review
Attachment #821675 - Flags: review?(bas)
Comment on attachment 821675 [details] [diff] [review]
patch

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

::: gfx/thebes/gfxPlatform.cpp
@@ +395,5 @@
>  
> +    if (gPlatform->SupportsAzureContent()) {
> +        gPlatform->mScreenReferenceDrawTarget =
> +            gPlatform->CreateOffscreenContentDrawTarget(IntSize(1, 1),
> +                                                        FORMAT_B8G8R8A8);

Add a runtimeabort here too for consistent behavior.
Attachment #821675 - Flags: review?(bas) → review+
The WinXP crashes were indeed caused by this bug. The crash occurring under gfxPlatform::Shutdown while Release()'ing the new mozilla::RefPtr<mozilla::gfx::DrawTarget> mScreenReferenceDrawTarget member.

10:36:34     INFO -   0  ntdll.dll + 0x1b1fa
10:36:34     INFO -      eip = 0x7c91b1fa   esp = 0x0012f408   ebp = 0x0012f47c   ebx = 0x00000000
10:36:34     INFO -      esi = 0x01d1b3b4   edi = 0x00000000   eax = 0x00000000   ecx = 0x00000144
10:36:34     INFO -      edx = 0x01d1b3c4   efl = 0x00010246
10:36:34     INFO -      Found by: given as instruction pointer in context
10:36:34     INFO -   1  ntdll.dll + 0x1045
10:36:34     INFO -      eip = 0x7c901046   esp = 0x0012f484   ebp = 0x0012f498
10:36:34     INFO -      Found by: previous frame's frame pointer
10:36:34     INFO -   2  gkmedias.dll!_moz_cairo_destroy [cairo.c:075fc0110d9f : 444 + 0x5]
10:36:34     INFO -      eip = 0x01928f7e   esp = 0x0012f4a0   ebp = 0x0012f4a8
10:36:34     INFO -      Found by: previous frame's frame pointer
10:36:34     INFO -   3  gkmedias.dll!mozilla::gfx::DrawTargetCairo::~DrawTargetCairo() [DrawTargetCairo.cpp:075fc0110d9f : 408 + 0xd]
10:36:34     INFO -      eip = 0x01b11b45   esp = 0x0012f4b0   ebp = 0x0012f4c0
10:36:34     INFO -      Found by: call frame info
10:36:34     INFO -   4  gkmedias.dll!mozilla::gfx::DrawTargetCairo::`scalar deleting destructor'(unsigned int) + 0xa
10:36:34     INFO -      eip = 0x01b11ef0   esp = 0x0012f4bc   ebp = 0x0012f4c0
10:36:34     INFO -      Found by: call frame info
10:36:34     INFO -   5  xul.dll!mozilla::detail::RefCounted<mozilla::gfx::DrawTarget,1>::Release() [RefPtr.h:075fc0110d9f : 82 + 0xa]
10:36:34     INFO -      eip = 0x102b2db8   esp = 0x0012f4c8   ebp = 0x0012f4dc
10:36:34     INFO -      Found by: call frame info
10:36:34     INFO -   6  xul.dll!gfxPlatform::~gfxPlatform() [gfxPlatform.cpp:075fc0110d9f : 538 + 0x45]
10:36:34     INFO -      eip = 0x113f5466   esp = 0x0012f4d0   ebp = 0x0012f4dc
10:36:34     INFO -      Found by: call frame info
10:36:34     INFO -   7  xul.dll!gfxWindowsPlatform::`vector deleting destructor'(unsigned int) + 0xa
10:36:34     INFO -      eip = 0x113c685b   esp = 0x0012f4d8   ebp = 0x0012f4dc
10:36:34     INFO -      Found by: call frame info
10:36:34     INFO -   8  xul.dll!gfxPlatform::Shutdown() [gfxPlatform.cpp:075fc0110d9f : 505 + 0x10]
10:36:34     INFO -      eip = 0x113f4f47   esp = 0x0012f4e4   ebp = 0x0012f514
10:36:34     INFO -      Found by: call frame info
Nulling out mScreenReferenceDrawTarget in the gfxPlatform dtor (as we do for mScreenReferenceSurface) before the dtor calls the other cleanup methods seems to fix this:

https://tbpl.mozilla.org/?tree=Try&rev=cf1c32012344

So relanded with that change:

https://hg.mozilla.org/integration/mozilla-inbound/rev/fec053738792
(In reply to Jonathan Watt [:jwatt] from comment #6)
> (as we do for mScreenReferenceSurface)

For anyone doing bug archeology that was added in bug 754329.
https://hg.mozilla.org/mozilla-central/rev/fec053738792
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Blocks: 703159
You need to log in before you can comment on or make changes to this bug.