Bug 942505 - Move everything SharedHandle-related out of GLContext - r=jgilbert

This commit is contained in:
Benoit Jacob
2013-12-03 13:44:38 -05:00
parent a2f3873267
commit 60c89f7fe7
8 changed files with 432 additions and 426 deletions

View File

@@ -54,6 +54,7 @@ using namespace mozilla;
#include "GLContextProvider.h"
#include "GLContext.h"
#include "TexturePoolOGL.h"
#include "GLSharedHandleHelpers.h"
using namespace mozilla::gl;
@@ -138,9 +139,10 @@ public:
return 0;
SharedTextureHandle handle =
sPluginContext->CreateSharedHandle(gl::SameProcess,
(void*)mTextureInfo.mTexture,
gl::TextureID);
gl::CreateSharedHandle(sPluginContext,
gl::SameProcess,
(void*)mTextureInfo.mTexture,
gl::TextureID);
// We want forget about this now, so delete the texture. Assigning it to zero
// ensures that we create a new one in Lock()
@@ -1018,9 +1020,10 @@ SharedTextureHandle nsNPAPIPluginInstance::CreateSharedHandle()
return mContentTexture->CreateSharedHandle();
} else if (mContentSurface) {
EnsureGLContext();
return sPluginContext->CreateSharedHandle(gl::SameProcess,
mContentSurface,
gl::SurfaceTexture);
return gl::CreateSharedHandle(sPluginContext,
gl::SameProcess,
mContentSurface,
gl::SurfaceTexture);
} else return 0;
}