| 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 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1428 } | 1428 } |
| 1429 | 1429 |
| 1430 if (count < 0 || offset < 0) { | 1430 if (count < 0 || offset < 0) { |
| 1431 m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE); | 1431 m_context->synthesizeGLError(GraphicsContext3D::INVALID_VALUE); |
| 1432 return; | 1432 return; |
| 1433 } | 1433 } |
| 1434 | 1434 |
| 1435 if (!count) | 1435 if (!count) |
| 1436 return; | 1436 return; |
| 1437 | 1437 |
| 1438 if (!m_boundElementArrayBuffer) { |
| 1439 m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION); |
| 1440 return; |
| 1441 } |
| 1442 |
| 1438 int numElements = 0; | 1443 int numElements = 0; |
| 1439 if (!isErrorGeneratedOnOutOfBoundsAccesses()) { | 1444 if (!isErrorGeneratedOnOutOfBoundsAccesses()) { |
| 1440 // Ensure we have a valid rendering state | 1445 // Ensure we have a valid rendering state |
| 1441 if (!validateElementArraySize(count, type, offset)) { | 1446 if (!validateElementArraySize(count, type, offset)) { |
| 1442 m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION); | 1447 m_context->synthesizeGLError(GraphicsContext3D::INVALID_OPERATION); |
| 1443 return; | 1448 return; |
| 1444 } | 1449 } |
| 1445 if (!count) | 1450 if (!count) |
| 1446 return; | 1451 return; |
| 1447 if (!validateIndexArrayConservative(type, numElements) || !validateRende
ringState(numElements)) { | 1452 if (!validateIndexArrayConservative(type, numElements) || !validateRende
ringState(numElements)) { |
| (...skipping 3171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4619 | 4624 |
| 4620 void WebGLRenderingContext::LRUImageBufferCache::bubbleToFront(int idx) | 4625 void WebGLRenderingContext::LRUImageBufferCache::bubbleToFront(int idx) |
| 4621 { | 4626 { |
| 4622 for (int i = idx; i > 0; --i) | 4627 for (int i = idx; i > 0; --i) |
| 4623 m_buffers[i].swap(m_buffers[i-1]); | 4628 m_buffers[i].swap(m_buffers[i-1]); |
| 4624 } | 4629 } |
| 4625 | 4630 |
| 4626 } // namespace WebCore | 4631 } // namespace WebCore |
| 4627 | 4632 |
| 4628 #endif // ENABLE(3D_CANVAS) | 4633 #endif // ENABLE(3D_CANVAS) |
| OLD | NEW |