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 2749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2760 return WebGLAny(scriptState, maxColorAttachments()); | 2760 return WebGLAny(scriptState, maxColorAttachments()); |
2761 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na
me, WEBGL_draw_buffers not enabled"); | 2761 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na
me, WEBGL_draw_buffers not enabled"); |
2762 return ScriptValue::createNull(scriptState); | 2762 return ScriptValue::createNull(scriptState); |
2763 case GL_MAX_DRAW_BUFFERS_EXT: | 2763 case GL_MAX_DRAW_BUFFERS_EXT: |
2764 if (extensionEnabled(WebGLDrawBuffersName) || isWebGL2OrHigher()) | 2764 if (extensionEnabled(WebGLDrawBuffersName) || isWebGL2OrHigher()) |
2765 return WebGLAny(scriptState, maxDrawBuffers()); | 2765 return WebGLAny(scriptState, maxDrawBuffers()); |
2766 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na
me, WEBGL_draw_buffers not enabled"); | 2766 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na
me, WEBGL_draw_buffers not enabled"); |
2767 return ScriptValue::createNull(scriptState); | 2767 return ScriptValue::createNull(scriptState); |
2768 case GL_TIMESTAMP_EXT: | 2768 case GL_TIMESTAMP_EXT: |
2769 if (extensionEnabled(EXTDisjointTimerQueryName)) | 2769 if (extensionEnabled(EXTDisjointTimerQueryName)) |
2770 return getInt64Parameter(scriptState, GL_TIMESTAMP_EXT); | 2770 return WebGLAny(scriptState, 0); |
2771 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na
me, EXT_disjoint_timer_query not enabled"); | 2771 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na
me, EXT_disjoint_timer_query not enabled"); |
2772 return ScriptValue::createNull(scriptState); | 2772 return ScriptValue::createNull(scriptState); |
2773 case GL_GPU_DISJOINT_EXT: | 2773 case GL_GPU_DISJOINT_EXT: |
2774 if (extensionEnabled(EXTDisjointTimerQueryName)) | 2774 if (extensionEnabled(EXTDisjointTimerQueryName)) |
2775 return getBooleanParameter(scriptState, GL_GPU_DISJOINT_EXT); | 2775 return getBooleanParameter(scriptState, GL_GPU_DISJOINT_EXT); |
2776 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na
me, EXT_disjoint_timer_query not enabled"); | 2776 synthesizeGLError(GL_INVALID_ENUM, "getParameter", "invalid parameter na
me, EXT_disjoint_timer_query not enabled"); |
2777 return ScriptValue::createNull(scriptState); | 2777 return ScriptValue::createNull(scriptState); |
2778 | 2778 |
2779 default: | 2779 default: |
2780 if ((extensionEnabled(WebGLDrawBuffersName) || isWebGL2OrHigher()) | 2780 if ((extensionEnabled(WebGLDrawBuffersName) || isWebGL2OrHigher()) |
(...skipping 3514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6295 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, 1); | 6295 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, 1); |
6296 } | 6296 } |
6297 | 6297 |
6298 void WebGLRenderingContextBase::restoreUnpackParameters() | 6298 void WebGLRenderingContextBase::restoreUnpackParameters() |
6299 { | 6299 { |
6300 if (m_unpackAlignment != 1) | 6300 if (m_unpackAlignment != 1) |
6301 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); | 6301 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); |
6302 } | 6302 } |
6303 | 6303 |
6304 } // namespace blink | 6304 } // namespace blink |
OLD | NEW |