Merge mozilla-central and b2g-inbound

This commit is contained in:
Ed Morley 2013-09-17 15:22:02 +01:00
commit 7e518b8b1e
9 changed files with 30 additions and 18 deletions

View File

@ -1,4 +1,4 @@
{
"revision": "eb59735156986ce7a697063021ad74f1fca0bc12",
"revision": "c51f09ca8ebb043a7574334706116a971258a27b",
"repo_path": "/integration/gaia-central"
}

View File

@ -47,7 +47,7 @@ BEGIN_BLUETOOTH_NAMESPACE
// Major device class = 0x4, Audio/Video
// Minor device class = 0x1, Wearable Headset device
#define IS_HEADSET(cod) ((GET_MAJOR_SERVICE_CLASS(cod) == 0x4) && \
#define IS_HEADSET(cod) ((GET_MAJOR_DEVICE_CLASS(cod) == 0x4) && \
(GET_MINOR_DEVICE_CLASS(cod) == 0x1))
class BluetoothProfileManagerBase;

View File

@ -55,6 +55,7 @@ CompositableHost::AddTextureHost(TextureHost* aTexture)
RefPtr<TextureHost> second = mFirstTexture;
mFirstTexture = aTexture;
aTexture->SetNextSibling(second);
aTexture->SetCompositableQuirks(GetCompositableQuirks());
}
void

View File

@ -243,7 +243,6 @@ CompositableParentManager::ReceiveCompositableUpdate(const CompositableOperation
// on gonk, create EGLImage if possible.
// create EGLImage during buffer swap could reduce the graphic driver's task
// during rendering.
tex->SetCompositableQuirks(compositable->GetCompositableQuirks());
compositable->AddTextureHost(tex);
MOZ_ASSERT(compositable->GetTextureHost(op.textureID()) == tex.get());
break;

View File

@ -117,8 +117,7 @@ void GrallocTextureSourceOGL::BindTexture(GLenum aTextureUnit)
MOZ_ASSERT(gl());
gl()->MakeCurrent();
mQuirks->SetCompositor(mCompositor);
GLuint tex = static_cast<CompositableQuirksGonkOGL*>(mQuirks.get())->GetTexture();
GLuint tex = GetGLTexture();
GLuint textureTarget = GetTextureTarget();
gl()->fActiveTexture(aTextureUnit);
@ -179,8 +178,7 @@ GrallocTextureSourceOGL::SetCompositableQuirks(CompositableQuirks* aQuirks)
DeallocateDeviceData();
gl()->MakeCurrent();
mQuirks->SetCompositor(mCompositor);
GLuint tex = static_cast<CompositableQuirksGonkOGL*>(mQuirks.get())->GetTexture();
GLuint tex = GetGLTexture();
GLuint textureTarget = GetTextureTarget();
gl()->fActiveTexture(LOCAL_GL_TEXTURE0);
@ -310,8 +308,7 @@ GrallocTextureSourceOGL::GetAsSurface() {
MOZ_ASSERT(gl());
gl()->MakeCurrent();
mQuirks->SetCompositor(mCompositor);
GLuint tex = static_cast<CompositableQuirksGonkOGL*>(mQuirks.get())->GetTexture();
GLuint tex = GetGLTexture();
gl()->fActiveTexture(LOCAL_GL_TEXTURE0);
gl()->fBindTexture(GetTextureTarget(), tex);
if (!mEGLImage) {
@ -326,6 +323,13 @@ GrallocTextureSourceOGL::GetAsSurface() {
return surf.forget();
}
GLuint
GrallocTextureSourceOGL::GetGLTexture()
{
mQuirks->SetCompositor(mCompositor);
return static_cast<CompositableQuirksGonkOGL*>(mQuirks.get())->GetTexture();
}
void
GrallocTextureHostOGL::SetCompositableQuirks(CompositableQuirks* aQuirks)
{

View File

@ -62,6 +62,8 @@ public:
already_AddRefed<gfxImageSurface> GetAsSurface();
GLuint GetGLTexture();
protected:
CompositorOGL* mCompositor;
android::sp<android::GraphicBuffer> mGraphicBuffer;

View File

@ -1123,11 +1123,10 @@ GrallocDeprecatedTextureHostOGL::SwapTexturesImpl(const SurfaceDescriptor& aImag
mIsRBSwapped);
mTextureTarget = TextureTargetForAndroidPixelFormat(mGraphicBuffer->getPixelFormat());
mQuirks->SetCompositor(mCompositor);
GLuint tex = static_cast<CompositableQuirksGonkOGL*>(mQuirks.get())->GetTexture();
GLuint tex = GetGLTexture();
// delete old EGLImage
DeleteTextures();
#if 1
gl()->MakeCurrent();
gl()->fActiveTexture(LOCAL_GL_TEXTURE0);
gl()->fBindTexture(mTextureTarget, tex);
@ -1136,7 +1135,6 @@ GrallocDeprecatedTextureHostOGL::SwapTexturesImpl(const SurfaceDescriptor& aImag
// during rendering.
mEGLImage = gl()->CreateEGLImageForNativeBuffer(mGraphicBuffer->getNativeBuffer());
gl()->fEGLImageTargetTexture2D(mTextureTarget, mEGLImage);
#endif
}
@ -1163,8 +1161,7 @@ void GrallocDeprecatedTextureHostOGL::BindTexture(GLenum aTextureUnit)
MOZ_ASSERT(gl());
gl()->MakeCurrent();
mQuirks->SetCompositor(mCompositor);
GLuint tex = static_cast<CompositableQuirksGonkOGL*>(mQuirks.get())->GetTexture();
GLuint tex = GetGLTexture();
gl()->fActiveTexture(aTextureUnit);
gl()->fBindTexture(mTextureTarget, tex);
@ -1243,6 +1240,14 @@ GrallocDeprecatedTextureHostOGL::GetRenderState()
return LayerRenderState();
}
GLuint
GrallocDeprecatedTextureHostOGL::GetGLTexture()
{
mQuirks->SetCompositor(mCompositor);
return static_cast<CompositableQuirksGonkOGL*>(mQuirks.get())->GetTexture();
}
#endif // MOZ_WIDGET_GONK
already_AddRefed<gfxImageSurface>
@ -1300,8 +1305,7 @@ already_AddRefed<gfxImageSurface>
GrallocDeprecatedTextureHostOGL::GetAsSurface() {
gl()->MakeCurrent();
mQuirks->SetCompositor(mCompositor);
GLuint tex = static_cast<CompositableQuirksGonkOGL*>(mQuirks.get())->GetTexture();
GLuint tex = GetGLTexture();
gl()->fActiveTexture(LOCAL_GL_TEXTURE0);
gl()->fBindTexture(mTextureTarget, tex);
if (!mEGLImage) {

View File

@ -920,6 +920,8 @@ public:
virtual LayerRenderState GetRenderState() MOZ_OVERRIDE;
GLuint GetGLTexture();
private:
gl::GLContext* gl() const;

View File

@ -1,4 +1,4 @@
# Extensions we recognize for DeviceStorage storage areas
pictures=*.jpe; *.jpg; *.jpeg; *.gif; *.png; *.bmp;
music=*.mp3; *.ogg; *.m4a; *.m4b; *.m4p; *.m4r; *.3gp; *.mp4; *.m3u; *.pls; *.opus; *.amr; *.wav; *.lcka;
music=*.mp3; *.oga; *.ogg; *.m4a; *.m4b; *.m4p; *.m4r; *.3gp; *.mp4; *.m3u; *.pls; *.opus; *.amr; *.wav; *.lcka;
videos=*.mp4; *.mpeg; *.mpg; *.ogv; *.ogx; *.webm; *.3gp; *.ogg; *.m4v;