| 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 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1525 | 1525 |
| 1526 if (!validateCompressedTexSubDimensions("compressedTexSubImage2D", target, l
evel, xoffset, yoffset, width, height, format, tex)) | 1526 if (!validateCompressedTexSubDimensions("compressedTexSubImage2D", target, l
evel, xoffset, yoffset, width, height, format, tex)) |
| 1527 return; | 1527 return; |
| 1528 | 1528 |
| 1529 webContext()->compressedTexSubImage2D(target, level, xoffset, yoffset, | 1529 webContext()->compressedTexSubImage2D(target, level, xoffset, yoffset, |
| 1530 width, height, format, data->byteLength(), data->baseAddress()); | 1530 width, height, format, data->byteLength(), data->baseAddress()); |
| 1531 } | 1531 } |
| 1532 | 1532 |
| 1533 bool WebGLRenderingContextBase::validateSettableTexFormat(const char* functionNa
me, GLenum format) | 1533 bool WebGLRenderingContextBase::validateSettableTexFormat(const char* functionNa
me, GLenum format) |
| 1534 { | 1534 { |
| 1535 if (WebGLImageConversion::getClearBitsByFormat(format) & (GL_DEPTH_BUFFER_BI
T | GL_STENCIL_BUFFER_BIT)) { | 1535 if (WebGLImageConversion::getChannelBitsByFormat(format) & WebGLImageConvers
ion::ChannelDepthStencil) { |
| 1536 synthesizeGLError(GL_INVALID_OPERATION, functionName, "format can not be
set, only rendered to"); | 1536 synthesizeGLError(GL_INVALID_OPERATION, functionName, "format can not be
set, only rendered to"); |
| 1537 return false; | 1537 return false; |
| 1538 } | 1538 } |
| 1539 return true; | 1539 return true; |
| 1540 } | 1540 } |
| 1541 | 1541 |
| 1542 void WebGLRenderingContextBase::copyTexImage2D(GLenum target, GLint level, GLenu
m internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) | 1542 void WebGLRenderingContextBase::copyTexImage2D(GLenum target, GLint level, GLenu
m internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) |
| 1543 { | 1543 { |
| 1544 if (isContextLost()) | 1544 if (isContextLost()) |
| 1545 return; | 1545 return; |
| (...skipping 4665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6211 | 6211 |
| 6212 return totalBytesPerPixel; | 6212 return totalBytesPerPixel; |
| 6213 } | 6213 } |
| 6214 | 6214 |
| 6215 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 6215 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
| 6216 { | 6216 { |
| 6217 return m_drawingBuffer.get(); | 6217 return m_drawingBuffer.get(); |
| 6218 } | 6218 } |
| 6219 | 6219 |
| 6220 } // namespace blink | 6220 } // namespace blink |
| OLD | NEW |