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 20 matching lines...) Expand all Loading... |
31 #include "bindings/v8/ExceptionState.h" | 31 #include "bindings/v8/ExceptionState.h" |
32 #include "core/dom/ExceptionCode.h" | 32 #include "core/dom/ExceptionCode.h" |
33 #include "core/fetch/ImageResource.h" | 33 #include "core/fetch/ImageResource.h" |
34 #include "core/frame/LocalFrame.h" | 34 #include "core/frame/LocalFrame.h" |
35 #include "core/frame/Settings.h" | 35 #include "core/frame/Settings.h" |
36 #include "core/html/HTMLCanvasElement.h" | 36 #include "core/html/HTMLCanvasElement.h" |
37 #include "core/html/HTMLImageElement.h" | 37 #include "core/html/HTMLImageElement.h" |
38 #include "core/html/HTMLVideoElement.h" | 38 #include "core/html/HTMLVideoElement.h" |
39 #include "core/html/ImageData.h" | 39 #include "core/html/ImageData.h" |
40 #include "core/html/canvas/ANGLEInstancedArrays.h" | 40 #include "core/html/canvas/ANGLEInstancedArrays.h" |
| 41 #include "core/html/canvas/EXTBlendMinMax.h" |
41 #include "core/html/canvas/EXTFragDepth.h" | 42 #include "core/html/canvas/EXTFragDepth.h" |
42 #include "core/html/canvas/EXTShaderTextureLOD.h" | 43 #include "core/html/canvas/EXTShaderTextureLOD.h" |
43 #include "core/html/canvas/EXTTextureFilterAnisotropic.h" | 44 #include "core/html/canvas/EXTTextureFilterAnisotropic.h" |
44 #include "core/html/canvas/OESElementIndexUint.h" | 45 #include "core/html/canvas/OESElementIndexUint.h" |
45 #include "core/html/canvas/OESStandardDerivatives.h" | 46 #include "core/html/canvas/OESStandardDerivatives.h" |
46 #include "core/html/canvas/OESTextureFloat.h" | 47 #include "core/html/canvas/OESTextureFloat.h" |
47 #include "core/html/canvas/OESTextureFloatLinear.h" | 48 #include "core/html/canvas/OESTextureFloatLinear.h" |
48 #include "core/html/canvas/OESTextureHalfFloat.h" | 49 #include "core/html/canvas/OESTextureHalfFloat.h" |
49 #include "core/html/canvas/OESTextureHalfFloatLinear.h" | 50 #include "core/html/canvas/OESTextureHalfFloatLinear.h" |
50 #include "core/html/canvas/OESVertexArrayObject.h" | 51 #include "core/html/canvas/OESVertexArrayObject.h" |
(...skipping 5032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5083 return true; | 5084 return true; |
5084 } | 5085 } |
5085 | 5086 |
5086 bool WebGLRenderingContextBase::validateBlendEquation(const char* functionName,
GLenum mode) | 5087 bool WebGLRenderingContextBase::validateBlendEquation(const char* functionName,
GLenum mode) |
5087 { | 5088 { |
5088 switch (mode) { | 5089 switch (mode) { |
5089 case GL_FUNC_ADD: | 5090 case GL_FUNC_ADD: |
5090 case GL_FUNC_SUBTRACT: | 5091 case GL_FUNC_SUBTRACT: |
5091 case GL_FUNC_REVERSE_SUBTRACT: | 5092 case GL_FUNC_REVERSE_SUBTRACT: |
5092 return true; | 5093 return true; |
| 5094 case GL_MIN_EXT: |
| 5095 case GL_MAX_EXT: |
| 5096 if (extensionEnabled(EXTBlendMinMaxName)) |
| 5097 return true; |
| 5098 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid mode"); |
| 5099 return false; |
5093 default: | 5100 default: |
5094 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid mode"); | 5101 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid mode"); |
5095 return false; | 5102 return false; |
5096 } | 5103 } |
5097 } | 5104 } |
5098 | 5105 |
5099 bool WebGLRenderingContextBase::validateBlendFuncFactors(const char* functionNam
e, GLenum src, GLenum dst) | 5106 bool WebGLRenderingContextBase::validateBlendFuncFactors(const char* functionNam
e, GLenum src, GLenum dst) |
5100 { | 5107 { |
5101 if (((src == GL_CONSTANT_COLOR || src == GL_ONE_MINUS_CONSTANT_COLOR) | 5108 if (((src == GL_CONSTANT_COLOR || src == GL_ONE_MINUS_CONSTANT_COLOR) |
5102 && (dst == GL_CONSTANT_ALPHA || dst == GL_ONE_MINUS_CONSTANT_ALPHA)) | 5109 && (dst == GL_CONSTANT_ALPHA || dst == GL_ONE_MINUS_CONSTANT_ALPHA)) |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5685 if (m_textureUnits[i].m_texture2DBinding | 5692 if (m_textureUnits[i].m_texture2DBinding |
5686 || m_textureUnits[i].m_textureCubeMapBinding) { | 5693 || m_textureUnits[i].m_textureCubeMapBinding) { |
5687 m_onePlusMaxNonDefaultTextureUnit = i + 1; | 5694 m_onePlusMaxNonDefaultTextureUnit = i + 1; |
5688 return; | 5695 return; |
5689 } | 5696 } |
5690 } | 5697 } |
5691 m_onePlusMaxNonDefaultTextureUnit = 0; | 5698 m_onePlusMaxNonDefaultTextureUnit = 0; |
5692 } | 5699 } |
5693 | 5700 |
5694 } // namespace WebCore | 5701 } // namespace WebCore |
OLD | NEW |