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 5020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5103 if (!m_numGLErrorsToConsoleAllowed) | 5104 if (!m_numGLErrorsToConsoleAllowed) |
5104 printWarningToConsole("WebGL: too many errors, no more errors will be re
ported to the console for this context."); | 5105 printWarningToConsole("WebGL: too many errors, no more errors will be re
ported to the console for this context."); |
5105 | 5106 |
5106 return; | 5107 return; |
5107 } | 5108 } |
5108 | 5109 |
5109 void WebGLRenderingContextBase::printWarningToConsole(const String& message) | 5110 void WebGLRenderingContextBase::printWarningToConsole(const String& message) |
5110 { | 5111 { |
5111 if (!canvas()) | 5112 if (!canvas()) |
5112 return; | 5113 return; |
5113 canvas()->document().addConsoleMessage(RenderingMessageSource, WarningMessag
eLevel, message); | 5114 canvas()->document().addConsoleMessage(ConsoleMessage::create(RenderingMessa
geSource, WarningMessageLevel, message)); |
5114 } | 5115 } |
5115 | 5116 |
5116 bool WebGLRenderingContextBase::validateFramebufferFuncParameters(const char* fu
nctionName, GLenum target, GLenum attachment) | 5117 bool WebGLRenderingContextBase::validateFramebufferFuncParameters(const char* fu
nctionName, GLenum target, GLenum attachment) |
5117 { | 5118 { |
5118 if (target != GL_FRAMEBUFFER) { | 5119 if (target != GL_FRAMEBUFFER) { |
5119 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid target"); | 5120 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid target"); |
5120 return false; | 5121 return false; |
5121 } | 5122 } |
5122 switch (attachment) { | 5123 switch (attachment) { |
5123 case GL_COLOR_ATTACHMENT0: | 5124 case GL_COLOR_ATTACHMENT0: |
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5800 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; | 5801 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; |
5801 } | 5802 } |
5802 #else | 5803 #else |
5803 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 5804 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
5804 { | 5805 { |
5805 return m_drawingBuffer.get(); | 5806 return m_drawingBuffer.get(); |
5806 } | 5807 } |
5807 #endif | 5808 #endif |
5808 | 5809 |
5809 } // namespace blink | 5810 } // namespace blink |
OLD | NEW |