Files
tubestation/gfx/layers/opengl/TextureClientOGL.cpp
Jeff Muizelaar 35694508c6 Bug 860466: Properly deal with SharedTextureHostOGL. r=nical
There were a number of issues with the current implementation. It couldn't deal
with NULL mSharedHandles. Additionally it was binding things to the wrong
samplers. Finally it was not properly setting the texture transform (which
defaults to all 0). Finally in a debug build an assert would be hit upon client
shutdown due to it not clearing mDescriptor.

This patch fixes all of those issues which makes flash work again.
2013-04-11 19:42:26 -04:00

43 lines
1.2 KiB
C++

/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/layers/TextureClientOGL.h"
#include "GLContext.h"
using namespace mozilla::gl;
namespace mozilla {
namespace layers {
TextureClientSharedOGL::TextureClientSharedOGL(CompositableForwarder* aForwarder,
CompositableType aCompositableType)
: TextureClient(aForwarder, aCompositableType)
, mGL(nullptr)
{
}
void
TextureClientSharedOGL::ReleaseResources()
{
if (!IsSurfaceDescriptorValid(mDescriptor)) {
return;
}
MOZ_ASSERT(mDescriptor.type() == SurfaceDescriptor::TSharedTextureDescriptor);
mDescriptor = SurfaceDescriptor();
// It's important our handle gets released! SharedTextureHostOGL will take
// care of this for us though.
}
void
TextureClientSharedOGL::EnsureAllocated(gfx::IntSize aSize,
gfxASurface::gfxContentType aContentType)
{
mSize = aSize;
}
} // namespace
} // namespace