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: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 2727633006: DevTools: Rename InspectorInstrumentation:: namespace into probe:: (Closed)
Patch Set: Created 3 years, 9 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
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 165 }
166 } 166 }
167 167
168 void WebGLRenderingContextBase::forciblyLoseOldestContext( 168 void WebGLRenderingContextBase::forciblyLoseOldestContext(
169 const String& reason) { 169 const String& reason) {
170 WebGLRenderingContextBase* candidate = oldestContext(); 170 WebGLRenderingContextBase* candidate = oldestContext();
171 if (!candidate) 171 if (!candidate)
172 return; 172 return;
173 173
174 candidate->printWarningToConsole(reason); 174 candidate->printWarningToConsole(reason);
175 InspectorInstrumentation::didFireWebGLWarning(candidate->canvas()); 175 probe::didFireWebGLWarning(candidate->canvas());
176 176
177 // This will call deactivateContext once the context has actually been lost. 177 // This will call deactivateContext once the context has actually been lost.
178 candidate->forceLostContext(WebGLRenderingContextBase::SyntheticLostContext, 178 candidate->forceLostContext(WebGLRenderingContextBase::SyntheticLostContext,
179 WebGLRenderingContextBase::WhenAvailable); 179 WebGLRenderingContextBase::WhenAvailable);
180 } 180 }
181 181
182 WebGLRenderingContextBase* WebGLRenderingContextBase::oldestContext() { 182 WebGLRenderingContextBase* WebGLRenderingContextBase::oldestContext() {
183 if (activeContexts().isEmpty()) 183 if (activeContexts().isEmpty())
184 return nullptr; 184 return nullptr;
185 185
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 } 1433 }
1434 1434
1435 void WebGLRenderingContextBase::finalizeFrame() { 1435 void WebGLRenderingContextBase::finalizeFrame() {
1436 m_animationFrameInProgress = false; 1436 m_animationFrameInProgress = false;
1437 } 1437 }
1438 1438
1439 void WebGLRenderingContextBase::onErrorMessage(const char* message, 1439 void WebGLRenderingContextBase::onErrorMessage(const char* message,
1440 int32_t id) { 1440 int32_t id) {
1441 if (m_synthesizedErrorsToConsole) 1441 if (m_synthesizedErrorsToConsole)
1442 printGLErrorToConsole(message); 1442 printGLErrorToConsole(message);
1443 InspectorInstrumentation::didFireWebGLErrorOrWarning(canvas(), message); 1443 probe::didFireWebGLErrorOrWarning(canvas(), message);
1444 } 1444 }
1445 1445
1446 void WebGLRenderingContextBase::notifyCanvasContextChanged() { 1446 void WebGLRenderingContextBase::notifyCanvasContextChanged() {
1447 if (!canvas()) 1447 if (!canvas())
1448 return; 1448 return;
1449 1449
1450 canvas()->notifyListenersCanvasChanged(); 1450 canvas()->notifyListenersCanvasChanged();
1451 } 1451 }
1452 1452
1453 WebGLRenderingContextBase::HowToClear 1453 WebGLRenderingContextBase::HowToClear
(...skipping 6175 matching lines...) Expand 10 before | Expand all | Expand 10 after
7629 String(functionName) + ": " + String(description); 7629 String(functionName) + ": " + String(description);
7630 printGLErrorToConsole(message); 7630 printGLErrorToConsole(message);
7631 } 7631 }
7632 if (!isContextLost()) { 7632 if (!isContextLost()) {
7633 if (!m_syntheticErrors.contains(error)) 7633 if (!m_syntheticErrors.contains(error))
7634 m_syntheticErrors.push_back(error); 7634 m_syntheticErrors.push_back(error);
7635 } else { 7635 } else {
7636 if (!m_lostContextErrors.contains(error)) 7636 if (!m_lostContextErrors.contains(error))
7637 m_lostContextErrors.push_back(error); 7637 m_lostContextErrors.push_back(error);
7638 } 7638 }
7639 InspectorInstrumentation::didFireWebGLError(canvas(), errorType); 7639 probe::didFireWebGLError(canvas(), errorType);
7640 } 7640 }
7641 7641
7642 void WebGLRenderingContextBase::emitGLWarning(const char* functionName, 7642 void WebGLRenderingContextBase::emitGLWarning(const char* functionName,
7643 const char* description) { 7643 const char* description) {
7644 if (m_synthesizedErrorsToConsole) { 7644 if (m_synthesizedErrorsToConsole) {
7645 String message = 7645 String message =
7646 String("WebGL: ") + String(functionName) + ": " + String(description); 7646 String("WebGL: ") + String(functionName) + ": " + String(description);
7647 printGLErrorToConsole(message); 7647 printGLErrorToConsole(message);
7648 } 7648 }
7649 InspectorInstrumentation::didFireWebGLWarning(canvas()); 7649 probe::didFireWebGLWarning(canvas());
7650 } 7650 }
7651 7651
7652 void WebGLRenderingContextBase::applyStencilTest() { 7652 void WebGLRenderingContextBase::applyStencilTest() {
7653 bool haveStencilBuffer = false; 7653 bool haveStencilBuffer = false;
7654 7654
7655 if (m_framebufferBinding) { 7655 if (m_framebufferBinding) {
7656 haveStencilBuffer = m_framebufferBinding->hasStencilBuffer(); 7656 haveStencilBuffer = m_framebufferBinding->hasStencilBuffer();
7657 } else { 7657 } else {
7658 Nullable<WebGLContextAttributes> attributes; 7658 Nullable<WebGLContextAttributes> attributes;
7659 getContextAttributes(attributes); 7659 getContextAttributes(attributes);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
7838 7838
7839 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( 7839 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas(
7840 HTMLCanvasElementOrOffscreenCanvas& result) const { 7840 HTMLCanvasElementOrOffscreenCanvas& result) const {
7841 if (canvas()) 7841 if (canvas())
7842 result.setHTMLCanvasElement(canvas()); 7842 result.setHTMLCanvasElement(canvas());
7843 else 7843 else
7844 result.setOffscreenCanvas(offscreenCanvas()); 7844 result.setOffscreenCanvas(offscreenCanvas());
7845 } 7845 }
7846 7846
7847 } // namespace blink 7847 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698