Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: Source/core/html/canvas/WebGLRenderingContextBase.cpp

Issue 419203004: DevTools: wrapping arguments addConsoleMessage in ConsoleMessage (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@wrap-not-all-console-args
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/html/HTMLShadowElement.cpp ('k') | Source/core/html/parser/XSSAuditor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 4998 matching lines...) Expand 10 before | Expand all | Expand 10 after
5081 if (!m_numGLErrorsToConsoleAllowed) 5082 if (!m_numGLErrorsToConsoleAllowed)
5082 printWarningToConsole("WebGL: too many errors, no more errors will be re ported to the console for this context."); 5083 printWarningToConsole("WebGL: too many errors, no more errors will be re ported to the console for this context.");
5083 5084
5084 return; 5085 return;
5085 } 5086 }
5086 5087
5087 void WebGLRenderingContextBase::printWarningToConsole(const String& message) 5088 void WebGLRenderingContextBase::printWarningToConsole(const String& message)
5088 { 5089 {
5089 if (!canvas()) 5090 if (!canvas())
5090 return; 5091 return;
5091 canvas()->document().addConsoleMessage(RenderingMessageSource, WarningMessag eLevel, message); 5092 canvas()->document().addConsoleMessage(ConsoleMessage::create(RenderingMessa geSource, WarningMessageLevel, message));
5092 } 5093 }
5093 5094
5094 bool WebGLRenderingContextBase::validateFramebufferFuncParameters(const char* fu nctionName, GLenum target, GLenum attachment) 5095 bool WebGLRenderingContextBase::validateFramebufferFuncParameters(const char* fu nctionName, GLenum target, GLenum attachment)
5095 { 5096 {
5096 if (target != GL_FRAMEBUFFER) { 5097 if (target != GL_FRAMEBUFFER) {
5097 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid target"); 5098 synthesizeGLError(GL_INVALID_ENUM, functionName, "invalid target");
5098 return false; 5099 return false;
5099 } 5100 }
5100 switch (attachment) { 5101 switch (attachment) {
5101 case GL_COLOR_ATTACHMENT0: 5102 case GL_COLOR_ATTACHMENT0:
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
5757 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB uffer() : 0; 5758 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB uffer() : 0;
5758 } 5759 }
5759 #else 5760 #else
5760 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const 5761 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const
5761 { 5762 {
5762 return m_drawingBuffer.get(); 5763 return m_drawingBuffer.get();
5763 } 5764 }
5764 #endif 5765 #endif
5765 5766
5766 } // namespace blink 5767 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLShadowElement.cpp ('k') | Source/core/html/parser/XSSAuditor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698