зеркало из https://github.com/mozilla/gecko-dev.git
Bug 866952: Unregister from old GrallocBufferActor when switching buffers. r=bjacob
This commit is contained in:
Родитель
bf3eb8c117
Коммит
b985c54147
|
@ -175,6 +175,7 @@ NS_MEMORY_REPORTER_IMPLEMENT(GrallocBufferActor,
|
|||
|
||||
GrallocBufferActor::GrallocBufferActor()
|
||||
: mAllocBytes(0)
|
||||
, mTextureHost(nullptr)
|
||||
{
|
||||
static bool registered;
|
||||
if (!registered) {
|
||||
|
@ -185,8 +186,6 @@ GrallocBufferActor::GrallocBufferActor()
|
|||
NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(GrallocBufferActor));
|
||||
registered = true;
|
||||
}
|
||||
|
||||
mTextureHost = nullptr;
|
||||
}
|
||||
|
||||
GrallocBufferActor::~GrallocBufferActor()
|
||||
|
|
|
@ -692,6 +692,11 @@ GrallocTextureHostOGL::SwapTexturesImpl(const SurfaceDescriptor& aImage,
|
|||
{
|
||||
MOZ_ASSERT(aImage.type() == SurfaceDescriptor::TSurfaceDescriptorGralloc);
|
||||
|
||||
if (mBuffer) {
|
||||
// only done for hacky fix in gecko 23 for bug 862324.
|
||||
RegisterTextureHostAtGrallocBufferActor(nullptr, *mBuffer);
|
||||
}
|
||||
|
||||
const SurfaceDescriptorGralloc& desc = aImage.get_SurfaceDescriptorGralloc();
|
||||
mGraphicBuffer = GrallocBufferActor::GetFrom(desc);
|
||||
mFormat = SurfaceFormatForAndroidPixelFormat(mGraphicBuffer->getPixelFormat());
|
||||
|
|
Загрузка…
Ссылка в новой задаче