Closed Bug 1019405 Opened 6 years ago Closed 6 years ago

Allow to create offscreen GL context for main Layer Manager

Categories

(Core :: Graphics, defect)

ARM
Mer
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: tatiana, Assigned: tatiana)

Details

Attachments

(1 file, 1 obsolete file)

In embedlite we do render layers into offscreen context, and streaming textures into different thread.
https://tbpl.mozilla.org/?tree=Try&rev=669a4a1dec1d
Assignee: nobody → tanya.meshkova
Attachment #8433071 - Flags: review?(jgilbert)
Comment on attachment 8433071 [details] [diff] [review]
Make CompositorOGL render into offscreen context

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

On a random note, the new embedding API stuff is really cool. Thanks for contributing that!

::: gfx/layers/opengl/CompositorOGL.cpp
@@ +579,5 @@
>  
>    // Matrix to transform (0, 0, aWidth, aHeight) to viewport space (-1.0, 1.0,
>    // 2, 2) and flip the contents.
>    Matrix viewMatrix;
> +  viewMatrix.Translate(-1.0, mGLContext->IsOffscreen() ? -1.0 : 1.0);

Can you explain what this does? And I would stick this into one if (IsOffscreen()) to make this more readable.
> > +  viewMatrix.Translate(-1.0, mGLContext->IsOffscreen() ? -1.0 : 1.0);
> 
> Can you explain what this does? And I would stick this into one if
> (IsOffscreen()) to make this more readable.

without this change offscreen GL Context with GLScreenBuffer producing Y-Flipped texture.
this is quick trick to FLip it back without requiring Embedding side to do that
I meant in a comment in the code :)
Attachment #8433071 - Attachment is obsolete: true
Attachment #8433071 - Flags: review?(jgilbert)
Attachment #8433836 - Flags: review?(jgilbert)
Attachment #8433836 - Flags: feedback?(gal)
Comment on attachment 8433836 [details] [diff] [review]
Make CompositorOGL render into offscreen context

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

LGTM, but mattwoodrow is a better person for layers reviews.
Attachment #8433836 - Flags: review?(matt.woodrow)
Attachment #8433836 - Flags: review?(jgilbert)
Attachment #8433836 - Flags: feedback+
Comment on attachment 8433836 [details] [diff] [review]
Make CompositorOGL render into offscreen context

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

Looks good to me.
Attachment #8433836 - Flags: feedback?(gal) → feedback+
Attachment #8433836 - Flags: review?(matt.woodrow) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/4aff63678fd2
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.