TextureMapperGC3DPlatformLayer.h [plain text]
#pragma once
#if ENABLE(GRAPHICS_CONTEXT_3D) && USE(TEXTURE_MAPPER)
#include "GraphicsContext3D.h"
#include "PlatformLayer.h"
#include "TextureMapperPlatformLayer.h"
#include "TextureMapperPlatformLayerProxyProvider.h"
namespace WebCore {
class BitmapTextureGL;
class GLContext;
class TextureMapperPlatformLayerProxy;
class TextureMapperGC3DPlatformLayer : public PlatformLayer {
public:
TextureMapperGC3DPlatformLayer(GraphicsContext3D&, GraphicsContext3D::RenderStyle);
virtual ~TextureMapperGC3DPlatformLayer();
bool makeContextCurrent();
PlatformGraphicsContext3D platformContext();
#if USE(COORDINATED_GRAPHICS_THREADED)
RefPtr<TextureMapperPlatformLayerProxy> proxy() const override;
void swapBuffersIfNeeded() override;
#else
virtual void paintToTextureMapper(TextureMapper&, const FloatRect& target, const TransformationMatrix&, float opacity);
#endif
private:
GraphicsContext3D& m_context;
std::unique_ptr<GLContext> m_glContext;
#if USE(COORDINATED_GRAPHICS_THREADED)
RefPtr<TextureMapperPlatformLayerProxy> m_platformLayerProxy;
RefPtr<BitmapTextureGL> m_compositorTexture;
#endif
};
}
#endif // ENABLE(GRAPHICS_CONTEXT_3D) && USE(TEXTURE_MAPPER)