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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 #include "core/html/canvas/WebGLDepthTexture.h" | 62 #include "core/html/canvas/WebGLDepthTexture.h" |
63 #include "core/html/canvas/WebGLDrawBuffers.h" | 63 #include "core/html/canvas/WebGLDrawBuffers.h" |
64 #include "core/html/canvas/WebGLFramebuffer.h" | 64 #include "core/html/canvas/WebGLFramebuffer.h" |
65 #include "core/html/canvas/WebGLLoseContext.h" | 65 #include "core/html/canvas/WebGLLoseContext.h" |
66 #include "core/html/canvas/WebGLProgram.h" | 66 #include "core/html/canvas/WebGLProgram.h" |
67 #include "core/html/canvas/WebGLRenderbuffer.h" | 67 #include "core/html/canvas/WebGLRenderbuffer.h" |
68 #include "core/html/canvas/WebGLShader.h" | 68 #include "core/html/canvas/WebGLShader.h" |
69 #include "core/html/canvas/WebGLShaderPrecisionFormat.h" | 69 #include "core/html/canvas/WebGLShaderPrecisionFormat.h" |
70 #include "core/html/canvas/WebGLTexture.h" | 70 #include "core/html/canvas/WebGLTexture.h" |
71 #include "core/html/canvas/WebGLUniformLocation.h" | 71 #include "core/html/canvas/WebGLUniformLocation.h" |
| 72 #include "core/inspector/ConsoleMessage.h" |
72 #include "core/inspector/InspectorInstrumentation.h" | 73 #include "core/inspector/InspectorInstrumentation.h" |
73 #include "core/loader/FrameLoader.h" | 74 #include "core/loader/FrameLoader.h" |
74 #include "core/loader/FrameLoaderClient.h" | 75 #include "core/loader/FrameLoaderClient.h" |
75 #include "core/rendering/RenderBox.h" | 76 #include "core/rendering/RenderBox.h" |
76 #include "platform/CheckedInt.h" | 77 #include "platform/CheckedInt.h" |
77 #include "platform/NotImplemented.h" | 78 #include "platform/NotImplemented.h" |
78 #include "platform/RuntimeEnabledFeatures.h" | 79 #include "platform/RuntimeEnabledFeatures.h" |
79 #include "platform/geometry/IntSize.h" | 80 #include "platform/geometry/IntSize.h" |
80 #include "platform/graphics/GraphicsContext.h" | 81 #include "platform/graphics/GraphicsContext.h" |
81 #include "platform/graphics/UnacceleratedImageBufferSurface.h" | 82 #include "platform/graphics/UnacceleratedImageBufferSurface.h" |
(...skipping 4973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5055 if (!m_numGLErrorsToConsoleAllowed) | 5056 if (!m_numGLErrorsToConsoleAllowed) |
5056 printWarningToConsole("WebGL: too many errors, no more errors will be re
ported to the console for this context."); | 5057 printWarningToConsole("WebGL: too many errors, no more errors will be re
ported to the console for this context."); |
5057 | 5058 |
5058 return; | 5059 return; |
5059 } | 5060 } |
5060 | 5061 |
5061 void WebGLRenderingContextBase::printWarningToConsole(const String& message) | 5062 void WebGLRenderingContextBase::printWarningToConsole(const String& message) |
5062 { | 5063 { |
5063 if (!canvas()) | 5064 if (!canvas()) |
5064 return; | 5065 return; |
5065 canvas()->document().addConsoleMessage(RenderingMessageSource, WarningMessag
eLevel, message); | 5066 canvas()->document().addConsoleMessage(ConsoleMessage::create(RenderingMessa
geSource, WarningMessageLevel, message)); |
5066 } | 5067 } |
5067 | 5068 |
5068 bool WebGLRenderingContextBase::validateFramebufferFuncParameters(const char* fu
nctionName, GLenum target, GLenum attachment) | 5069 bool WebGLRenderingContextBase::validateFramebufferFuncParameters(const char* fu
nctionName, GLenum target, GLenum attachment) |
5069 { | 5070 { |
5070 if (target != GL_FRAMEBUFFER) { | 5071 if (target != GL_FRAMEBUFFER) { |
5071 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid target"); | 5072 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid target"); |
5072 return false; | 5073 return false; |
5073 } | 5074 } |
5074 switch (attachment) { | 5075 switch (attachment) { |
5075 case GL_COLOR_ATTACHMENT0: | 5076 case GL_COLOR_ATTACHMENT0: |
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5695 if (m_textureUnits[i].m_texture2DBinding | 5696 if (m_textureUnits[i].m_texture2DBinding |
5696 || m_textureUnits[i].m_textureCubeMapBinding) { | 5697 || m_textureUnits[i].m_textureCubeMapBinding) { |
5697 m_onePlusMaxNonDefaultTextureUnit = i + 1; | 5698 m_onePlusMaxNonDefaultTextureUnit = i + 1; |
5698 return; | 5699 return; |
5699 } | 5700 } |
5700 } | 5701 } |
5701 m_onePlusMaxNonDefaultTextureUnit = 0; | 5702 m_onePlusMaxNonDefaultTextureUnit = 0; |
5702 } | 5703 } |
5703 | 5704 |
5704 } // namespace WebCore | 5705 } // namespace WebCore |
OLD | NEW |