Chromium Code Reviews| 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 3720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3731 return; | 3731 return; |
| 3732 | 3732 |
| 3733 DOMArrayBufferView::ViewType expectedViewType; | 3733 DOMArrayBufferView::ViewType expectedViewType; |
| 3734 switch (type) { | 3734 switch (type) { |
| 3735 case GL_UNSIGNED_BYTE: | 3735 case GL_UNSIGNED_BYTE: |
| 3736 expectedViewType = DOMArrayBufferView::TypeUint8; | 3736 expectedViewType = DOMArrayBufferView::TypeUint8; |
| 3737 break; | 3737 break; |
| 3738 case GL_BYTE: | 3738 case GL_BYTE: |
| 3739 expectedViewType = DOMArrayBufferView::TypeInt8; | 3739 expectedViewType = DOMArrayBufferView::TypeInt8; |
| 3740 break; | 3740 break; |
| 3741 case GL_UNSIGNED_SHORT: | |
|
Zhenyao Mo
2015/08/13 15:22:01
This is incorrect. For OpenGL ES 2 / WebGL 1, it
yunchao
2015/08/14 00:07:11
Yeah. I know that WebGL 1.0 should not support UNS
| |
| 3741 case GL_UNSIGNED_SHORT_5_6_5: | 3742 case GL_UNSIGNED_SHORT_5_6_5: |
| 3742 case GL_UNSIGNED_SHORT_4_4_4_4: | 3743 case GL_UNSIGNED_SHORT_4_4_4_4: |
| 3743 case GL_UNSIGNED_SHORT_5_5_5_1: | 3744 case GL_UNSIGNED_SHORT_5_5_5_1: |
| 3744 expectedViewType = DOMArrayBufferView::TypeUint16; | 3745 expectedViewType = DOMArrayBufferView::TypeUint16; |
| 3745 break; | 3746 break; |
| 3747 case GL_SHORT: | |
| 3748 expectedViewType = DOMArrayBufferView::TypeInt16; | |
| 3749 break; | |
| 3746 case GL_FLOAT: | 3750 case GL_FLOAT: |
| 3747 expectedViewType = DOMArrayBufferView::TypeFloat32; | 3751 expectedViewType = DOMArrayBufferView::TypeFloat32; |
| 3748 break; | 3752 break; |
| 3749 case GL_HALF_FLOAT: | 3753 case GL_HALF_FLOAT: |
| 3750 case GL_HALF_FLOAT_OES: | 3754 case GL_HALF_FLOAT_OES: |
| 3751 expectedViewType = DOMArrayBufferView::TypeUint16; | 3755 expectedViewType = DOMArrayBufferView::TypeUint16; |
| 3752 break; | 3756 break; |
| 3753 case GL_UNSIGNED_INT: | 3757 case GL_UNSIGNED_INT: |
| 3754 case GL_UNSIGNED_INT_2_10_10_10_REV: | 3758 case GL_UNSIGNED_INT_2_10_10_10_REV: |
| 3755 case GL_UNSIGNED_INT_10F_11F_11F_REV: | 3759 case GL_UNSIGNED_INT_10F_11F_11F_REV: |
| (...skipping 2885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6641 | 6645 |
| 6642 return totalBytesPerPixel; | 6646 return totalBytesPerPixel; |
| 6643 } | 6647 } |
| 6644 | 6648 |
| 6645 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 6649 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
| 6646 { | 6650 { |
| 6647 return m_drawingBuffer.get(); | 6651 return m_drawingBuffer.get(); |
| 6648 } | 6652 } |
| 6649 | 6653 |
| 6650 } // namespace blink | 6654 } // namespace blink |
| OLD | NEW |