mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 12:20:56 +00:00
Bug 1251155 - Remove GLContext from VideoDataDecoder r=snorp
This commit is contained in:
parent
d0cf165cb7
commit
0a5903a5e9
@ -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
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user