Closed Bug 1287232 Opened 8 years ago Closed 8 years ago

Use normal refcounting for ISurfaceAllocator

Categories

(Core :: Graphics: Layers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: dvander, Assigned: dvander)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

ISurfaceAllocator inherits from a very complicated class called AtomicRefCountedWithFinalize. It doesn't look like there's any particular reason to do this anymore. bug 1121676 made it safe to free top-level actors from any thread, so we can probably remove SetMessageLoopToPostDestructionTo as well.
Attached patch patchSplinter Review
This is looking somewhat green.
Attachment #8771634 - Flags: review?(wmccloskey)
Whiteboard: [gfx-noted]
Comment on attachment 8771634 [details] [diff] [review]
patch

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

Something seems wrong with the name elimination here. I think it's still needed.

::: gfx/layers/AtomicRefCountedWithFinalize.h
@@ -59,1 @@
>      static void DestroyToBeCalledOnMainThread(T* ptr) {

You should be able to get rid of this too.
Attachment #8771634 - Flags: review?(wmccloskey)
(In reply to Bill McCloskey (:billm) from comment #3)
> Comment on attachment 8771634 [details] [diff] [review]
> patch
> 
> Review of attachment 8771634 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Something seems wrong with the name elimination here. I think it's still
> needed.

Where, exactly? ISurfaceAllocator doesn't use it. AtomicRefcountedWithFinalizer does, but it's not used in ISurfaceAllocator anymore.
Comment on attachment 8771634 [details] [diff] [review]
patch

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

Sorry, I shouldn't have read so quickly.
Attachment #8771634 - Flags: review+
Pushed by danderson@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a46d84c52f89
Use normal refcounting for ISurfaceAllocator. (bug 1287232, r=billm)
https://hg.mozilla.org/mozilla-central/rev/a46d84c52f89
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: