| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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/WebGLSharedWebGraphicsContext3D.h" | 70 #include "core/html/canvas/WebGLSharedWebGraphicsContext3D.h" |
| 71 #include "core/html/canvas/WebGLTexture.h" | 71 #include "core/html/canvas/WebGLTexture.h" |
| 72 #include "core/html/canvas/WebGLUniformLocation.h" | 72 #include "core/html/canvas/WebGLUniformLocation.h" |
| 73 #include "core/inspector/ConsoleMessage.h" |
| 73 #include "core/inspector/InspectorInstrumentation.h" | 74 #include "core/inspector/InspectorInstrumentation.h" |
| 74 #include "core/loader/FrameLoader.h" | 75 #include "core/loader/FrameLoader.h" |
| 75 #include "core/loader/FrameLoaderClient.h" | 76 #include "core/loader/FrameLoaderClient.h" |
| 76 #include "core/rendering/RenderBox.h" | 77 #include "core/rendering/RenderBox.h" |
| 77 #include "platform/CheckedInt.h" | 78 #include "platform/CheckedInt.h" |
| 78 #include "platform/NotImplemented.h" | 79 #include "platform/NotImplemented.h" |
| 79 #include "platform/RuntimeEnabledFeatures.h" | 80 #include "platform/RuntimeEnabledFeatures.h" |
| 80 #include "platform/geometry/IntSize.h" | 81 #include "platform/geometry/IntSize.h" |
| 81 #include "platform/graphics/GraphicsContext.h" | 82 #include "platform/graphics/GraphicsContext.h" |
| 82 #include "platform/graphics/UnacceleratedImageBufferSurface.h" | 83 #include "platform/graphics/UnacceleratedImageBufferSurface.h" |
| (...skipping 5016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5099 if (!m_numGLErrorsToConsoleAllowed) | 5100 if (!m_numGLErrorsToConsoleAllowed) |
| 5100 printWarningToConsole("WebGL: too many errors, no more errors will be re
ported to the console for this context."); | 5101 printWarningToConsole("WebGL: too many errors, no more errors will be re
ported to the console for this context."); |
| 5101 | 5102 |
| 5102 return; | 5103 return; |
| 5103 } | 5104 } |
| 5104 | 5105 |
| 5105 void WebGLRenderingContextBase::printWarningToConsole(const String& message) | 5106 void WebGLRenderingContextBase::printWarningToConsole(const String& message) |
| 5106 { | 5107 { |
| 5107 if (!canvas()) | 5108 if (!canvas()) |
| 5108 return; | 5109 return; |
| 5109 canvas()->document().addConsoleMessage(RenderingMessageSource, WarningMessag
eLevel, message); | 5110 canvas()->document().addConsoleMessage(ConsoleMessage::create(RenderingMessa
geSource, WarningMessageLevel, message)); |
| 5110 } | 5111 } |
| 5111 | 5112 |
| 5112 bool WebGLRenderingContextBase::validateFramebufferFuncParameters(const char* fu
nctionName, GLenum target, GLenum attachment) | 5113 bool WebGLRenderingContextBase::validateFramebufferFuncParameters(const char* fu
nctionName, GLenum target, GLenum attachment) |
| 5113 { | 5114 { |
| 5114 if (target != GL_FRAMEBUFFER) { | 5115 if (target != GL_FRAMEBUFFER) { |
| 5115 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid target"); | 5116 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid target"); |
| 5116 return false; | 5117 return false; |
| 5117 } | 5118 } |
| 5118 switch (attachment) { | 5119 switch (attachment) { |
| 5119 case GL_COLOR_ATTACHMENT0: | 5120 case GL_COLOR_ATTACHMENT0: |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5796 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; | 5797 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; |
| 5797 } | 5798 } |
| 5798 #else | 5799 #else |
| 5799 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 5800 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
| 5800 { | 5801 { |
| 5801 return m_drawingBuffer.get(); | 5802 return m_drawingBuffer.get(); |
| 5802 } | 5803 } |
| 5803 #endif | 5804 #endif |
| 5804 | 5805 |
| 5805 } // namespace blink | 5806 } // namespace blink |
| OLD | NEW |