Last Comment Bug 756601 - Finish the OMTC implementation on OS X
: Finish the OMTC implementation on OS X
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics: Layers (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal with 4 votes (vote)
: mozilla27
Assigned To: Matt Woodrow (:mattwoodrow)
:
Mentors:
Depends on: 728524 749428 796182 808469 809273 811439 858914 860615 861490 862556 867474 868919 870176 870211 872678 873944 874367 874369 874370 874823 875232 877034 877036 877534 877949 882590 885994 886667 886892 888048 888530 890997 899478 902591 912678 913407 921323 1244684
Blocks: omtc 759252 916812
  Show dependency treegraph
 
Reported: 2012-05-18 13:48 PDT by Joe Drew (not getting mail)
Modified: 2016-02-19 12:13 PST (History)
28 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
24+


Attachments
Use the right texture target when allocating textures (2.47 KB, patch)
2013-05-06 02:21 PDT, Matt Woodrow (:mattwoodrow)
bas: review+
Details | Diff | Review
Use TextureImageCGL again, and used TiledTexturedImage for large textures (8.11 KB, patch)
2013-05-06 02:24 PDT, Matt Woodrow (:mattwoodrow)
bgirard: review+
Details | Diff | Review
Setup our OpenGL surface before compositing. (8.43 KB, patch)
2013-05-06 02:25 PDT, Matt Woodrow (:mattwoodrow)
no flags Details | Diff | Review
Record memory usage for gfxQuartzSurface (3.03 KB, patch)
2013-05-06 02:26 PDT, Matt Woodrow (:mattwoodrow)
jmuizelaar: review+
Details | Diff | Review
Round texture coords to the nearest texel (1.82 KB, patch)
2013-05-06 02:26 PDT, Matt Woodrow (:mattwoodrow)
bas: review+
Details | Diff | Review
Use CreateThebesSurfaceAliasForDrawTarget_hack in CopyableCanvasLayer (1.16 KB, patch)
2013-05-06 02:27 PDT, Matt Woodrow (:mattwoodrow)
roc: review+
Details | Diff | Review
Setup PaintWillResample correctly (1.92 KB, patch)
2013-05-06 02:29 PDT, Matt Woodrow (:mattwoodrow)
roc: review+
Details | Diff | Review
Call PaintWindow so we get a DidPaint (1.49 KB, patch)
2013-05-06 02:30 PDT, Matt Woodrow (:mattwoodrow)
roc: review+
Details | Diff | Review
Send the values of mScaleToSize/mScaleMode across IPC (9.13 KB, patch)
2013-05-06 02:31 PDT, Matt Woodrow (:mattwoodrow)
roc: review+
Details | Diff | Review
Various fixes to small bugs (3.34 KB, patch)
2013-05-06 02:32 PDT, Matt Woodrow (:mattwoodrow)
bas: review+
Details | Diff | Review
Setup our OpenGL surface before compositing. v2 (7.92 KB, patch)
2013-05-08 17:15 PDT, Matt Woodrow (:mattwoodrow)
mstange: review+
Details | Diff | Review
Fix bugs with component alpha (5.46 KB, patch)
2013-05-08 17:23 PDT, Matt Woodrow (:mattwoodrow)
roc: review+
Details | Diff | Review
Enable OMTC on 10.7 and 10.8 (7.56 KB, patch)
2013-06-18 19:42 PDT, Matt Woodrow (:mattwoodrow)
no flags Details | Diff | Review
Enable OMTC on 10.7 and 10.8 v2 (10.81 KB, patch)
2013-06-18 20:30 PDT, Matt Woodrow (:mattwoodrow)
roc: review+
Details | Diff | Review

Description Joe Drew (not getting mail) 2012-05-18 13:48:58 PDT
Benoit Girard and Ali Juma did a lot of the initial work in implementing OMTC on OS X, but it's not done yet. This bug will track the work required to finish it.
Comment 1 Benoit Girard (:BenWa) 2012-05-18 16:10:40 PDT
Just a quick overview of what I think is needed before we can ship it without regressing:

1) Draw with cairo+quartz instead of cairo+pixman.
2) Texture sharing (bug 728524)
3) Either direct plugin (best), or add proper paths to shadow iosurfaces (easy).
Comment 2 Matt Woodrow (:mattwoodrow) 2013-05-06 02:21:59 PDT
Created attachment 745793 [details] [diff] [review]
Use the right texture target when allocating textures
Comment 3 Matt Woodrow (:mattwoodrow) 2013-05-06 02:24:01 PDT
Created attachment 745794 [details] [diff] [review]
Use TextureImageCGL again, and used TiledTexturedImage for large textures

Looks like the refactoring actually broke our usage of TextureImageCGL, and we've been using BasicTextureImage instead. Bit sad that talos didn't pick this up.
Comment 4 Matt Woodrow (:mattwoodrow) 2013-05-06 02:24:35 PDT
CC'ing Jeff and Joe for the sad in comment 3.
Comment 5 Matt Woodrow (:mattwoodrow) 2013-05-06 02:25:23 PDT
Created attachment 745797 [details] [diff] [review]
Setup our OpenGL surface before compositing.

This fixes a bunch of errors we were getting with MOZ_GL_DEBUG
Comment 6 Matt Woodrow (:mattwoodrow) 2013-05-06 02:26:16 PDT
Created attachment 745798 [details] [diff] [review]
Record memory usage for gfxQuartzSurface

I forget exactly why I needed to add these, but it fixed a warning of some sort.
Comment 7 Matt Woodrow (:mattwoodrow) 2013-05-06 02:26:59 PDT
Created attachment 745799 [details] [diff] [review]
Round texture coords to the nearest texel

Oh floating point...
Comment 8 Matt Woodrow (:mattwoodrow) 2013-05-06 02:27:57 PDT
Created attachment 745800 [details] [diff] [review]
Use CreateThebesSurfaceAliasForDrawTarget_hack in CopyableCanvasLayer

This just matches what we have to do in the other impl's.
Comment 9 Matt Woodrow (:mattwoodrow) 2013-05-06 02:29:05 PDT
Created attachment 745801 [details] [diff] [review]
Setup PaintWillResample correctly

Nothing was actually calling this function. This should match what the client side set.
Comment 10 Matt Woodrow (:mattwoodrow) 2013-05-06 02:30:48 PDT
Created attachment 745802 [details] [diff] [review]
Call PaintWindow so we get a DidPaint

Adds this call back so that we get a DidPaintWindow call. The actual paint attempt will be a no-op.

It might be nice to stop using the widget events entirely and instead fire WillPaint/DidPaint around the refresh driver painting, and fire MozAfterPaint when the compositor has completed. Might leave that for now though.
Comment 11 Matt Woodrow (:mattwoodrow) 2013-05-06 02:31:29 PDT
Created attachment 745803 [details] [diff] [review]
Send the values of mScaleToSize/mScaleMode across IPC
Comment 12 Matt Woodrow (:mattwoodrow) 2013-05-06 02:32:30 PDT
Created attachment 745804 [details] [diff] [review]
Various fixes to small bugs
Comment 13 Matt Woodrow (:mattwoodrow) 2013-05-06 02:33:26 PDT
With these patches the only failures left are a 10.6-only crash inside the OpenGL driver, and bug 868919.

With the former, we might need to delay enabling OMTC on that platform until we figure out.
Comment 14 Bas Schouten (:bas.schouten) 2013-05-06 08:04:11 PDT
Comment on attachment 745793 [details] [diff] [review]
Use the right texture target when allocating textures

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

I seem to distinctly recall this wasn't what we wanted for one of the Gralloc things.. But hopefully I'm mistaking, testing should prove.
Comment 15 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2013-05-06 10:49:06 PDT
Comment on attachment 745801 [details] [diff] [review]
Setup PaintWillResample correctly

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

I'm confused. Where's the implementation of SetPaintWillResample that actually does something?
Comment 16 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2013-05-06 10:50:57 PDT
Comment on attachment 745802 [details] [diff] [review]
Call PaintWindow so we get a DidPaint

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

