Closed Bug 739095 Opened 12 years ago Closed 12 years ago

Offscreen context without offscreen texture does not need YFlip

Categories

(Core :: Graphics, defect)

ARM
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: romaxa, Assigned: romaxa)

Details

Attachments

(1 file, 1 obsolete file)

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: 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-
Attachment #609148 - Attachment is obsolete: true
Attachment #609396 - Flags: review?(jgilbert)
Attachment #609396 - Flags: review?(jgilbert) → review+
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/f65ae1a9074d
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: