Bug 1251155 - Remove GLContext from VideoDataDecoder r=snorp

This commit is contained in:
Sotaro Ikeda 2016-02-25 17:11:55 -08:00
parent d0cf165cb7
commit 0a5903a5e9
2 changed files with 2 additions and 22 deletions

View File

@ -4,12 +4,8 @@
#include "AndroidDecoderModule.h"
#include "AndroidBridge.h"
#include "GLBlitHelper.h"
#include "GLContext.h"
#include "GLContextEGL.h"
#include "GLContextProvider.h"
#include "AndroidSurfaceTexture.h"
#include "GLImages.h"
#include "GLLibraryEGL.h"
#include "MediaData.h"
#include "MediaInfo.h"
@ -107,7 +103,6 @@ public:
void Cleanup() override
{
mGLContext = nullptr;
}
nsresult Input(MediaRawData* aSample) override
@ -118,10 +113,6 @@ public:
nsresult PostOutput(BufferInfo::Param aInfo, MediaFormat::Param aFormat,
const TimeUnit& aDuration) override
{
if (!EnsureGLContext()) {
return NS_ERROR_FAILURE;
}
RefPtr<layers::Image> img =
new SurfaceTextureImage(mSurfaceTexture.get(), mConfig.mDisplay,
gl::OriginPos::BottomLeft);
@ -155,20 +146,9 @@ public:
}
protected:
bool EnsureGLContext()
{
if (mGLContext) {
return true;
}
mGLContext = GLContextProvider::CreateHeadless(CreateContextFlags::NONE);
return mGLContext;
}
layers::ImageContainer* mImageContainer;
const VideoInfo& mConfig;
RefPtr<AndroidSurfaceTexture> mSurfaceTexture;
RefPtr<GLContext> mGLContext;
};
class AudioDataDecoder : public MediaCodecDataDecoder

View File

@ -6,9 +6,9 @@
#define AndroidDecoderModule_h_
#include "PlatformDecoderModule.h"
#include "AndroidSurfaceTexture.h"
#include "MediaCodec.h"
#include "SurfaceTexture.h"
#include "TimeUnits.h"
#include "mozilla/Monitor.h"