Closed Bug 779152 Opened 12 years ago Closed 12 years ago

Use TextureView where available

Categories

(Firefox for Android Graveyard :: Toolbar, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 17

People

(Reporter: snorp, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

Right now we use an old school SurfaceView for rendering Gecko content. As of ICS, a new option exists called TextureView. This integrates into the OpenGL rendering present on ICS and higher, and would allow us to transform and smoothly animate the gecko view.
Comment on attachment 647548 [details] [diff] [review]
Render into a TextureView on Android where available

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

Cool! However you'll need to rebase this patch on top of the one from bug 770047, please test to make sure it doesn't re-introduce the black flash on Jelly Bean devices.

::: mobile/android/base/gfx/LayerView.java
@@ +277,5 @@
> +    }
> +
> +    private class SurfaceTextureListener implements TextureView.SurfaceTextureListener {
> +        public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
> +            // We don't do this for surfaceChanged above because it is always followed by a surfaceChanged,

Should the first "surfaceChanged" in this sentence actually be "surfaceCreated"? (And to be clear, I would prefer SurfaceListener.surfaceCreated and SurfaceListener.surfaceChanged).
Attachment #647548 - Flags: review?(bugmail.mozilla) → review+
(In reply to Kartikaya Gupta (:kats) from comment #2)
> Comment on attachment 647548 [details] [diff] [review]
> Render into a TextureView on Android where available
> 
> Review of attachment 647548 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Cool! However you'll need to rebase this patch on top of the one from bug
> 770047, please test to make sure it doesn't re-introduce the black flash on
> Jelly Bean devices.
> 
> ::: mobile/android/base/gfx/LayerView.java
> @@ +277,5 @@
> > +    }
> > +
> > +    private class SurfaceTextureListener implements TextureView.SurfaceTextureListener {
> > +        public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
> > +            // We don't do this for surfaceChanged above because it is always followed by a surfaceChanged,
> 
> Should the first "surfaceChanged" in this sentence actually be
> "surfaceCreated"?

Oops, indeed. Fixed.

 (And to be clear, I would prefer
> SurfaceListener.surfaceCreated and SurfaceListener.surfaceChanged).

Well we aren't going to do anything in response to that are we? We only care when the size changes? It does kinda suck, but I left it as-is.
Attachment #647548 - Attachment is obsolete: true
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #3)
>  (And to be clear, I would prefer
> > SurfaceListener.surfaceCreated and SurfaceListener.surfaceChanged).
> 
> Well we aren't going to do anything in response to that are we? We only care
> when the size changes? It does kinda suck, but I left it as-is.

Oh, I totally didn't word that properly. I meant that the comment should refer to "SurfaceListener.surfaceCreated" instead of just "surfaceCreated" for clarity. But it's not a big deal.
BTW, I did test to make sure this does not reintroduce the black flash on JB. (It does not)
https://hg.mozilla.org/mozilla-central/rev/fe59d3af41f2
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
Depends on: 779582
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: