Closed Bug 885100 Opened 7 years ago Closed 7 years ago

Need to call ReleaseTexture from CompositorOGL

Categories

(Core :: Graphics, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: billm, Assigned: billm)

References

Details

Attachments

(1 file)

Attached patch patchSplinter Review
I've been trying to get hardware acceleration working with OMTC on my Linux machine. Without this patch, I was getting errors about "X ERROR: BadValue" from a call to glXBindTexImageEXT. My nVidia driver doesn't like it when you call glXBindTexImageEXT twice on the same pixmap/buffer combination without a call to glXReleaseTexImageEXT in between.

This patch just does the release calls. It allows me to run with OMTC and accelerated layers enabled.
Attachment #765063 - Flags: review?(ncameron)
Comment on attachment 765063 [details] [diff] [review]
patch

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

LGTM with the nits fixed. Thanks for the patch!

::: gfx/layers/opengl/CompositorOGL.cpp
@@ +951,5 @@
>      return gl::RGBALayerProgramType;
>    }
>  }
>  
> +struct AutoBindTexture

MOZ_STACK_CLASS

@@ +956,5 @@
> +{
> +  AutoBindTexture() : mTexture(nullptr) {}
> +  AutoBindTexture(TextureSourceOGL* aTexture, GLenum aTextureUnit)
> +   : mTexture(nullptr) { Bind(aTexture, aTextureUnit); }
> +  ~AutoBindTexture() {

nit: new line for {

@@ +958,5 @@
> +  AutoBindTexture(TextureSourceOGL* aTexture, GLenum aTextureUnit)
> +   : mTexture(nullptr) { Bind(aTexture, aTextureUnit); }
> +  ~AutoBindTexture() {
> +    if (mTexture)
> +      mTexture->ReleaseTexture();

nit: {} please
Attachment #765063 - Flags: review?(ncameron) → review+
https://hg.mozilla.org/mozilla-central/rev/d33262333925
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Blocks: 887317
You need to log in before you can comment on or make changes to this bug.