Extensions3DChromium.h [plain text]
#ifndef Extensions3DChromium_h
#define Extensions3DChromium_h
#include "Extensions3D.h"
namespace WebCore {
class GraphicsContext3DPrivate;
class ImageBuffer;
class Extensions3DChromium : public Extensions3D {
public:
virtual ~Extensions3DChromium();
virtual bool supports(const String&);
virtual void ensureEnabled(const String&);
virtual bool isEnabled(const String&);
virtual int getGraphicsResetStatusARB();
virtual void blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter);
virtual void renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height);
virtual Platform3DObject createVertexArrayOES();
virtual void deleteVertexArrayOES(Platform3DObject);
virtual GC3Dboolean isVertexArrayOES(Platform3DObject);
virtual void bindVertexArrayOES(Platform3DObject);
virtual String getTranslatedShaderSourceANGLE(Platform3DObject);
enum {
GL_TEXTURE_EXTERNAL_OES = 0x8D65,
READ_ONLY = 0x88B8,
WRITE_ONLY = 0x88B9,
GL_TEXTURE_USAGE_ANGLE = 0x93A2,
GL_FRAMEBUFFER_ATTACHMENT_ANGLE = 0x93A3,
BGRA8_EXT = 0x93A1,
ANY_SAMPLES_PASSED_EXT = 0x8C2F,
ANY_SAMPLES_PASSED_CONSERVATIVE_EXT = 0x8D6A,
CURRENT_QUERY_EXT = 0x8865,
QUERY_RESULT_EXT = 0x8866,
QUERY_RESULT_AVAILABLE_EXT = 0x8867,
COMMANDS_ISSUED_CHROMIUM = 0x84F2
};
void postSubBufferCHROMIUM(int x, int y, int width, int height);
void* mapBufferSubDataCHROMIUM(unsigned target, int offset, int size, unsigned access);
void unmapBufferSubDataCHROMIUM(const void*);
void* mapTexSubImage2DCHROMIUM(unsigned target, int level, int xoffset, int yoffset, int width, int height, unsigned format, unsigned type, unsigned access);
void unmapTexSubImage2DCHROMIUM(const void*);
void setVisibilityCHROMIUM(bool);
virtual void discardFramebufferEXT(GC3Denum target, GC3Dsizei numAttachments, const GC3Denum* attachments);
virtual void ensureFramebufferCHROMIUM();
struct GpuMemoryAllocationCHROMIUM {
size_t gpuResourceSizeInBytes;
bool suggestHaveBackbuffer;
GpuMemoryAllocationCHROMIUM(size_t gpuResourceSizeInBytes, bool suggestHaveBackbuffer)
: gpuResourceSizeInBytes(gpuResourceSizeInBytes)
, suggestHaveBackbuffer(suggestHaveBackbuffer)
{
}
};
class GpuMemoryAllocationChangedCallbackCHROMIUM {
public:
virtual void onGpuMemoryAllocationChanged(GpuMemoryAllocationCHROMIUM) = 0;
virtual ~GpuMemoryAllocationChangedCallbackCHROMIUM() { }
};
void setGpuMemoryAllocationChangedCallbackCHROMIUM(PassOwnPtr<GpuMemoryAllocationChangedCallbackCHROMIUM>);
class SwapBuffersCompleteCallbackCHROMIUM {
public:
virtual void onSwapBuffersComplete() = 0;
virtual ~SwapBuffersCompleteCallbackCHROMIUM() { }
};
void setSwapBuffersCompleteCallbackCHROMIUM(PassOwnPtr<SwapBuffersCompleteCallbackCHROMIUM>);
void rateLimitOffscreenContextCHROMIUM();
void paintFramebufferToCanvas(int framebuffer, int width, int height, bool premultiplyAlpha, ImageBuffer*);
void texImageIOSurface2DCHROMIUM(unsigned target, int width, int height, uint32_t ioSurfaceId, unsigned plane);
void texStorage2DEXT(unsigned target, int levels, unsigned internalformat, int width, int height);
Platform3DObject createQueryEXT();
void deleteQueryEXT(Platform3DObject);
GC3Dboolean isQueryEXT(Platform3DObject);
void beginQueryEXT(GC3Denum, Platform3DObject);
void endQueryEXT(GC3Denum);
void getQueryivEXT(GC3Denum, GC3Denum, GC3Dint*);
void getQueryObjectuivEXT(Platform3DObject, GC3Denum, GC3Duint*);
private:
friend class GraphicsContext3DPrivate;
explicit Extensions3DChromium(GraphicsContext3DPrivate*);
GraphicsContext3DPrivate* m_private;
};
}
#endif // Extensions3DChromium_h