Closed Bug 1297836 Opened 8 years ago Closed 8 years ago

Minor optimizations for LayerView.Compositor

Categories

(Core Graveyard :: Widget: Android, defect, P3)

All
Android
defect

Tracking

(firefox51 fixed)

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: jchen, Assigned: jchen)

Details

Attachments

(2 files)

No description provided.
Priority: -- → P3
Now that nsWindow doesn't own LayerViewSupport, we shouldn't be using WindowEvent for LayerViewSupport calls. This patch converts the calls that dispatch to proxy to dispatch directly to Gecko. For SyncResumeResizeCompositor, it used a proxy to call OnResumedCompositor on the Gecko thread; this patch makes SyncResumeResizeCompositor post an event to call OnResumedCompositor directly, without going through the proxy.
Attachment #8784560 - Flags: review?(snorp)
Get rid of LayerView.Compositor.getSurface and just pass in the surface when creating or resuming the compositor. That also lets us get rid of some synchronization required for getSurface.
Attachment #8784561 - Flags: review?(snorp)
Attachment #8784560 - Flags: review?(snorp) → review+
Comment on attachment 8784561 [details] [diff] [review] Get surface when creating or resuming compositor (v1) Review of attachment 8784561 [details] [diff] [review]: ----------------------------------------------------------------- I think you need to clear mSurface in SyncPauseCompositor(), otherwise we'll end up returning a stale one. Previously, LVS::GetSurface() would've obtained a null one and set it there. That being said, we should never be trying to consume a null surface, so it's probably not a huge deal in practice.
Attachment #8784561 - Flags: review?(snorp) → review+
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #3) > Comment on attachment 8784561 [details] [diff] [review] > Get surface when creating or resuming compositor (v1) > > Review of attachment 8784561 [details] [diff] [review]: > ----------------------------------------------------------------- > > I think you need to clear mSurface in SyncPauseCompositor(), otherwise we'll > end up returning a stale one. Previously, LVS::GetSurface() would've > obtained a null one and set it there. > > That being said, we should never be trying to consume a null surface, so > it's probably not a huge deal in practice. Yeah, we hard crash in GLContextProviderEGL if we return a null surface. Other code calls SyncPauseCompositor expecting the surface to stay the same, so I didn't clear the surface in SyncPauseCompositor.
Pushed by nchen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/59fceff95c70 Don't use WindowEvent for LayerViewSupport; r=snorp https://hg.mozilla.org/integration/mozilla-inbound/rev/db1826bc2da5 Get surface when creating or resuming compositor; r=snorp
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: