| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 2899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2910 return WebGLAny(scriptState, String("WebKit")); | 2910 return WebGLAny(scriptState, String("WebKit")); |
| 2911 case GL_VERSION: | 2911 case GL_VERSION: |
| 2912 return WebGLAny(scriptState, "WebGL 1.0 (" + String(contextGL()->GetStri
ng(GL_VERSION)) + ")"); | 2912 return WebGLAny(scriptState, "WebGL 1.0 (" + String(contextGL()->GetStri
ng(GL_VERSION)) + ")"); |
| 2913 case GL_VIEWPORT: | 2913 case GL_VIEWPORT: |
| 2914 return getWebGLIntArrayParameter(scriptState, pname); | 2914 return getWebGLIntArrayParameter(scriptState, pname); |
| 2915 case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES: // OES_standard_derivatives | 2915 case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES: // OES_standard_derivatives |
| 2916 if (extensionEnabled(OESStandardDerivativesName) || isWebGL2OrHigher()) | 2916 if (extensionEnabled(OESStandardDerivativesName) || isWebGL2OrHigher()) |
| 2917 return getUnsignedIntParameter(scriptState, GL_FRAGMENT_SHADER_DERIV
ATIVE_HINT_OES); | 2917 return getUnsignedIntParameter(scriptState, GL_FRAGMENT_SHADER_DERIV
ATIVE_HINT_OES); |
| 2918 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na
me, OES_standard_derivatives not enabled"); | 2918 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na
me, OES_standard_derivatives not enabled"); |
| 2919 return ScriptValue::createNull(scriptState); | 2919 return ScriptValue::createNull(scriptState); |
| 2920 case WebGLDebugRendererInfo::UNMASKED_RENDERER_WEBGL: | 2920 case WebGLDebugRendererInfo::kUnmaskedRendererWebgl: |
| 2921 if (extensionEnabled(WebGLDebugRendererInfoName)) | 2921 if (extensionEnabled(WebGLDebugRendererInfoName)) |
| 2922 return WebGLAny(scriptState, String(contextGL()->GetString(GL_RENDER
ER))); | 2922 return WebGLAny(scriptState, String(contextGL()->GetString(GL_RENDER
ER))); |
| 2923 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na
me, WEBGL_debug_renderer_info not enabled"); | 2923 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na
me, WEBGL_debug_renderer_info not enabled"); |
| 2924 return ScriptValue::createNull(scriptState); | 2924 return ScriptValue::createNull(scriptState); |
| 2925 case WebGLDebugRendererInfo::UNMASKED_VENDOR_WEBGL: | 2925 case WebGLDebugRendererInfo::kUnmaskedVendorWebgl: |
| 2926 if (extensionEnabled(WebGLDebugRendererInfoName)) | 2926 if (extensionEnabled(WebGLDebugRendererInfoName)) |
| 2927 return WebGLAny(scriptState, String(contextGL()->GetString(GL_VENDOR
))); | 2927 return WebGLAny(scriptState, String(contextGL()->GetString(GL_VENDOR
))); |
| 2928 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na
me, WEBGL_debug_renderer_info not enabled"); | 2928 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na
me, WEBGL_debug_renderer_info not enabled"); |
| 2929 return ScriptValue::createNull(scriptState); | 2929 return ScriptValue::createNull(scriptState); |
| 2930 case GL_VERTEX_ARRAY_BINDING_OES: // OES_vertex_array_object | 2930 case GL_VERTEX_ARRAY_BINDING_OES: // OES_vertex_array_object |
| 2931 if (extensionEnabled(OESVertexArrayObjectName) || isWebGL2OrHigher()) { | 2931 if (extensionEnabled(OESVertexArrayObjectName) || isWebGL2OrHigher()) { |
| 2932 if (!m_boundVertexArrayObject->isDefaultObject()) | 2932 if (!m_boundVertexArrayObject->isDefaultObject()) |
| 2933 return WebGLAny(scriptState, m_boundVertexArrayObject.get()); | 2933 return WebGLAny(scriptState, m_boundVertexArrayObject.get()); |
| 2934 return ScriptValue::createNull(scriptState); | 2934 return ScriptValue::createNull(scriptState); |
| 2935 } | 2935 } |
| (...skipping 3554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6490 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); | 6490 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); |
| 6491 } | 6491 } |
| 6492 | 6492 |
| 6493 void WebGLRenderingContextBase::restoreUnpackParameters() | 6493 void WebGLRenderingContextBase::restoreUnpackParameters() |
| 6494 { | 6494 { |
| 6495 if (m_unpackAlignment != 1) | 6495 if (m_unpackAlignment != 1) |
| 6496 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); | 6496 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); |
| 6497 } | 6497 } |
| 6498 | 6498 |
| 6499 } // namespace blink | 6499 } // namespace blink |
| OLD | NEW |