Offscreen context without offscreen texture does not need YFlip

RESOLVED FIXED in mozilla14

Status

()

Core
Graphics
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: romaxa, Assigned: romaxa)

Tracking

Trunk
mozilla14
ARM
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
When offscreen context bounded to texture with BindTexImage, it does not require YFlip.
So I think we should set YFlip only for offscreen gl context which  gl()->BindOffscreenNeedsTexture(mCanvasGLContext) == false
(Assignee)

Comment 1

5 years ago
Created attachment 609148 [details] [diff] [review]
Don't set YFlip for offscreen texture-less gl context
Assignee: nobody → romaxa
Status: NEW → ASSIGNED
Attachment #609148 - Flags: review?(jgilbert)
Comment on attachment 609148 [details] [diff] [review]
Don't set YFlip for offscreen texture-less gl context

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

Also, in order to land something touching yflip, we need to check that yflip is correct on the platforms the change touches. All core platform that can use OGL layers should be checked. These should be linux, mac, and mobile.

::: gfx/layers/opengl/CanvasLayerOGL.cpp
@@ +115,5 @@
>  
>      mCanvasGLContext = aData.mGLContext;
>      mGLBufferIsPremultiplied = aData.mGLBufferIsPremultiplied;
>  
> +    mNeedsYFlip = !gl()->BindOffscreenNeedsTexture(mCanvasGLContext);

The function you want is GLContext::GetOffscreenTexture().
BindOffscreenNeedsTexture() is a virtual function that controls whether OGL Layers needs to create its own texture. (and is probably coming out as we clean the provider classes)
Attachment #609148 - Flags: review?(jgilbert) → review-
(Assignee)

Comment 3

5 years ago
Created attachment 609396 [details] [diff] [review]
Don't set YFlip for offscreen texture-less gl context
Attachment #609148 - Attachment is obsolete: true
Attachment #609396 - Flags: review?(jgilbert)
Attachment #609396 - Flags: review?(jgilbert) → review+
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/f65ae1a9074d
(Assignee)

Updated

5 years ago
Target Milestone: --- → mozilla14

Comment 5

5 years ago
https://hg.mozilla.org/mozilla-central/rev/f65ae1a9074d
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.