| 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 6367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6378 if (!location) | 6378 if (!location) |
| 6379 return false; | 6379 return false; |
| 6380 if (location->program() != m_currentProgram) { | 6380 if (location->program() != m_currentProgram) { |
| 6381 synthesizeGLError(GL_INVALID_OPERATION, functionName, "location is not f
rom current program"); | 6381 synthesizeGLError(GL_INVALID_OPERATION, functionName, "location is not f
rom current program"); |
| 6382 return false; | 6382 return false; |
| 6383 } | 6383 } |
| 6384 if (!v) { | 6384 if (!v) { |
| 6385 synthesizeGLError(GL_INVALID_VALUE, functionName, "no array"); | 6385 synthesizeGLError(GL_INVALID_VALUE, functionName, "no array"); |
| 6386 return false; | 6386 return false; |
| 6387 } | 6387 } |
| 6388 if (transpose) { | 6388 if (transpose && !isWebGL2OrHigher()) { |
| 6389 synthesizeGLError(GL_INVALID_VALUE, functionName, "transpose not FALSE")
; | 6389 synthesizeGLError(GL_INVALID_VALUE, functionName, "transpose not FALSE")
; |
| 6390 return false; | 6390 return false; |
| 6391 } | 6391 } |
| 6392 if (size < requiredMinSize || (size % requiredMinSize)) { | 6392 if (size < requiredMinSize || (size % requiredMinSize)) { |
| 6393 synthesizeGLError(GL_INVALID_VALUE, functionName, "invalid size"); | 6393 synthesizeGLError(GL_INVALID_VALUE, functionName, "invalid size"); |
| 6394 return false; | 6394 return false; |
| 6395 } | 6395 } |
| 6396 return true; | 6396 return true; |
| 6397 } | 6397 } |
| 6398 | 6398 |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6931 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, 1); | 6931 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, 1); |
| 6932 } | 6932 } |
| 6933 | 6933 |
| 6934 void WebGLRenderingContextBase::restoreUnpackParameters() | 6934 void WebGLRenderingContextBase::restoreUnpackParameters() |
| 6935 { | 6935 { |
| 6936 if (m_unpackAlignment != 1) | 6936 if (m_unpackAlignment != 1) |
| 6937 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); | 6937 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); |
| 6938 } | 6938 } |
| 6939 | 6939 |
| 6940 } // namespace blink | 6940 } // namespace blink |
| OLD | NEW |