зеркало из https://github.com/mozilla/gecko-dev.git
Bug 616608 - Pass the rest of webgl-specific.html test (sections 6.4, 6.5, 6.7 of the spec) - part 3/3: formally support COLORSPACE_CONVERSION (just accessors) - r=vlad
This commit is contained in:
Родитель
fa24aa0a34
Коммит
ac2bfd9b59
|
@ -99,6 +99,7 @@ WebGLContext::WebGLContext()
|
|||
mSynthesizedGLError = LOCAL_GL_NO_ERROR;
|
||||
mPixelStoreFlipY = PR_FALSE;
|
||||
mPixelStorePremultiplyAlpha = PR_FALSE;
|
||||
mPixelStoreColorspaceConversion = BROWSER_DEFAULT_WEBGL;
|
||||
|
||||
mShaderValidation = PR_TRUE;
|
||||
|
||||
|
|
|
@ -526,7 +526,7 @@ protected:
|
|||
nsRefPtrHashtable<nsUint32HashKey, WebGLRenderbuffer> mMapRenderbuffers;
|
||||
|
||||
// PixelStore parameters
|
||||
PRUint32 mPixelStorePackAlignment, mPixelStoreUnpackAlignment;
|
||||
PRUint32 mPixelStorePackAlignment, mPixelStoreUnpackAlignment, mPixelStoreColorspaceConversion;
|
||||
PRBool mPixelStoreFlipY, mPixelStorePremultiplyAlpha;
|
||||
|
||||
FakeBlackStatus mFakeBlackStatus;
|
||||
|
|
|
@ -1513,7 +1513,6 @@ WebGLContext::GetParameter(PRUint32 pname, nsIVariant **retval)
|
|||
case LOCAL_GL_ALPHA_BITS:
|
||||
case LOCAL_GL_DEPTH_BITS:
|
||||
case LOCAL_GL_STENCIL_BITS:
|
||||
case UNPACK_COLORSPACE_CONVERSION_WEBGL:
|
||||
{
|
||||
GLint i = 0;
|
||||
gl->fGetIntegerv(pname, &i);
|
||||
|
@ -1598,6 +1597,11 @@ WebGLContext::GetParameter(PRUint32 pname, nsIVariant **retval)
|
|||
wrval->SetAsBool(mPixelStorePremultiplyAlpha);
|
||||
break;
|
||||
|
||||
// uint, WebGL-specific
|
||||
case UNPACK_COLORSPACE_CONVERSION_WEBGL:
|
||||
wrval->SetAsUint32(mPixelStoreColorspaceConversion);
|
||||
break;
|
||||
|
||||
//
|
||||
// Complex values
|
||||
//
|
||||
|
@ -2474,6 +2478,12 @@ WebGLContext::PixelStorei(WebGLenum pname, WebGLint param)
|
|||
case UNPACK_PREMULTIPLY_ALPHA_WEBGL:
|
||||
mPixelStorePremultiplyAlpha = (param != 0);
|
||||
break;
|
||||
case UNPACK_COLORSPACE_CONVERSION_WEBGL:
|
||||
if (param == LOCAL_GL_NONE || param == BROWSER_DEFAULT_WEBGL)
|
||||
mPixelStoreColorspaceConversion = param;
|
||||
else
|
||||
return ErrorInvalidEnumInfo("pixelStorei: colorspace conversion parameter", param);
|
||||
break;
|
||||
case LOCAL_GL_PACK_ALIGNMENT:
|
||||
case LOCAL_GL_UNPACK_ALIGNMENT:
|
||||
if (param != 1 &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче