Changeset 283238 in webkit
- Timestamp:
- Sep 29, 2021, 11:21:58 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 21 edited
-
ChangeLog (modified) (1 diff)
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events-expected.txt (modified) (1 diff)
-
LayoutTests/fast/mediastream/captureStream/canvas3d-expected.txt (modified) (1 diff)
-
ManualTests/mediastream (added)
-
ManualTests/mediastream/mediastream-canvas-to-video.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp (modified) (1 diff)
-
Source/WebCore/html/HTMLCanvasElement.cpp (modified) (1 diff)
-
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (modified) (3 diffs)
-
Source/WebCore/html/canvas/WebGLRenderingContextBase.h (modified) (3 diffs)
-
Source/WebCore/platform/graphics/GraphicsContextGL.cpp (modified) (1 diff)
-
Source/WebCore/platform/graphics/GraphicsContextGL.h (modified) (3 diffs)
-
Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.cpp (modified) (2 diffs)
-
Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.h (modified) (2 diffs)
-
Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h (modified) (2 diffs)
-
Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm (modified) (2 diffs)
-
Source/WebCore/platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp (modified) (2 diffs)
-
Source/WebCore/platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h (modified) (2 diffs)
-
Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm (modified) (3 diffs)
-
Source/WebCore/platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm (modified) (2 diffs)
-
Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp (modified) (4 diffs)
-
Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r283175 r283238 1 2021-09-29 Kimmo Kinnunen <kkinnunen@apple.com> 2 3 MediaStream canvas.captureStream() fails for WebGL 4 https://bugs.webkit.org/show_bug.cgi?id=230613 5 <rdar://82307293> 6 7 Reviewed by Youenn Fablet. 8 9 Add a manual test to interact with media stream 10 captureStream() behavior until the implementation is 11 testable. 12 13 * ManualTests/mediastream/mediastream-canvas-to-video.html: Added. 14 1 15 2021-09-28 Carlos Garcia Campos <cgarcia@igalia.com> 2 16 -
trunk/LayoutTests/ChangeLog
r283235 r283238 1 2021-09-29 Kimmo Kinnunen <kkinnunen@apple.com> 2 3 MediaStream canvas.captureStream() fails for WebGL 4 https://bugs.webkit.org/show_bug.cgi?id=230613 5 <rdar://82307293> 6 7 Reviewed by Youenn Fablet. 8 9 Add new expectations, a warning was removed. 10 CONSOLE MESSAGE: Turning drawing buffer preservation for the WebGL canvas being captured 11 12 * fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events-expected.txt: 13 * fast/mediastream/captureStream/canvas3d-expected.txt: 14 1 15 2021-09-29 Youenn Fablet <youenn@apple.com> 2 16 -
trunk/LayoutTests/fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events-expected.txt
r270059 r283238 1 CONSOLE MESSAGE: Turning drawing buffer preservation for the WebGL canvas being captured2 1 Exercises the potential events on CanvasCaptureMediaStream. 3 2 -
trunk/LayoutTests/fast/mediastream/captureStream/canvas3d-expected.txt
r267644 r283238 1 CONSOLE MESSAGE: Turning drawing buffer preservation for the WebGL canvas being captured2 1 3 2 -
trunk/Source/WebCore/ChangeLog
r283237 r283238 1 2021-09-29 Kimmo Kinnunen <kkinnunen@apple.com> 2 3 MediaStream canvas.captureStream() fails for WebGL 4 https://bugs.webkit.org/show_bug.cgi?id=230613 5 <rdar://82307293> 6 7 Reviewed by Youenn Fablet. 8 9 Remove previous incorrect behavior of turning on "preservesDrawingBuffer" 10 and sampling the drawing buffer. The drawing buffer is not what should 11 ever be touched, rather it's the display buffer that should be available. 12 13 Implement sampling of WebGL display buffer for 14 media stream capture. The upon sampling, obtain a shared 15 reference to the 16 display buffer, passes it to media sample consuming process and mark 17 the WebGL context display buffer non-eligible for recycling as 18 new drawing buffer. 19 20 Currently the implementation is displayed correctly for 21 WebGL contents that is premultiplied. Unpremultiplied 22 content is fixed in the associated bugs. 23 24 Note: there are bugs preventing robust use of the API, 25 listed in the associated bugs. As such, testing is not expanded 26 in this bug. 27 28 Tested by 29 ManualTests/mediastream/mediastream-canvas-to-video.html (added) 30 31 https://webrtc.github.io/samples/src/content/capture/canvas-video/ 32 (Refresh the page or hide the window until MediaPlayer initialization 33 flakyness lets rendering happen) 34 35 The test LayoutTests/fast/mediastream/captureStream/canvas3d.html 36 cannot yet be used to test the implementation as the rest of the 37 captureStream() and playback implementation is so flaky. 38 39 * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp: 40 (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged): 41 * html/HTMLCanvasElement.cpp: 42 (WebCore::HTMLCanvasElement::toMediaSample): 43 * html/canvas/WebGLRenderingContextBase.cpp: 44 (WebCore::WebGLRenderingContextBase::paintCompositedResultsToMediaSample): 45 * html/canvas/WebGLRenderingContextBase.h: 46 (WebCore::WebGLRenderingContextBase::isPreservingDrawingBuffer const): 47 * platform/graphics/GraphicsContextGL.cpp: 48 * platform/graphics/GraphicsContextGL.h: 49 * platform/graphics/RemoteGraphicsContextGLProxyBase.cpp: 50 (WebCore::RemoteGraphicsContextGLProxyBase::paintCompositedResultsToMediaSample): 51 * platform/graphics/RemoteGraphicsContextGLProxyBase.h: 52 * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h: 53 * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm: 54 (WebCore::MediaSampleAVFObjC::createImageSample): 55 * platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp: 56 (WebCore::GraphicsContextGLIOSurfaceSwapChain::present): 57 * platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h: 58 * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: 59 (WebCore::GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample): 60 * platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm: 61 (WebCore::RemoteGraphicsContextGLProxyBase::paintCompositedResultsToMediaSample): 62 * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: 63 (WebCore::GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample): 64 * platform/graphics/opengl/GraphicsContextGLOpenGL.h: 65 1 66 2021-09-29 Jer Noble <jer.noble@apple.com> 2 67 -
trunk/Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp
r278253 r283238 154 154 ASSERT_UNUSED(canvas, m_canvas == &canvas); 155 155 156 #if ENABLE(WEBGL)157 // FIXME: We need to preserve drawing buffer as we are currently grabbing frames asynchronously.158 // We should instead add an anchor point for both 2d and 3d contexts where canvas will actually paint.159 // And call canvas observers from that point.160 if (is<WebGLRenderingContextBase>(canvas.renderingContext())) {161 auto& context = downcast<WebGLRenderingContextBase>(*canvas.renderingContext());162 if (!context.isPreservingDrawingBuffer()) {163 canvas.scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, "Turning drawing buffer preservation for the WebGL canvas being captured"_s);164 context.enablePreserveDrawingBuffer();165 }166 }167 #endif168 169 156 // FIXME: We should try to generate the frame at the time the screen is being updated. 170 157 if (m_captureCanvasTimer.isActive()) -
trunk/Source/WebCore/html/HTMLCanvasElement.cpp
r283049 r283238 759 759 { 760 760 #if PLATFORM(COCOA) || USE(GSTREAMER) 761 #if ENABLE(WEBGL) 762 if (is<WebGLRenderingContextBase>(m_context.get())) { 763 if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled()) 764 ResourceLoadObserver::shared().logCanvasRead(document()); 765 return downcast<WebGLRenderingContextBase>(*m_context).paintCompositedResultsToMediaSample(); 766 } 767 #endif 761 768 auto* imageBuffer = buffer(); 762 769 if (!imageBuffer) -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
r282860 r283238 135 135 #endif 136 136 137 #if ENABLE(MEDIA_STREAM) 138 #include "MediaSample.h" 139 #endif 140 137 141 namespace WebCore { 138 142 … … 1375 1379 return m_context->paintRenderingResultsToPixelBuffer(); 1376 1380 } 1381 1382 #if ENABLE(MEDIA_STREAM) 1383 RefPtr<MediaSample> WebGLRenderingContextBase::paintCompositedResultsToMediaSample() 1384 { 1385 if (isContextLostOrPending()) 1386 return nullptr; 1387 return m_context->paintCompositedResultsToMediaSample(); 1388 } 1389 #endif 1377 1390 1378 1391 WebGLTexture::TextureExtensionFlag WebGLRenderingContextBase::textureExtensionFlags() const … … 3951 3964 } 3952 3965 3953 void WebGLRenderingContextBase::enablePreserveDrawingBuffer()3954 {3955 ASSERT(!m_attributes.preserveDrawingBuffer);3956 m_attributes.preserveDrawingBuffer = true;3957 // Must send this notification down to the GraphicsContextGL as well.3958 m_context->enablePreserveDrawingBuffer();3959 }3960 3961 3966 void WebGLRenderingContextBase::hint(GCGLenum target, GCGLenum mode) 3962 3967 { -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h
r282192 r283238 129 129 #endif 130 130 131 #if ENABLE(MEDIA_STREAM) 132 class MediaSample; 133 #endif 134 131 135 class WebGLRenderingContextBase : public GraphicsContextGL::Client, public GPUBasedCanvasRenderingContext, private ActivityStateChangeObserver { 132 136 WTF_MAKE_ISO_ALLOCATED(WebGLRenderingContextBase); … … 234 238 235 239 bool isPreservingDrawingBuffer() const { return m_attributes.preserveDrawingBuffer; } 236 // Concession to canvas capture API, which must dynamically enable237 // preserveDrawingBuffer. This can only be called once, when238 // isPreservingDrawingBuffer() returns false.239 void enablePreserveDrawingBuffer();240 240 241 241 bool preventBufferClearForInspector() const { return m_preventBufferClearForInspector; } … … 393 393 void paintRenderingResultsToCanvas() final; 394 394 std::optional<PixelBuffer> paintRenderingResultsToPixelBuffer(); 395 #if ENABLE(MEDIA_STREAM) 396 RefPtr<MediaSample> paintCompositedResultsToMediaSample(); 397 #endif 395 398 396 399 void removeSharedObject(WebGLSharedObject&); -
trunk/Source/WebCore/platform/graphics/GraphicsContextGL.cpp
r281621 r283238 363 363 } 364 364 365 void GraphicsContextGL::enablePreserveDrawingBuffer()366 {367 // Canvas capture should not call this unless necessary.368 ASSERT(!m_attrs.preserveDrawingBuffer);369 m_attrs.preserveDrawingBuffer = true;370 }371 365 372 366 bool GraphicsContextGL::computeFormatAndTypeParameters(GCGLenum format, GCGLenum type, unsigned* componentsPerPixel, unsigned* bytesPerComponent) -
trunk/Source/WebCore/platform/graphics/GraphicsContextGL.h
r282053 r283238 60 60 class GraphicsContextGLCV; 61 61 #endif 62 62 #if ENABLE(MEDIA_STREAM) 63 class MediaSample; 64 #endif 63 65 64 66 // Base class for graphics context for implementing WebGL rendering model. … … 1245 1247 void setContextAttributes(const GraphicsContextGLAttributes& attrs) { m_attrs = attrs; } 1246 1248 1247 // FIXME: The calling site should be fixed, this breaks the WebGL spec1248 // wrt preserveDrawingBuffer == false behavior.1249 // Concession to Canvas captureStream, which needs to dynamically set1250 // preserveDrawingBuffer to true in order to avoid implicit clears.1251 // Implementations generally do not support toggling this bit arbitrarily.1252 virtual void enablePreserveDrawingBuffer();1253 1254 1249 // Support for extensions. Returns a non-null object, though not 1255 1250 // all methods it contains may necessarily be supported on the … … 1295 1290 virtual std::optional<PixelBuffer> paintRenderingResultsToPixelBuffer() = 0; 1296 1291 virtual void paintCompositedResultsToCanvas(ImageBuffer&) = 0; 1292 #if ENABLE(MEDIA_STREAM) 1293 virtual RefPtr<MediaSample> paintCompositedResultsToMediaSample() = 0; 1294 #endif 1297 1295 1298 1296 // FIXME: this should be removed. The layer should be marked composited by -
trunk/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.cpp
r272217 r283238 98 98 } 99 99 100 void RemoteGraphicsContextGLProxyBase::enablePreserveDrawingBuffer()101 {102 // Redeclared for export reasons.103 // FIXME: The whole function should be removed.104 GraphicsContextGL::enablePreserveDrawingBuffer();105 }106 107 100 bool RemoteGraphicsContextGLProxyBase::supports(const String& name) 108 101 { … … 157 150 } 158 151 #endif 152 153 #if ENABLE(MEDIA_STREAM) && !PLATFORM(COCOA) 154 RefPtr<MediaSample> RemoteGraphicsContextGLProxyBase::paintCompositedResultsToMediaSample() 155 { 156 return nullptr; 159 157 } 160 158 #endif 159 } 160 #endif -
trunk/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.h
r272217 r283238 68 68 GCGLbitfield getBuffersToAutoClear() const final; 69 69 void markLayerComposited() final; 70 void enablePreserveDrawingBuffer() final;71 70 72 71 #if ENABLE(VIDEO) && USE(AVFOUNDATION) … … 83 82 void getnUniformfvEXT(GCGLuint, GCGLint, GCGLsizei, GCGLfloat*) final; 84 83 void getnUniformivEXT(GCGLuint, GCGLint, GCGLsizei, GCGLint*) final; 84 #endif 85 #if ENABLE(MEDIA_STREAM) 86 RefPtr<MediaSample> paintCompositedResultsToMediaSample() final; 85 87 #endif 86 88 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h
r280416 r283238 31 31 #include <wtf/Forward.h> 32 32 33 using CVPixelBufferRef = struct __CVBuffer*; 34 33 35 namespace WebCore { 34 36 … … 41 43 static Ref<MediaSampleAVFObjC> create(CMSampleBufferRef sample, VideoRotation rotation = VideoRotation::None, bool mirrored = false) { return adoptRef(*new MediaSampleAVFObjC(sample, rotation, mirrored)); } 42 44 static RefPtr<MediaSampleAVFObjC> createImageSample(PixelBuffer&&); 45 static RefPtr<MediaSampleAVFObjC> createImageSample(RetainPtr<CVPixelBufferRef>&&, VideoRotation, bool mirrored); 43 46 44 47 WEBCORE_EXPORT static void setAsDisplayImmediately(MediaSample&); -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm
r282755 r283238 96 96 } 97 97 ASSERT_UNUSED(status, !status); 98 98 return createImageSample(WTFMove(cvPixelBuffer), VideoRotation::None, false); 99 } 100 101 RefPtr<MediaSampleAVFObjC> MediaSampleAVFObjC::createImageSample(RetainPtr<CVPixelBufferRef>&& pixelBuffer, VideoRotation rotation, bool mirrored) 102 { 99 103 CMVideoFormatDescriptionRef formatDescriptionRaw = nullptr; 100 status = PAL::CMVideoFormatDescriptionCreateForImageBuffer(kCFAllocatorDefault, cvPixelBuffer.get(), &formatDescriptionRaw); 101 ASSERT(!status); 104 auto status = PAL::CMVideoFormatDescriptionCreateForImageBuffer(kCFAllocatorDefault, pixelBuffer.get(), &formatDescriptionRaw); 105 if (status || !formatDescriptionRaw) { 106 ASSERT_NOT_REACHED(); 107 return nullptr; 108 } 102 109 auto formatDescription = adoptCF(formatDescriptionRaw); 103 110 104 111 CMSampleTimingInfo sampleTimingInformation = { PAL::kCMTimeInvalid, PAL::kCMTimeInvalid, PAL::kCMTimeInvalid }; 105 112 CMSampleBufferRef sampleBufferRaw = nullptr; 106 status = PAL::CMSampleBufferCreateReadyWithImageBuffer(kCFAllocatorDefault, cvPixelBuffer.get(), formatDescription.get(), &sampleTimingInformation, &sampleBufferRaw); 107 ASSERT(!status); 113 status = PAL::CMSampleBufferCreateReadyWithImageBuffer(kCFAllocatorDefault, pixelBuffer.get(), formatDescription.get(), &sampleTimingInformation, &sampleBufferRaw); 114 if (status || !sampleBufferRaw) { 115 ASSERT_NOT_REACHED(); 116 return nullptr; 117 } 108 118 auto sampleBuffer = adoptCF(sampleBufferRaw); 109 110 119 CFArrayRef attachmentsArray = PAL::CMSampleBufferGetSampleAttachmentsArray(sampleBuffer.get(), true); 111 120 for (CFIndex i = 0, count = CFArrayGetCount(attachmentsArray); i < count; ++i) { … … 113 122 CFDictionarySetValue(attachments, PAL::kCMSampleAttachmentKey_DisplayImmediately, kCFBooleanTrue); 114 123 } 115 return create(sampleBuffer.get() );124 return create(sampleBuffer.get(), rotation, mirrored); 116 125 } 117 126 -
trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp
r273080 r283238 38 38 } 39 39 40 void GraphicsContextGLIOSurfaceSwapChain::markDisplayBufferInUse() 41 { 42 m_displayBufferInUse = true; 43 } 44 40 45 GraphicsContextGLIOSurfaceSwapChain::Buffer GraphicsContextGLIOSurfaceSwapChain::recycleBuffer() 41 46 { … … 57 62 { 58 63 m_spareBuffer = std::exchange(m_displayBuffer, WTFMove(buffer)); 64 if (m_displayBufferInUse) { 65 m_displayBufferInUse = false; 66 m_spareBuffer.surface.reset(); 67 } 59 68 } 60 69 -
trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h
r273080 r283238 68 68 virtual const Buffer& displayBuffer() const; 69 69 70 // Marks the current display buffer to be in use and not eligble to recycling. 71 void markDisplayBufferInUse(); 72 70 73 // Detaches the client and returns the current contents buffer metadata handle. 71 74 // The if multiple buffers have been submitted, recycleBuffer must have been called before calling … … 76 79 Buffer m_displayBuffer; 77 80 Buffer m_spareBuffer; 81 bool m_displayBufferInUse = false; 78 82 }; 79 83 -
trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm
r282132 r283238 29 29 #import "GraphicsContextGLOpenGL.h" 30 30 31 #import "CVUtilities.h" 31 32 #import "ExtensionsGLANGLE.h" 32 33 #import "GraphicsContextGLANGLEUtilities.h" … … 49 50 #if ENABLE(VIDEO) && USE(AVFOUNDATION) 50 51 #include "GraphicsContextGLCV.h" 52 #endif 53 54 #if ENABLE(MEDIA_STREAM) 55 #include "MediaSampleAVFObjC.h" 51 56 #endif 52 57 … … 879 884 } 880 885 886 #if ENABLE(MEDIA_STREAM) 887 RefPtr<MediaSample> GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample() 888 { 889 auto &displayBuffer = m_swapChain->displayBuffer(); 890 if (!displayBuffer.surface || !displayBuffer.handle) 891 return nullptr; 892 if (displayBuffer.surface->size() != getInternalFramebufferSize()) 893 return nullptr; 894 m_swapChain->markDisplayBufferInUse(); 895 auto pixelBuffer = createCVPixelBuffer(displayBuffer.surface->surface()); 896 if (!pixelBuffer) 897 return nullptr; 898 return MediaSampleAVFObjC::createImageSample(WTFMove(*pixelBuffer), MediaSampleAVFObjC::VideoRotation::UpsideDown, true); 899 } 900 #endif 881 901 } 882 902 -
trunk/Source/WebCore/platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm
r270587 r283238 33 33 #import <wtf/BlockObjCExceptions.h> 34 34 35 #if ENABLE(MEDIA_STREAM) 36 #import "CVUtilities.h" 37 #import "MediaSampleAVFObjC.h" 38 #endif 39 35 40 namespace WebCore { 36 41 … … 64 69 } 65 70 71 #if ENABLE(MEDIA_STREAM) 72 RefPtr<MediaSample> RemoteGraphicsContextGLProxyBase::paintCompositedResultsToMediaSample() 73 { 74 auto& sc = platformSwapChain(); 75 auto& displayBuffer = sc.displayBuffer(); 76 if (!displayBuffer.surface) 77 return nullptr; 78 sc.markDisplayBufferInUse(); 79 auto pixelBuffer = createCVPixelBuffer(displayBuffer.surface->surface()); 80 if (!pixelBuffer) 81 return nullptr; 82 return MediaSampleAVFObjC::createImageSample(WTFMove(*pixelBuffer), MediaSampleAVFObjC::VideoRotation::UpsideDown, true); 66 83 } 67 84 #endif 85 86 } 87 #endif -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp
r281621 r283238 35 35 #include "MediaPlayerPrivate.h" 36 36 #include "PixelBuffer.h" 37 #include <memory> 37 38 #include <wtf/UniqueArray.h> 38 39 … … 41 42 #endif 42 43 43 #include <memory> 44 #if !PLATFORM(COCOA) && ENABLE(MEDIA_STREAM) 45 #include "MediaSample.h" 46 #endif 44 47 45 48 namespace WebCore { … … 71 74 { 72 75 return m_buffersToAutoClear; 73 }74 75 void GraphicsContextGLOpenGL::enablePreserveDrawingBuffer()76 {77 GraphicsContextGL::enablePreserveDrawingBuffer();78 // After dynamically transitioning to preserveDrawingBuffer:true79 // for canvas capture, clear out any buffer auto-clearing state.80 m_buffersToAutoClear = 0;81 76 } 82 77 … … 171 166 } 172 167 168 #if !PLATFORM(COCOA) && ENABLE(MEDIA_STREAM) 169 RefPtr<MediaSample> GraphicsContextGLOpenGL::paintCompositedResultsToMediaSample() 170 { 171 return nullptr; 172 } 173 #endif 174 173 175 std::optional<PixelBuffer> GraphicsContextGLOpenGL::readRenderingResultsForPainting() 174 176 { -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h
r281621 r283238 461 461 void setBuffersToAutoClear(GCGLbitfield) final; 462 462 GCGLbitfield getBuffersToAutoClear() const final; 463 void enablePreserveDrawingBuffer() final;464 463 465 464 void dispatchContextChangedNotification(); … … 468 467 std::optional<PixelBuffer> paintRenderingResultsToPixelBuffer() final; 469 468 void paintCompositedResultsToCanvas(ImageBuffer&) final; 469 #if ENABLE(MEDIA_STREAM) 470 RefPtr<MediaSample> paintCompositedResultsToMediaSample() final; 471 #endif 470 472 471 473 std::optional<PixelBuffer> readRenderingResultsForPainting();
Note:
See TracChangeset
for help on using the changeset viewer.