summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/GraphicsContext3D.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-10-22 13:02:20 +0100
committerBen Murdoch <benm@google.com>2010-10-26 15:21:41 +0100
commita94275402997c11dd2e778633dacf4b7e630a35d (patch)
treee66f56c67e3b01f22c9c23cd932271ee9ac558ed /WebCore/platform/graphics/GraphicsContext3D.h
parent09e26c78506587b3f5d930d7bc72a23287ffbec0 (diff)
downloadexternal_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.zip
external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.gz
external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.bz2
Merge WebKit at r70209: Initial merge by Git
Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e
Diffstat (limited to 'WebCore/platform/graphics/GraphicsContext3D.h')
-rw-r--r--WebCore/platform/graphics/GraphicsContext3D.h43
1 files changed, 34 insertions, 9 deletions
diff --git a/WebCore/platform/graphics/GraphicsContext3D.h b/WebCore/platform/graphics/GraphicsContext3D.h
index a12b1c4..d74c97c 100644
--- a/WebCore/platform/graphics/GraphicsContext3D.h
+++ b/WebCore/platform/graphics/GraphicsContext3D.h
@@ -26,16 +26,12 @@
#ifndef GraphicsContext3D_h
#define GraphicsContext3D_h
-#if PLATFORM(MAC)
-#include "ANGLEWebKitBridge.h"
-#endif
#include "GraphicsLayer.h"
#include "PlatformString.h"
#include <wtf/HashMap.h>
#include <wtf/ListHashSet.h>
#include <wtf/Noncopyable.h>
-#include <wtf/PassOwnPtr.h>
// FIXME: Find a better way to avoid the name confliction for NO_ERROR.
#if ((PLATFORM(CHROMIUM) && OS(WINDOWS)) || PLATFORM(WIN) || (PLATFORM(QT) && OS(WINDOWS)))
@@ -43,6 +39,7 @@
#endif
#if PLATFORM(MAC)
+#include "ANGLEWebKitBridge.h"
#include <OpenGL/OpenGL.h>
#include <wtf/RetainPtr.h>
@@ -78,6 +75,7 @@ const Platform3DObject NullPlatform3DObject = 0;
namespace WebCore {
class CanvasRenderingContext;
+class DrawingBuffer;
class HostWindow;
class Image;
class ImageData;
@@ -94,7 +92,7 @@ struct ActiveInfo {
class GraphicsContext3DInternal;
#endif
-class GraphicsContext3D : public Noncopyable {
+class GraphicsContext3D : public RefCounted<GraphicsContext3D> {
public:
enum WebGLEnumType {
DEPTH_BUFFER_BIT = 0x00000100,
@@ -409,7 +407,13 @@ public:
// GL_CHROMIUM_map_sub (enums inherited from GL_ARB_vertex_buffer_object)
READ_ONLY = 0x88B8,
- WRITE_ONLY = 0x88B9
+ WRITE_ONLY = 0x88B9,
+
+ // GL_ARB_robustness enums
+ GUILTY_CONTEXT_RESET_ARB = 0x8253,
+ INNOCENT_CONTEXT_RESET_ARB = 0x8254,
+ UNKNOWN_CONTEXT_RESET_ARB = 0x8255
+
};
// Context creation attributes.
@@ -435,8 +439,8 @@ public:
RenderDirectlyToHostWindow
};
- static PassOwnPtr<GraphicsContext3D> create(Attributes attrs, HostWindow* hostWindow, RenderStyle renderStyle = RenderOffscreen);
- virtual ~GraphicsContext3D();
+ static PassRefPtr<GraphicsContext3D> create(Attributes, HostWindow*, RenderStyle = RenderOffscreen);
+ ~GraphicsContext3D();
#if PLATFORM(MAC)
PlatformGraphicsContext3D platformGraphicsContext3D() const { return m_contextObj; }
@@ -463,6 +467,8 @@ public:
#endif
void makeContextCurrent();
+ PassRefPtr<DrawingBuffer> createDrawingBuffer(const IntSize& = IntSize());
+
#if PLATFORM(MAC) || PLATFORM(CHROMIUM)
// With multisampling on, blit from multisampleFBO to regular FBO.
void prepareTexture();
@@ -535,16 +541,32 @@ public:
// by non-member functions.
enum SourceDataFormat {
kSourceFormatRGBA8,
+ kSourceFormatRGBA16Little,
+ kSourceFormatRGBA16Big,
kSourceFormatRGB8,
+ kSourceFormatRGB16Little,
+ kSourceFormatRGB16Big,
kSourceFormatBGRA8,
+ kSourceFormatBGRA16Little,
+ kSourceFormatBGRA16Big,
kSourceFormatARGB8,
+ kSourceFormatARGB16Little,
+ kSourceFormatARGB16Big,
kSourceFormatRGBA5551,
kSourceFormatRGBA4444,
kSourceFormatRGB565,
kSourceFormatR8,
+ kSourceFormatR16Little,
+ kSourceFormatR16Big,
kSourceFormatRA8,
+ kSourceFormatRA16Little,
+ kSourceFormatRA16Big,
kSourceFormatAR8,
- kSourceFormatA8
+ kSourceFormatAR16Little,
+ kSourceFormatAR16Big,
+ kSourceFormatA8,
+ kSourceFormatA16Little,
+ kSourceFormatA16Big
};
//----------------------------------------------------------------------
@@ -777,6 +799,9 @@ public:
bool supportsCopyTextureToParentTextureCHROMIUM();
void copyTextureToParentTextureCHROMIUM(unsigned texture, unsigned parentTexture);
+ // GL_ARB_robustness
+ int getGraphicsResetStatusARB();
+
private:
GraphicsContext3D(Attributes attrs, HostWindow* hostWindow, bool renderDirectlyToHostWindow);