| 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 3483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3494 synthesizeGLError(GL_INVALID_ENUM, "getVertexAttrib", "invalid parameter
name"); | 3494 synthesizeGLError(GL_INVALID_ENUM, "getVertexAttrib", "invalid parameter
name"); |
| 3495 return ScriptValue::createNull(scriptState); | 3495 return ScriptValue::createNull(scriptState); |
| 3496 } | 3496 } |
| 3497 } | 3497 } |
| 3498 | 3498 |
| 3499 long long WebGLRenderingContextBase::getVertexAttribOffset(GLuint index, GLenum
pname) | 3499 long long WebGLRenderingContextBase::getVertexAttribOffset(GLuint index, GLenum
pname) |
| 3500 { | 3500 { |
| 3501 if (isContextLost()) | 3501 if (isContextLost()) |
| 3502 return 0; | 3502 return 0; |
| 3503 GLvoid* result = nullptr; | 3503 GLvoid* result = nullptr; |
| 3504 // NOTE: If pname is ever a value that returns more then 1 element | 3504 // NOTE: If pname is ever a value that returns more than 1 element |
| 3505 // this will corrupt memory. | 3505 // this will corrupt memory. |
| 3506 contextGL()->GetVertexAttribPointerv(index, pname, &result); | 3506 contextGL()->GetVertexAttribPointerv(index, pname, &result); |
| 3507 return static_cast<long long>(reinterpret_cast<intptr_t>(result)); | 3507 return static_cast<long long>(reinterpret_cast<intptr_t>(result)); |
| 3508 } | 3508 } |
| 3509 | 3509 |
| 3510 void WebGLRenderingContextBase::hint(GLenum target, GLenum mode) | 3510 void WebGLRenderingContextBase::hint(GLenum target, GLenum mode) |
| 3511 { | 3511 { |
| 3512 if (isContextLost()) | 3512 if (isContextLost()) |
| 3513 return; | 3513 return; |
| 3514 bool isValid = false; | 3514 bool isValid = false; |
| (...skipping 2976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6491 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); | 6491 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); |
| 6492 } | 6492 } |
| 6493 | 6493 |
| 6494 void WebGLRenderingContextBase::restoreUnpackParameters() | 6494 void WebGLRenderingContextBase::restoreUnpackParameters() |
| 6495 { | 6495 { |
| 6496 if (m_unpackAlignment != 1) | 6496 if (m_unpackAlignment != 1) |
| 6497 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); | 6497 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); |
| 6498 } | 6498 } |
| 6499 | 6499 |
| 6500 } // namespace blink | 6500 } // namespace blink |
| OLD | NEW |