Changeset 219208 in webkit
- Timestamp:
- Jul 6, 2017 11:35:58 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r219206 r219208 1 2017-07-06 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Support getting the content of WebGL/WebGL2 contexts 4 https://bugs.webkit.org/show_bug.cgi?id=173569 5 <rdar://problem/33112420> 6 7 Reviewed by Joseph Pecoraro. 8 9 * inspector/canvas/requestContent-2d-expected.txt: Added. 10 * inspector/canvas/requestContent-2d.html: Added. 11 * inspector/canvas/requestContent-webgl-expected.txt: Added. 12 * inspector/canvas/requestContent-webgl.html: Added. 13 * inspector/canvas/requestContent-webgl2-expected.txt: Added. 14 * inspector/canvas/requestContent-webgl2.html: Added. 15 * inspector/canvas/requestContent-expected.txt: Removed. 16 * inspector/canvas/requestContent.html: Removed. 17 * platform/gtk/TestExpectations: 18 * platform/win/TestExpectations: 19 Split the existing canvas content tests into one for each context type. This allows 20 platforms that don't support certain context types to ignore just those tests (e.g. WebGL2). 21 1 22 2017-07-06 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 23 -
trunk/LayoutTests/platform/gtk/TestExpectations
r219206 r219208 596 596 webkit.org/b/166536 fast/canvas/webgl/webgl2-texture-upload-enums.html [ Skip ] 597 597 webkit.org/b/166536 inspector/canvas/create-context-webgl2.html [ Skip ] 598 webkit.org/b/166536 inspector/canvas/requestContent-webgl2.html [ Skip ] 598 599 webkit.org/b/166536 inspector/canvas/resolveCanvasContext-webgl2.html [ Skip ] 599 600 -
trunk/LayoutTests/platform/win/TestExpectations
r219150 r219208 1914 1914 inspector/canvas/create-context-webgl.html [ Skip ] 1915 1915 inspector/canvas/create-context-webgl2.html [ Skip ] 1916 inspector/canvas/requestContent-webgl.html [ Skip ] 1917 inspector/canvas/requestContent-webgl2.html [ Skip ] 1916 1918 inspector/canvas/resolveCanvasContext-webgl.html [ Skip ] 1917 1919 inspector/canvas/resolveCanvasContext-webgl2.html [ Skip ] -
trunk/Source/WebCore/ChangeLog
r219207 r219208 1 2017-07-06 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Support getting the content of WebGL/WebGL2 contexts 4 https://bugs.webkit.org/show_bug.cgi?id=173569 5 <rdar://problem/33112420> 6 7 Reviewed by Joseph Pecoraro. 8 9 Tests: inspector/canvas/requestContent-2d.html 10 inspector/canvas/requestContent-webgl.html 11 inspector/canvas/requestContent-webgl2.html 12 13 * html/canvas/WebGLRenderingContextBase.cpp: 14 (WebCore::WebGLRenderingContextBase::clearIfComposited): 15 * html/canvas/WebGLRenderingContextBase.h: 16 (WebCore::WebGLRenderingContextBase::preventBufferClearForInspector): 17 (WebCore::WebGLRenderingContextBase::setPreventBufferClearForInspector): 18 Add a flag that will prevent the context buffer from being cleared, allowing it to be copied 19 within a toDataURL call. This is currently only used by InspectorCanvasAgent::requestContent. 20 21 * inspector/InspectorCanvasAgent.cpp: 22 (WebCore::InspectorCanvasAgent::requestContent): 23 Since toDataURL attempts to force the canvas to redraw, we can preserve the buffer after it 24 finishes drawing so that it can be copied, instead of it normally being swapped out. 25 1 26 2017-07-06 Chris Dumez <cdumez@apple.com> 2 27 -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
r218603 r219208 732 732 733 733 if (!m_context->layerComposited() || m_layerCleared 734 || m_attributes.preserveDrawingBuffer || (mask && m_framebufferBinding)) 734 || m_attributes.preserveDrawingBuffer || (mask && m_framebufferBinding) 735 || m_preventBufferClearForInspector) 735 736 return false; 736 737 -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h
r218603 r219208 211 211 void setPreserveDrawingBuffer(bool value) { m_attributes.preserveDrawingBuffer = value; } 212 212 213 bool preventBufferClearForInspector() const { return m_preventBufferClearForInspector; } 214 void setPreventBufferClearForInspector(bool value) { m_preventBufferClearForInspector = value; } 215 213 216 virtual void hint(GC3Denum target, GC3Denum mode) = 0; 214 217 GC3Dboolean isBuffer(WebGLBuffer*); … … 571 574 int m_numGLErrorsToConsoleAllowed; 572 575 576 bool m_preventBufferClearForInspector { false }; 577 573 578 // A WebGLRenderingContext can be created in a state where it appears as 574 579 // a valid and active context, but will not execute any important operations -
trunk/Source/WebCore/inspector/InspectorCanvasAgent.cpp
r219150 r219208 150 150 } 151 151 *content = result.releaseReturnValue(); 152 } else { 153 // FIXME: <https://webkit.org/b/173569> Web Inspector: Support getting the content of WebGL/WebGL2/WebGPU contexts 152 } 153 #if ENABLE(WEBGL) 154 else if (is<WebGLRenderingContextBase>(context)) { 155 WebGLRenderingContextBase* gl = downcast<WebGLRenderingContextBase>(context); 156 157 gl->setPreventBufferClearForInspector(true); 158 ExceptionOr<String> result = canvasEntry->element->toDataURL(ASCIILiteral("image/png")); 159 gl->setPreventBufferClearForInspector(false); 160 161 if (result.hasException()) { 162 errorString = result.releaseException().releaseMessage(); 163 return; 164 } 165 *content = result.releaseReturnValue(); 166 } 167 #endif 168 // FIXME: <https://webkit.org/b/173621> Web Inspector: Support getting the content of WebGPU contexts 169 else 154 170 errorString = ASCIILiteral("Unsupported canvas context type"); 155 }156 171 } 157 172
Note: See TracChangeset
for help on using the changeset viewer.