diff options
author | Ben Murdoch <benm@google.com> | 2011-05-13 16:23:25 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-05-16 11:35:02 +0100 |
commit | 65f03d4f644ce73618e5f4f50dd694b26f55ae12 (patch) | |
tree | f478babb801e720de7bfaee23443ffe029f58731 /Source/WebCore/platform/graphics/GraphicsContext3D.h | |
parent | 47de4a2fb7262c7ebdb9cd133ad2c54c187454d0 (diff) | |
download | external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.zip external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.gz external_webkit-65f03d4f644ce73618e5f4f50dd694b26f55ae12.tar.bz2 |
Merge WebKit at r75993: Initial merge by git.
Change-Id: I602bbdc3974787a3b0450456a30a7868286921c3
Diffstat (limited to 'Source/WebCore/platform/graphics/GraphicsContext3D.h')
-rw-r--r-- | Source/WebCore/platform/graphics/GraphicsContext3D.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/GraphicsContext3D.h b/Source/WebCore/platform/graphics/GraphicsContext3D.h index a0d2778..10aa0d7 100644 --- a/Source/WebCore/platform/graphics/GraphicsContext3D.h +++ b/Source/WebCore/platform/graphics/GraphicsContext3D.h @@ -47,6 +47,8 @@ typedef unsigned int GC3Denum; typedef unsigned char GC3Dboolean; typedef unsigned int GC3Dbitfield; +typedef unsigned char GC3Dubyte; +typedef unsigned short GC3Dushort; typedef int GC3Dint; typedef int GC3Dsizei; typedef unsigned int GC3Duint; @@ -491,7 +493,8 @@ public: // Helper to texImage2D with pixel==0 case: pixels are initialized to 0. // Return true if no GL error is synthesized. - bool texImage2DResourceSafe(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type); + // By default, alignment is 4, the OpenGL default setting. + bool texImage2DResourceSafe(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dsizei width, GC3Dsizei height, GC3Dint border, GC3Denum format, GC3Denum type, GC3Dint alignment = 4); bool isGLES2Compliant() const; @@ -507,6 +510,19 @@ public: unsigned int* componentsPerPixel, unsigned int* bytesPerComponent); + // Computes the image size in bytes. If paddingInBytes is not null, padding + // is also calculated in return. Returns NO_ERROR if succeed, otherwise + // return the suggested GL error indicating the cause of the failure: + // INVALID_VALUE if width/height is negative or overflow happens. + // INVALID_ENUM if format/type is illegal. + GC3Denum computeImageSizeInBytes(GC3Denum format, + GC3Denum type, + GC3Dsizei width, + GC3Dsizei height, + GC3Dint alignment, + unsigned int* imageSizeInBytes, + unsigned int* paddingInBytes); + // Extracts the contents of the given Image into the passed Vector, // packing the pixel data according to the given format and type, // and obeying the flipY, premultiplyAlpha, and ignoreGammaAndColorProfile |