summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/src/GraphicsContext3D.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-05-11 18:35:50 +0100
committerBen Murdoch <benm@google.com>2010-05-14 10:23:05 +0100
commit21939df44de1705786c545cd1bf519d47250322d (patch)
treeef56c310f5c0cdc379c2abb2e212308a3281ce20 /WebKit/chromium/src/GraphicsContext3D.cpp
parent4ff1d8891d520763f17675827154340c7c740f90 (diff)
downloadexternal_webkit-21939df44de1705786c545cd1bf519d47250322d.zip
external_webkit-21939df44de1705786c545cd1bf519d47250322d.tar.gz
external_webkit-21939df44de1705786c545cd1bf519d47250322d.tar.bz2
Merge Webkit at r58956: Initial merge by Git.
Change-Id: I1d9fb60ea2c3f2ddc04c17a871acdb39353be228
Diffstat (limited to 'WebKit/chromium/src/GraphicsContext3D.cpp')
-rw-r--r--WebKit/chromium/src/GraphicsContext3D.cpp43
1 files changed, 12 insertions, 31 deletions
diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3D.cpp
index 0f9c959..e51f433 100644
--- a/WebKit/chromium/src/GraphicsContext3D.cpp
+++ b/WebKit/chromium/src/GraphicsContext3D.cpp
@@ -111,6 +111,8 @@ public:
void beginPaint(WebGLRenderingContext* context);
void endPaint();
+ bool isGLES2Compliant() const;
+
//----------------------------------------------------------------------
// Entry points for WebGL.
//
@@ -617,6 +619,11 @@ rt GraphicsContext3DInternal::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6, t7
DELEGATE_TO_IMPL_R(makeContextCurrent, bool)
DELEGATE_TO_IMPL_1R(sizeInBytes, int, int)
+bool GraphicsContext3DInternal::isGLES2Compliant() const
+{
+ return m_impl->isGLES2Compliant();
+}
+
DELEGATE_TO_IMPL_1(activeTexture, unsigned long)
DELEGATE_TO_IMPL_2_X12(attachShader, WebGLProgram*, WebGLShader*)
@@ -1202,41 +1209,10 @@ DELEGATE_TO_INTERNAL_3(stencilOp, unsigned long, unsigned long, unsigned long)
DELEGATE_TO_INTERNAL_4(stencilOpSeparate, unsigned long, unsigned long, unsigned long, unsigned long)
DELEGATE_TO_INTERNAL_9R(texImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, void*, int)
-
-int GraphicsContext3D::texImage2D(unsigned target, unsigned level, Image* image,
- bool flipY, bool premultiplyAlpha)
-{
- Vector<uint8_t> imageData;
- unsigned int format, internalFormat;
- if (!extractImageData(image, flipY, premultiplyAlpha, imageData, &format, &internalFormat))
- return -1;
- return m_internal->texImage2D(target, level, internalFormat,
- image->width(), image->height(), 0,
- format, UNSIGNED_BYTE, imageData.data());
-}
-
DELEGATE_TO_INTERNAL_3(texParameterf, unsigned, unsigned, float)
DELEGATE_TO_INTERNAL_3(texParameteri, unsigned, unsigned, int)
-
DELEGATE_TO_INTERNAL_9R(texSubImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, void*, int)
-int GraphicsContext3D::texSubImage2D(unsigned target,
- unsigned level,
- unsigned xoffset,
- unsigned yoffset,
- Image* image,
- bool flipY,
- bool premultiplyAlpha)
-{
- Vector<uint8_t> imageData;
- unsigned int format, internalFormat;
- if (!extractImageData(image, flipY, premultiplyAlpha, imageData, &format, &internalFormat))
- return -1;
- return m_internal->texSubImage2D(target, level, xoffset, yoffset,
- image->width(), image->height(),
- format, UNSIGNED_BYTE, imageData.data());
-}
-
DELEGATE_TO_INTERNAL_2(uniform1f, long, float)
DELEGATE_TO_INTERNAL_3(uniform1fv, long, float*, int)
DELEGATE_TO_INTERNAL_2(uniform1i, long, int)
@@ -1291,6 +1267,11 @@ DELEGATE_TO_INTERNAL_1(deleteTexture, unsigned)
DELEGATE_TO_INTERNAL_1(synthesizeGLError, unsigned long)
+bool GraphicsContext3D::isGLES2Compliant() const
+{
+ return m_internal->isGLES2Compliant();
+}
+
} // namespace WebCore
#endif // ENABLE(3D_CANVAS)