Allow to create offscreen GL context for main Layer Manager

RESOLVED FIXED in mozilla32

Status

()

Core
Graphics
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: tatiana, Assigned: tatiana)

Tracking

Trunk
mozilla32
ARM
Mer
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

4 years ago
In embedlite we do render layers into offscreen context, and streaming textures into different thread.
(Assignee)

Comment 1

4 years ago
Created attachment 8433071 [details] [diff] [review]
Make CompositorOGL render into offscreen context

https://tbpl.mozilla.org/?tree=Try&rev=669a4a1dec1d
Assignee: nobody → tanya.meshkova
Attachment #8433071 - Flags: review?(jgilbert)

Comment 2

4 years ago
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.
(Assignee)

Comment 3

4 years ago
> > +  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

Comment 4

4 years ago
I meant in a comment in the code :)
(Assignee)

Comment 5

4 years ago
Created attachment 8433836 [details] [diff] [review]
Make CompositorOGL render into offscreen context
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 7

4 years ago
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+
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/4aff63678fd2
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.