What ensures that PaintWindow doesn't actually paint anything?
Comment 17 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2013-05-06 10:52:47 PDT
Comment on attachment 745803 [details] [diff] [review]
Send the values of mScaleToSize/mScaleMode across IPC

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

::: gfx/layers/ImageLayers.h
@@ +56,5 @@
>    void SetScaleToSize(const gfxIntSize &aSize, ScaleMode aMode)
>    {
>      mScaleToSize = aSize;
>      mScaleMode = aMode;
> +    Mutated();

Please make this "Mutated()" conditional on size/mode changing.
Comment 18 Matt Woodrow (:mattwoodrow) 2013-05-06 14:08:59 PDT
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #15)
> Comment on attachment 745801 [details] [diff] [review]
> Setup PaintWillResample correctly
> 
> Review of attachment 745801 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I'm confused. Where's the implementation of SetPaintWillResample that
> actually does something?

http://mxr.mozilla.org/mozilla-central/source/gfx/layers/composite/ContentHost.h#102

(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #16)
> Comment on attachment 745802 [details] [diff] [review]
> Call PaintWindow so we get a DidPaint
> 
> Review of attachment 745802 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> What ensures that PaintWindow doesn't actually paint anything?

http://mxr.mozilla.org/mozilla-central/source/layout/base/nsPresShell.cpp#5504
Comment 19 Matt Woodrow (:mattwoodrow) 2013-05-06 14:13:37 PDT
(In reply to Bas Schouten (:bas.schouten) from comment #14)
> Comment on attachment 745793 [details] [diff] [review]
> Use the right texture target when allocating textures
> 
> Review of attachment 745793 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I seem to distinctly recall this wasn't what we wanted for one of the
> Gralloc things.. But hopefully I'm mistaking, testing should prove.

Indeed, you wrote the patch that fixed b2g, which is why I asked you to review :)

The GL_TEXTURE_EXTERNAL branch inside MakeTextureIfNeeded should preserve the existing behaviour for b2g, while fixing it for mac.
Comment 20 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2013-05-07 22:26:10 PDT
Comment on attachment 745801 [details] [diff] [review]
Setup PaintWillResample correctly

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

Mark ContentHostBase::SetPaintWillResample explicitly virtual.
Comment 21 Markus Stange [:mstange] 2013-05-08 00:33:22 PDT
Comment on attachment 745797 [details] [diff] [review]
Setup our OpenGL surface before compositing.

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

::: gfx/layers/composite/LayerManagerComposite.cpp
@@ +295,5 @@
>    // Allow widget to render a custom background.
> +  mCompositor->GetWidget()->DrawWindowUnderlay(this, nsIntRect(bounds.x,
> +                                                               bounds.y,
> +                                                               bounds.width,
> +                                                               bounds.height));

Why?

::: widget/cocoa/nsChildView.mm
@@ +1873,5 @@
> +nsChildView::PreRender(LayerManager* aManager)
> +{
> +  nsAutoPtr<GLManager> manager(GLManager::CreateGLManager(aManager));
> +  NSOpenGLContext *glContext = (NSOpenGLContext *)manager->gl()->GetNativeData(GLContext::NativeGLContext);
> +  [(ChildView*)mView preRender: glContext];

Local style is no space after colon.

::: widget/nsIWidget.h
@@ +1169,5 @@
>       */
>      virtual void CleanupWindowEffects() = 0;
>  
> +    virtual void PreRender(LayerManager* aManager) = 0;
> +

needs IID change
Comment 22 Markus Stange [:mstange] 2013-05-08 08:09:41 PDT
(In reply to Markus Stange from comment #21)
> Comment on attachment 745797 [details] [diff] [review]
> Setup our OpenGL surface before compositing.
> 
> Review of attachment 745797 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: gfx/layers/composite/LayerManagerComposite.cpp
> @@ +295,5 @@
> >    // Allow widget to render a custom background.
> > +  mCompositor->GetWidget()->DrawWindowUnderlay(this, nsIntRect(bounds.x,
> > +                                                               bounds.y,
> > +                                                               bounds.width,
> > +                                                               bounds.height));
> 
> Why?

If the reason for the actualBounds -> bounds change is the fact that actualBounds is currently in screen coordinates (i.e. has a non-zero origin), then I think bug 861332 has a better fix.
Actually, in what cases can actualBounds differ from bounds/mRenderBounds?
Comment 23 Matt Woodrow (:mattwoodrow) 2013-05-08 17:09:33 PDT
(In reply to Markus Stange from comment #22)
> (In reply to Markus Stange from comment #21)
> > Comment on attachment 745797 [details] [diff] [review]
> > Setup our OpenGL surface before compositing.
> > 
> > Review of attachment 745797 [details] [diff] [review]:
> > -----------------------------------------------------------------
> > 
> > ::: gfx/layers/composite/LayerManagerComposite.cpp
> > @@ +295,5 @@
> > >    // Allow widget to render a custom background.
> > > +  mCompositor->GetWidget()->DrawWindowUnderlay(this, nsIntRect(bounds.x,
> > > +                                                               bounds.y,
> > > +                                                               bounds.width,
> > > +                                                               bounds.height));
> > 
> > Why?
> 
> If the reason for the actualBounds -> bounds change is the fact that
> actualBounds is currently in screen coordinates (i.e. has a non-zero
> origin), then I think bug 861332 has a better fix.
> Actually, in what cases can actualBounds differ from bounds/mRenderBounds?

No, it's just a change I made earlier when tinkering with things and forgot to revert :)
Will fix it before landing.
Comment 24 Matt Woodrow (:mattwoodrow) 2013-05-08 17:15:18 PDT
Created attachment 747207 [details] [diff] [review]
Setup our OpenGL surface before compositing. v2
Comment 25 Matt Woodrow (:mattwoodrow) 2013-05-08 17:23:09 PDT
Created attachment 747210 [details] [diff] [review]
Fix bugs with component alpha
Comment 26 Benoit Girard (:BenWa) 2013-05-09 12:50:15 PDT
Comment on attachment 745794 [details] [diff] [review]
Use TextureImageCGL again, and used TiledTexturedImage for large textures

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

::: gfx/gl/GLContextProviderCGL.mm
@@ +374,5 @@
> +      nsRefPtr<TextureImage> t = new gl::TiledTextureImage(this, aSize, aContentType, aFlags);
> +      return t.forget();
> +    }
> +
> +    return CreateTextureImageInternal(aSize, aContentType, 

2 extra spaces in this hunk

::: gfx/gl/GLContextProviderEGL.cpp
@@ +1537,5 @@
>  already_AddRefed<TextureImage>
>  GLContextEGL::TileGenFunc(const nsIntSize& aSize,
> +                          TextureImage::ContentType aContentType,
> +                          TextureImage::Flags aFlags)
> +

Missing '{'?
Comment 29 Matt Woodrow (:mattwoodrow) 2013-06-18 19:42:59 PDT
Created attachment 764528 [details] [diff] [review]
Enable OMTC on 10.7 and 10.8
Comment 30 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2013-06-18 19:59:34 PDT
Comment on attachment 764528 [details] [diff] [review]
Enable OMTC on 10.7 and 10.8

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

::: gfx/thebes/gfxPlatform.cpp
@@ +332,5 @@
>  #endif
>  
> +    bool useOffMainThreadCompositing = false;
> +    useOffMainThreadCompositing = GetPrefLayersOffMainThreadCompositionEnabled() ||
> +        Preferences::GetBool("browser.tabs.remote", false);

Fuse declaration with assignment

::: gfx/thebes/gfxPlatformGtk.cpp
@@ +503,5 @@
> +gfxPlatformGtk::SupportsOffMainThreadCompositing()
> +{
> +#ifdef MOZ_X11
> +  return (PR_GetEnv("MOZ_USE_OMTC") != nullptr) ||
> +         (PR_GetEnv("MOZ_OMTC_ENABLED") != nullptr);

Why two different env vars here?

::: gfx/thebes/gfxPlatformMac.cpp
@@ +435,5 @@
> +gfxPlatformMac::SupportsOffMainThreadCompositing()
> +{
> +  // 10.6.X has crashes on tinderbox with OMTC, so disable it
> +  // for now.
> +  return OSXVersion() >= 0x1070;

This gives us no way to test OMTC on 10.6. I think we need a separate "force" pref.
Comment 31 Matt Woodrow (:mattwoodrow) 2013-06-18 20:30:09 PDT
Created attachment 764546 [details] [diff] [review]
Enable OMTC on 10.7 and 10.8 v2
Comment 32 Matt Woodrow (:mattwoodrow) 2013-06-18 20:32:04 PDT
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #30)
> 
> ::: gfx/thebes/gfxPlatformGtk.cpp
> @@ +503,5 @@
> > +gfxPlatformGtk::SupportsOffMainThreadCompositing()
> > +{
> > +#ifdef MOZ_X11
> > +  return (PR_GetEnv("MOZ_USE_OMTC") != nullptr) ||
> > +         (PR_GetEnv("MOZ_OMTC_ENABLED") != nullptr);
> 
> Why two different env vars here?
> 

The scripts for running tests on tinderbox are global, not per-branch. With the refactoring, we wanted this pref enabled (for Ripc), but we didn't want it to be enabled on branches that didn't have the refactoring. So we needed separate env vars.

Once the refactoring reaches *all* branches, we can drop this again.
Comment 33 Matt Woodrow (:mattwoodrow) 2013-06-18 20:32:49 PDT
Note that this is just moving X11 specific code out of gfxPlatform, there's no changes to the env vars.
Comment 34 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2013-06-18 20:39:50 PDT
Comment on attachment 764546 [details] [diff] [review]
Enable OMTC on 10.7 and 10.8 v2

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

::: gfx/thebes/gfxPlatformMac.cpp
@@ +438,5 @@
> +  // for now.
> +  if (OSXVersion() >= 0x1070) {
> +    return true;
> +  }
> +  return GetPrefLayersOffMainThreadCompositionForceEnabled();

I think this call should move up so that if the force pref is set, we don't even call SupportsOffMainThreadCompositing on any platform.
Comment 35 Matt Woodrow (:mattwoodrow) 2013-06-18 20:53:28 PDT
The problem is that X11 *needs* at least one of those env vars set.

The env vars are also read at startup, and initialize threaded Xlib.

http://mxr.mozilla.org/mozilla-central/source/toolkit/xre/nsAppRunner.cpp#3372

If we allow the force-enabled pref to override this, then it's just going to be a broken configuration that crashes.
Comment 36 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2013-06-18 21:04:37 PDT
Comment on attachment 764546 [details] [diff] [review]
Enable OMTC on 10.7 and 10.8 v2

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

OK I guess.
Comment 37 Matt Woodrow (:mattwoodrow) 2013-06-20 14:34:20 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/b029e52490da
Comment 38 Ed Morley [:emorley] 2013-06-21 07:57:08 PDT
https://hg.mozilla.org/mozilla-central/rev/b029e52490da
Comment 39 Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2013-07-12 17:40:47 PDT
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #17)
> Comment on attachment 745803 [details] [diff] [review]
> Send the values of mScaleToSize/mScaleMode across IPC
> 
> Review of attachment 745803 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: gfx/layers/ImageLayers.h
> @@ +56,5 @@
> >    void SetScaleToSize(const gfxIntSize &aSize, ScaleMode aMode)
> >    {
> >      mScaleToSize = aSize;
> >      mScaleMode = aMode;
> > +    Mutated();
> 
> Please make this "Mutated()" conditional on size/mode changing.

It would probably be a good idea to add an assertion that the layer properties have actually changed if we add an AttributeChange op for a layer.
Comment 40 Florian Bender 2013-07-15 23:32:36 PDT
The relnote has a typo (if I'm not mistaken), it should be: 
> … for OSX renders smoother …

(and not "render's").
Comment 41 huge514 2013-09-06 21:49:45 PDT
Comment on attachment 745793 [details] [diff] [review]
Use the right texture target when allocating textures

># HG changeset patch
># User Matt Woodrow <mwoodrow@mozilla.com>
># Date 1367384858 -43200
># Node ID 45493544fd0b4320573b6d00a53bb10e10b4e2d8
># Parent  8a2fb3738795e6209df068e57088574c7707145c
>imported patch fix-video
>
>diff --git a/gfx/layers/opengl/TextureHostOGL.cpp b/gfx/layers/opengl/TextureHostOGL.cpp
>--- a/gfx/layers/opengl/TextureHostOGL.cpp
>+++ b/gfx/layers/opengl/TextureHostOGL.cpp
>@@ -46,29 +46,36 @@ CreateTextureHostOGL(SurfaceDescriptorTy
> 
>   NS_ASSERTION(result, "Result should have been created.");
> 
>   result->SetFlags(aTextureFlags);
>   return result.forget();
> }
> 
> static void
>-MakeTextureIfNeeded(gl::GLContext* gl, GLuint& aTexture)
>+MakeTextureIfNeeded(gl::GLContext* gl, GLenum aTarget, GLuint& aTexture)
> {
>   if (aTexture != 0)
>     return;
> 
>+  GLenum target = aTarget;
>+  // GL_TEXTURE_EXTERNAL requires us to initialize the texture
>+  // using the GL_TEXTURE_2D attachment.
>+  if (target == LOCAL_GL_TEXTURE_EXTERNAL) {
>+    target = LOCAL_GL_TEXTURE_2D;
>+  }
>+
>   gl->fGenTextures(1, &aTexture);
> 
>-  gl->fBindTexture(LOCAL_GL_TEXTURE_2D, aTexture);
>+  gl->fBindTexture(target, aTexture);
> 
>-  gl->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_LINEAR);
>-  gl->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MAG_FILTER, LOCAL_GL_LINEAR);
>-  gl->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_S, LOCAL_GL_CLAMP_TO_EDGE);
>-  gl->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_T, LOCAL_GL_CLAMP_TO_EDGE);
>+  gl->fTexParameteri(target, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_LINEAR);
>+  gl->fTexParameteri(target, LOCAL_GL_TEXTURE_MAG_FILTER, LOCAL_GL_LINEAR);
>+  gl->fTexParameteri(target, LOCAL_GL_TEXTURE_WRAP_S, LOCAL_GL_CLAMP_TO_EDGE);
>+  gl->fTexParameteri(target, LOCAL_GL_TEXTURE_WRAP_T, LOCAL_GL_CLAMP_TO_EDGE);
> }
> 
> static gl::TextureImage::Flags
> FlagsToGLFlags(TextureFlags aFlags)
> {
>   uint32_t result = TextureImage::NoFlags;
> 
>   if (aFlags & UseNearestFilter)
>@@ -265,17 +272,17 @@ SharedTextureHostOGL::SwapTexturesImpl(c
>     mFormat = FormatFromShaderType(mShaderProgram);
>     mTextureTransform = handleDetails.mTextureTransform;
>   }
> }
> 
> bool
> SharedTextureHostOGL::Lock()
> {
>-  MakeTextureIfNeeded(mGL, mTextureHandle);
>+  MakeTextureIfNeeded(mGL, mTextureTarget, mTextureHandle);
> 
>   mGL->fActiveTexture(LOCAL_GL_TEXTURE0);
>   mGL->fBindTexture(mTextureTarget, mTextureHandle);
>   if (!mGL->AttachSharedHandle(mShareType, mSharedHandle)) {
>     NS_ERROR("Failed to bind shared texture handle");
>     return false;
>   }
>
Comment 42 Milan Sreckovic [:milan] 2014-01-09 11:22:08 PST
There are further enhancements that can and should be made (see meta bug 958195), but OMTC on the Mac is done and shipping, so we're closing this bug.

Note You need to log in before you can comment on or make changes to this bug.