TextureMapperGC3DPlatformLayer.h [plain text]
#pragma once
#if ENABLE(GRAPHICS_CONTEXT_3D) && USE(TEXTURE_MAPPER) && !USE(NICOSIA)
#include "GraphicsContext3D.h"
#include "PlatformLayer.h"
#include "TextureMapperPlatformLayer.h"
#include "TextureMapperPlatformLayerProxyProvider.h"
namespace WebCore {
class GLContext;
class TextureMapperPlatformLayerProxy;
class TextureMapperGC3DPlatformLayer : public PlatformLayer {
WTF_MAKE_FAST_ALLOCATED;
public:
TextureMapperGC3DPlatformLayer(GraphicsContext3D&, GraphicsContext3D::Destination);
virtual ~TextureMapperGC3DPlatformLayer();
bool makeContextCurrent();
PlatformGraphicsContext3D platformContext() const;
#if USE(COORDINATED_GRAPHICS)
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)
RefPtr<TextureMapperPlatformLayerProxy> m_platformLayerProxy;
#endif
};
}
#endif // ENABLE(GRAPHICS_CONTEXT_3D) && USE(TEXTURE_MAPPER)