| 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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 Image*, | 1010 Image*, |
| 1011 WebGLImageConversion::ImageHtmlDomSource, | 1011 WebGLImageConversion::ImageHtmlDomSource, |
| 1012 bool flipY, | 1012 bool flipY, |
| 1013 bool premultiplyAlpha, | 1013 bool premultiplyAlpha, |
| 1014 const IntRect&, | 1014 const IntRect&, |
| 1015 GLsizei depth, | 1015 GLsizei depth, |
| 1016 GLint unpackImageHeight); | 1016 GLint unpackImageHeight); |
| 1017 | 1017 |
| 1018 template <typename T> | 1018 template <typename T> |
| 1019 IntRect getTextureSourceSize(T* textureSource) { | 1019 IntRect getTextureSourceSize(T* textureSource) { |
| 1020 /* DO NOT SUBMIT - merge conflict marker. |
| 1021 * Please spell |width| and |height| below. */ |
| 1020 return IntRect(0, 0, textureSource->width(), textureSource->height()); | 1022 return IntRect(0, 0, textureSource->width(), textureSource->height()); |
| 1021 } | 1023 } |
| 1022 | 1024 |
| 1023 template <typename T> | 1025 template <typename T> |
| 1024 bool validateTexImageSubRectangle(const char* functionName, | 1026 bool validateTexImageSubRectangle(const char* functionName, |
| 1025 TexImageFunctionID functionID, | 1027 TexImageFunctionID functionID, |
| 1026 T* image, | 1028 T* image, |
| 1027 const IntRect& subRect, | 1029 const IntRect& subRect, |
| 1028 GLsizei depth, | 1030 GLsizei depth, |
| 1029 GLint unpackImageHeight, | 1031 GLint unpackImageHeight, |
| 1030 bool* selectingSubRectangle) { | 1032 bool* selectingSubRectangle) { |
| 1031 DCHECK(functionName); | 1033 DCHECK(functionName); |
| 1032 DCHECK(selectingSubRectangle); | 1034 DCHECK(selectingSubRectangle); |
| 1033 DCHECK(image); | 1035 DCHECK(image); |
| 1036 /* DO NOT SUBMIT - merge conflict marker. |
| 1037 * Please spell |width| and |height| in the 2 lines below. */ |
| 1034 int imageWidth = static_cast<int>(image->width()); | 1038 int imageWidth = static_cast<int>(image->width()); |
| 1035 int imageHeight = static_cast<int>(image->height()); | 1039 int imageHeight = static_cast<int>(image->height()); |
| 1036 *selectingSubRectangle = | 1040 *selectingSubRectangle = |
| 1037 !(subRect.x() == 0 && subRect.y() == 0 && | 1041 !(subRect.x() == 0 && subRect.y() == 0 && |
| 1038 subRect.width() == imageWidth && subRect.height() == imageHeight); | 1042 subRect.width() == imageWidth && subRect.height() == imageHeight); |
| 1039 // If the source image rect selects anything except the entire | 1043 // If the source image rect selects anything except the entire |
| 1040 // contents of the image, assert that we're running WebGL 2.0 or | 1044 // contents of the image, assert that we're running WebGL 2.0 or |
| 1041 // higher, since this should never happen for WebGL 1.0 (even though | 1045 // higher, since this should never happen for WebGL 1.0 (even though |
| 1042 // the code could support it). If the image is null, that will be | 1046 // the code could support it). If the image is null, that will be |
| 1043 // signaled as an error later. | 1047 // signaled as an error later. |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1666 context, | 1670 context, |
| 1667 context->is3d(), | 1671 context->is3d(), |
| 1668 context.is3d()); | 1672 context.is3d()); |
| 1669 | 1673 |
| 1670 } // namespace blink | 1674 } // namespace blink |
| 1671 | 1675 |
| 1672 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS( | 1676 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS( |
| 1673 blink::WebGLRenderingContextBase::TextureUnitState); | 1677 blink::WebGLRenderingContextBase::TextureUnitState); |
| 1674 | 1678 |
| 1675 #endif // WebGLRenderingContextBase_h | 1679 #endif // WebGLRenderingContextBase_h |
| OLD | NEW |