Changeset 273213 in webkit
- Timestamp:
- Feb 20, 2021 6:05:38 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r273211 r273213 1 2021-02-20 Peng Liu <peng.liu6@apple.com> 2 3 Video elements do not work as sources for TexImage2D calls in GPU Process 4 https://bugs.webkit.org/show_bug.cgi?id=218184 5 6 Reviewed by Jer Noble. 7 8 Add a function `GraphicsContextGL::copyTextureFromMedia()` which can be used by the graphics 9 context to copy video texture from a video element (player). 10 11 This patch also replaces `MediaPlayer::copyVideoTextureToPlatformTexture()` with 12 `MediaPlayer::pixelBufferForCurrentTime()` on Cocoa ports. The motivation is that 13 `RemoteGraphicsContextGL::copyTextureFromMedia()` will run in a background thread 14 ("RemoteGraphicsContextGL work queue") and it is difficult to make 15 `MediaPlayer::copyVideoTextureToPlatformTexture()` thread-safe. In addition, we cannot 16 simply run it on the main thread because it uses graphic context internally. Adding a 17 function `MediaPlayer::pixelBufferForCurrentTime()` solves the problem. 18 19 Manually tested. 20 We need to enable both "GPU Process: Media" and "GPU Process: WebGL" to test the feature. 21 22 * html/HTMLVideoElement.cpp: 23 (WebCore::HTMLVideoElement::copyVideoTextureToPlatformTexture): Deleted. 24 * html/HTMLVideoElement.h: 25 26 * html/canvas/WebGLRenderingContextBase.cpp: 27 (WebCore::WebGLRenderingContextBase::texImageSourceHelper): 28 * platform/graphics/GraphicsContextGL.h: 29 30 * platform/graphics/MediaPlayer.cpp: 31 (WebCore::MediaPlayer::pixelBufferForCurrentTime): 32 * platform/graphics/MediaPlayer.h: 33 * platform/graphics/MediaPlayerPrivate.h: 34 (WebCore::MediaPlayerPrivateInterface::pixelBufferForCurrentTime): 35 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: 36 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 37 (WebCore::MediaPlayerPrivateAVFoundationObjC::pixelBufferForCurrentTime): 38 (WebCore::MediaPlayerPrivateAVFoundationObjC::copyVideoTextureToPlatformTexture): Deleted. 39 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: 40 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: 41 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pixelBufferForCurrentTime): 42 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::copyVideoTextureToPlatformTexture): Deleted. 43 44 * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: 45 (WebCore::GraphicsContextGLOpenGL::copyTextureFromMedia): 46 * platform/graphics/opengl/GraphicsContextGLOpenGL.h: 47 1 48 2021-02-20 Sam Weinig <weinig@apple.com> 2 49 -
trunk/Source/WebCore/html/HTMLVideoElement.cpp
r272475 r273213 301 301 } 302 302 303 bool HTMLVideoElement::copyVideoTextureToPlatformTexture(GraphicsContextGL* context, PlatformGLObject texture, GCGLenum target, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY)304 {305 if (!player())306 return false;307 return player()->copyVideoTextureToPlatformTexture(context, texture, target, level, internalFormat, format, type, premultiplyAlpha, flipY);308 }309 310 303 bool HTMLVideoElement::hasAvailableVideoFrame() const 311 304 { -
trunk/Source/WebCore/html/HTMLVideoElement.h
r269850 r273213 77 77 78 78 RefPtr<NativeImage> nativeImageForCurrentTime(); 79 80 // Used by WebGL to do GPU-GPU textures copy if possible.81 // See more details at MediaPlayer::copyVideoTextureToPlatformTexture() defined in Source/WebCore/platform/graphics/MediaPlayer.h.82 bool copyVideoTextureToPlatformTexture(GraphicsContextGL*, PlatformGLObject texture, GCGLenum target, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY);83 79 84 80 WEBCORE_EXPORT bool shouldDisplayPosterImage() const; -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
r273138 r273213 4882 4882 && type == GraphicsContextGL::UNSIGNED_BYTE 4883 4883 && !level) { 4884 if (video-> copyVideoTextureToPlatformTexture(m_context.get(), texture->object(), target, level, internalformat, format, type, m_unpackPremultiplyAlpha, m_unpackFlipY)) {4884 if (video->player() && m_context->copyTextureFromMedia(*video->player(), texture->object(), target, level, internalformat, format, type, m_unpackPremultiplyAlpha, m_unpackFlipY)) { 4885 4885 #if !USE(ANGLE) 4886 4886 texture->setLevelInfo(target, level, internalformat, video->videoWidth(), video->videoHeight(), type); -
trunk/Source/WebCore/platform/graphics/GraphicsContextGL.h
r273080 r273213 33 33 #include "IntRect.h" 34 34 #include "IntSize.h" 35 #include "MediaPlayer.h" 35 36 #include "PlatformLayer.h" 36 37 #include <wtf/HashSet.h> … … 1307 1308 virtual GraphicsContextGLCV* asCV() = 0; 1308 1309 #endif 1309 1310 virtual bool copyTextureFromMedia(MediaPlayer&, PlatformGLObject texture, GCGLenum target, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY) = 0; 1310 1311 1311 1312 IntSize getInternalFramebufferSize() const { return IntSize(m_currentWidth, m_currentHeight); } -
trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp
r272750 r273213 1007 1007 } 1008 1008 1009 #if !USE(AVFOUNDATION) 1010 1009 1011 bool MediaPlayer::copyVideoTextureToPlatformTexture(GraphicsContextGL* context, PlatformGLObject texture, GCGLenum target, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY) 1010 1012 { 1011 1013 return m_private->copyVideoTextureToPlatformTexture(context, texture, target, level, internalFormat, format, type, premultiplyAlpha, flipY); 1012 1014 } 1015 1016 #else 1017 1018 CVPixelBufferRef MediaPlayer::pixelBufferForCurrentTime() 1019 { 1020 return m_private->pixelBufferForCurrentTime(); 1021 } 1022 1023 #endif 1013 1024 1014 1025 RefPtr<NativeImage> MediaPlayer::nativeImageForCurrentTime() -
trunk/Source/WebCore/platform/graphics/MediaPlayer.h
r272414 r273213 63 63 OBJC_CLASS NSArray; 64 64 65 #if ENABLE(WEBGL) && USE(AVFOUNDATION) 66 typedef struct __CVBuffer* CVPixelBufferRef; 67 #endif 68 65 69 namespace WebCore { 66 70 … … 438 442 // The destination texture may need to be resized to to the dimensions of the source texture or re-defined to the required internalFormat. 439 443 // The current restrictions require that format shoud be RGB or RGBA, type should be UNSIGNED_BYTE and level should be 0. It may be lifted in the future. 440 444 #if !USE(AVFOUNDATION) 441 445 bool copyVideoTextureToPlatformTexture(GraphicsContextGL*, PlatformGLObject texture, GCGLenum target, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY); 446 #else 447 CVPixelBufferRef pixelBufferForCurrentTime(); 448 #endif 442 449 443 450 RefPtr<NativeImage> nativeImageForCurrentTime(); -
trunk/Source/WebCore/platform/graphics/MediaPlayerPrivate.h
r271219 r273213 162 162 163 163 virtual void paintCurrentFrameInContext(GraphicsContext& c, const FloatRect& r) { paint(c, r); } 164 #if !USE(AVFOUNDATION) 164 165 virtual bool copyVideoTextureToPlatformTexture(GraphicsContextGL*, PlatformGLObject, GCGLenum, GCGLint, GCGLenum, GCGLenum, GCGLenum, bool, bool) { return false; } 166 #else 167 virtual CVPixelBufferRef pixelBufferForCurrentTime() { return nullptr; } 168 #endif 165 169 virtual RefPtr<NativeImage> nativeImageForCurrentTime() { return nullptr; } 166 170 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
r271219 r273213 255 255 void waitForVideoOutputMediaDataWillChange(); 256 256 257 bool copyVideoTextureToPlatformTexture(GraphicsContextGL*, PlatformGLObject, GCGLenum target, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY) final;257 CVPixelBufferRef pixelBufferForCurrentTime() final; 258 258 259 259 #if ENABLE(LEGACY_ENCRYPTED_MEDIA) -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r273128 r273213 2389 2389 } 2390 2390 2391 bool MediaPlayerPrivateAVFoundationObjC::copyVideoTextureToPlatformTexture(GraphicsContextGL* context, PlatformGLObject outputTexture, GCGLenum outputTarget, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY) 2392 { 2393 ASSERT(context); 2394 2391 CVPixelBufferRef MediaPlayerPrivateAVFoundationObjC::pixelBufferForCurrentTime() 2392 { 2395 2393 updateLastPixelBuffer(); 2396 2394 if (!m_lastPixelBuffer) 2397 return false; 2398 2399 auto contextCV = context->asCV(); 2400 if (!contextCV) 2401 return false; 2402 UNUSED_VARIABLE(premultiplyAlpha); 2403 ASSERT_UNUSED(outputTarget, outputTarget == GraphicsContextGL::TEXTURE_2D); 2404 return contextCV->copyPixelBufferToTexture(m_lastPixelBuffer.get(), outputTexture, level, internalFormat, format, type, GraphicsContextGL::FlipY(flipY)); 2395 return nullptr; 2396 2397 return m_lastPixelBuffer.get(); 2405 2398 } 2406 2399 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h
r269907 r273213 222 222 void paint(GraphicsContext&, const FloatRect&) override; 223 223 void paintCurrentFrameInContext(GraphicsContext&, const FloatRect&) override; 224 bool copyVideoTextureToPlatformTexture(GraphicsContextGL*, PlatformGLObject, GCGLenum target, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY) override;224 CVPixelBufferRef pixelBufferForCurrentTime() final; 225 225 226 226 bool supportsAcceleratedRendering() const override; -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
r271530 r273213 624 624 } 625 625 626 bool MediaPlayerPrivateMediaSourceAVFObjC::copyVideoTextureToPlatformTexture(GraphicsContextGL* context, PlatformGLObject outputTexture, GCGLenum outputTarget, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY)626 CVPixelBufferRef MediaPlayerPrivateMediaSourceAVFObjC::pixelBufferForCurrentTime() 627 627 { 628 628 // We have been asked to paint into a WebGL canvas, so take that as a signal to create … … 634 634 } 635 635 636 ASSERT(context);637 638 636 if (updateLastPixelBuffer()) { 639 637 if (!m_lastPixelBuffer) 640 return false; 641 } 642 auto contextCV = context->asCV(); 643 if (!contextCV) 644 return false; 645 UNUSED_VARIABLE(premultiplyAlpha); 646 ASSERT_UNUSED(outputTarget, outputTarget == GraphicsContextGL::TEXTURE_2D); 647 return contextCV->copyPixelBufferToTexture(m_lastPixelBuffer.get(), outputTexture, level, internalFormat, format, type, GraphicsContextGLCV::FlipY(flipY)); 638 return nullptr; 639 } 640 641 return m_lastPixelBuffer.get(); 648 642 } 649 643 -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp
r273080 r273213 34 34 #include "ImageBuffer.h" 35 35 #include "ImageData.h" 36 #include "MediaPlayerPrivate.h" 36 37 #include <wtf/UniqueArray.h> 38 39 #if USE(AVFOUNDATION) 40 #include "GraphicsContextGLCV.h" 41 #endif 37 42 38 43 namespace WebCore { … … 254 259 #endif 255 260 261 bool GraphicsContextGLOpenGL::copyTextureFromMedia(MediaPlayer& player, PlatformGLObject outputTexture, GCGLenum outputTarget, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY) 262 { 263 #if USE(AVFOUNDATION) 264 auto pixelBuffer = player.pixelBufferForCurrentTime(); 265 if (!pixelBuffer) 266 return false; 267 268 auto contextCV = asCV(); 269 if (!contextCV) 270 return false; 271 272 UNUSED_VARIABLE(premultiplyAlpha); 273 ASSERT_UNUSED(outputTarget, outputTarget == GraphicsContextGL::TEXTURE_2D); 274 return contextCV->copyPixelBufferToTexture(pixelBuffer, outputTexture, level, internalFormat, format, type, GraphicsContextGL::FlipY(flipY)); 275 #else 276 return player.copyVideoTextureToPlatformTexture(this, outputTexture, outputTarget, level, internalFormat, format, type, premultiplyAlpha, flipY); 277 #endif 278 } 279 256 280 } // namespace WebCore 257 281 -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h
r273080 r273213 87 87 class ImageBuffer; 88 88 class ImageData; 89 class MediaPlayer; 89 90 #if USE(TEXTURE_MAPPER) 90 91 class TextureMapperGCGLPlatformLayer; … … 466 467 RefPtr<ImageData> readCompositedResultsForPainting(); 467 468 469 bool copyTextureFromMedia(MediaPlayer&, PlatformGLObject texture, GCGLenum target, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY) final; 470 468 471 #if USE(OPENGL) && ENABLE(WEBGL2) 469 472 void primitiveRestartIndex(GCGLuint); -
trunk/Source/WebKit/ChangeLog
r273212 r273213 1 2021-02-20 Peng Liu <peng.liu6@apple.com> 2 3 Video elements do not work as sources for TexImage2D calls in GPU Process 4 https://bugs.webkit.org/show_bug.cgi?id=218184 5 6 Reviewed by Jer Noble. 7 8 Add an IPC message `RemoteGraphicsContextGL::CopyTextureFromMedia` to implement 9 `RemoteGraphicsContextGLProxy::copyTextureFromMedia()` in the Web process. 10 11 * GPUProcess/graphics/RemoteGraphicsContextGL.cpp: 12 (WebKit::RemoteGraphicsContextGL::copyTextureFromMedia): 13 * GPUProcess/graphics/RemoteGraphicsContextGL.h: 14 We should use `m_gpuConnectionToWebProcess` in the main thread only. 15 16 * GPUProcess/graphics/RemoteGraphicsContextGL.messages.in: 17 18 * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp: 19 (WebKit::RemoteGraphicsContextGLProxy::copyTextureFromMedia): 20 * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h: 21 22 * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: 23 * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: 24 1 25 2021-02-20 Youenn Fablet <youenn@apple.com> 2 26 -
trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp
r273204 r273213 35 35 #include <WebCore/GraphicsContextGLOpenGL.h> 36 36 #include <WebCore/NotImplemented.h> 37 #include <wtf/MainThread.h> 37 38 #include <wtf/NeverDestroyed.h> 39 40 #if USE(AVFOUNDATION) 41 #include <WebCore/GraphicsContextGLCV.h> 42 #endif 38 43 39 44 namespace WebKit { … … 59 64 60 65 RemoteGraphicsContextGL::RemoteGraphicsContextGL(GPUConnectionToWebProcess& gpuConnectionToWebProcess, GraphicsContextGLIdentifier graphicsContextGLIdentifier, RemoteRenderingBackend& renderingBackend, IPC::StreamConnectionBuffer&& stream) 61 : m_streamConnection(IPC::StreamServerConnection<RemoteGraphicsContextGL>::create(gpuConnectionToWebProcess.connection(), WTFMove(stream), remoteGraphicsContextGLStreamWorkQueue())) 66 : m_gpuConnectionToWebProcess(makeWeakPtr(gpuConnectionToWebProcess)) 67 , m_streamConnection(IPC::StreamServerConnection<RemoteGraphicsContextGL>::create(gpuConnectionToWebProcess.connection(), WTFMove(stream), remoteGraphicsContextGLStreamWorkQueue())) 62 68 , m_graphicsContextGLIdentifier(graphicsContextGLIdentifier) 63 69 , m_renderingBackend(makeRef(renderingBackend)) … … 202 208 } 203 209 210 void RemoteGraphicsContextGL::copyTextureFromMedia(WebCore::MediaPlayerIdentifier mediaPlayerIdentifier, uint32_t texture, uint32_t target, int32_t level, uint32_t internalFormat, uint32_t format, uint32_t type, bool premultiplyAlpha, bool flipY, CompletionHandler<void(bool)>&& completionHandler) 211 { 212 #if USE(AVFOUNDATION) 213 UNUSED_VARIABLE(premultiplyAlpha); 214 ASSERT_UNUSED(target, target == GraphicsContextGL::TEXTURE_2D); 215 216 RetainPtr<CVPixelBufferRef> pixelBuffer; 217 auto getPixelBuffer = [&] { 218 if (!m_gpuConnectionToWebProcess) 219 return; 220 221 if (auto mediaPlayer = m_gpuConnectionToWebProcess->remoteMediaPlayerManagerProxy().mediaPlayer(mediaPlayerIdentifier)) 222 pixelBuffer = mediaPlayer->pixelBufferForCurrentTime(); 223 }; 224 225 if (isMainThread()) 226 getPixelBuffer(); 227 else 228 callOnMainThreadAndWait(WTFMove(getPixelBuffer)); 229 230 if (!pixelBuffer) { 231 completionHandler(false); 232 return; 233 } 234 235 auto contextCV = m_context->asCV(); 236 if (!contextCV) { 237 completionHandler(false); 238 return; 239 } 240 241 completionHandler(contextCV->copyPixelBufferToTexture(pixelBuffer.get(), texture, level, internalFormat, format, type, GraphicsContextGL::FlipY(flipY))); 242 #else 243 UNUSED_VARIABLE(mediaPlayerIdentifier); 244 UNUSED_VARIABLE(texture); 245 UNUSED_VARIABLE(target); 246 UNUSED_VARIABLE(level); 247 UNUSED_VARIABLE(internalFormat); 248 UNUSED_VARIABLE(format); 249 UNUSED_VARIABLE(type); 250 UNUSED_VARIABLE(premultiplyAlpha); 251 UNUSED_VARIABLE(flipY); 252 253 notImplemented(); 254 completionHandler(false); 255 #endif 256 } 257 204 258 } // namespace WebKit 205 259 -
trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h
r273204 r273213 92 92 void paintRenderingResultsToCanvas(WebCore::RenderingResourceIdentifier, CompletionHandler<void()>&&); 93 93 void paintCompositedResultsToCanvas(WebCore::RenderingResourceIdentifier, CompletionHandler<void()>&&); 94 void copyTextureFromMedia(WebCore::MediaPlayerIdentifier, uint32_t texture, uint32_t target, int32_t level, uint32_t internalFormat, uint32_t format, uint32_t type, bool premultiplyAlpha, bool flipY, CompletionHandler<void(bool)>&&); 94 95 95 96 #include "RemoteGraphicsContextGLFunctionsGenerated.h" // NOLINT … … 97 98 void paintImageDataToImageBuffer(RefPtr<WebCore::ImageData>&&, WebCore::RenderingResourceIdentifier, CompletionHandler<void()>&&); 98 99 100 WeakPtr<GPUConnectionToWebProcess> m_gpuConnectionToWebProcess; 99 101 RefPtr<IPC::StreamServerConnection<RemoteGraphicsContextGL>> m_streamConnection; 100 102 RefPtr<WebCore::GraphicsContextGLOpenGL> m_context; -
trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in
r273204 r273213 37 37 void SynthesizeGLError(uint32_t error) 38 38 void GetError() -> (uint32_t returnValue) Synchronous 39 void PaintRenderingResultsToCanvas(WebCore::RenderingResourceIdentifier i dentifier) -> () Synchronous40 void PaintCompositedResultsToCanvas(WebCore::RenderingResourceIdentifier i dentifier) -> () Synchronous41 39 void PaintRenderingResultsToCanvas(WebCore::RenderingResourceIdentifier imageBuffer) -> () Synchronous 40 void PaintCompositedResultsToCanvas(WebCore::RenderingResourceIdentifier imageBuffer) -> () Synchronous 41 void CopyTextureFromMedia(WebCore::MediaPlayerIdentifier identifier, uint32_t texture, uint32_t target, int32_t level, uint32_t internalFormat, uint32_t format, uint32_t type, bool premultiplyAlpha, bool flipY) -> (bool success) Synchronous 42 42 43 43 void SetFailNextGPUStatusCheck() -
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp
r273204 r273213 165 165 } 166 166 167 bool RemoteGraphicsContextGLProxy::copyTextureFromMedia(MediaPlayer& mediaPlayer, PlatformGLObject texture, GCGLenum target, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY) 168 { 169 bool result = false; 170 auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::CopyTextureFromMedia(mediaPlayer.identifier(), texture, target, level, internalFormat, format, type, premultiplyAlpha, flipY), Messages::RemoteGraphicsContextGL::CopyTextureFromMedia::Reply(result)); 171 if (!sendResult) { 172 markContextLost(); 173 return false; 174 } 175 176 return result; 177 } 178 167 179 void RemoteGraphicsContextGLProxy::synthesizeGLError(GCGLenum error) 168 180 { -
trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h
r273204 r273213 70 70 void synthesizeGLError(GCGLenum error) final; 71 71 GCGLenum getError() final; 72 73 bool copyTextureFromMedia(WebCore::MediaPlayer&, PlatformGLObject texture, GCGLenum target, GCGLint level, GCGLenum internalFormat, GCGLenum format, GCGLenum type, bool premultiplyAlpha, bool flipY) final; 72 74 73 75 // Functions with a generated implementation. This list is used by generate-gpup-webgl script. -
trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
r272908 r273213 849 849 } 850 850 851 #if !USE(AVFOUNDATION) 851 852 bool MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture(WebCore::GraphicsContextGL*, PlatformGLObject, GCGLenum, GCGLint, GCGLenum, GCGLenum, GCGLenum, bool, bool) 852 853 { … … 854 855 return false; 855 856 } 857 #endif 856 858 857 859 RefPtr<NativeImage> MediaPlayerPrivateRemote::nativeImageForCurrentTime() -
trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h
r271219 r273213 282 282 void paint(WebCore::GraphicsContext&, const WebCore::FloatRect&) final; 283 283 void paintCurrentFrameInContext(WebCore::GraphicsContext&, const WebCore::FloatRect&) final; 284 #if !USE(AVFOUNDATION) 284 285 bool copyVideoTextureToPlatformTexture(WebCore::GraphicsContextGL*, PlatformGLObject, GCGLenum, GCGLint, GCGLenum, GCGLenum, GCGLenum, bool, bool) final; 286 #endif 285 287 RefPtr<WebCore::NativeImage> nativeImageForCurrentTime() final; 286 288 -
trunk/Tools/ChangeLog
r273209 r273213 1 2021-02-20 Peng Liu <peng.liu6@apple.com> 2 3 Video elements do not work as sources for TexImage2D calls in GPU Process 4 https://bugs.webkit.org/show_bug.cgi?id=218184 5 6 Reviewed by Jer Noble. 7 8 * Scripts/generate-gpup-webgl: 9 1 10 2021-02-20 Jiewen Tan <jiewen_tan@apple.com> 2 11 -
trunk/Tools/Scripts/generate-gpup-webgl
r273204 r273213 104 104 void PaintRenderingResultsToCanvas(WebCore::RenderingResourceIdentifier imageBuffer) -> () Synchronous 105 105 void PaintCompositedResultsToCanvas(WebCore::RenderingResourceIdentifier imageBuffer) -> () Synchronous 106 106 void CopyTextureFromMedia(WebCore::MediaPlayerIdentifier identifier, uint32_t texture, uint32_t target, int32_t level, uint32_t internalFormat, uint32_t format, uint32_t type, bool premultiplyAlpha, bool flipY) -> (bool success) Synchronous 107 107 {} 108 108 }} 109 109 110 110 #endif 111 112 111 """ 113 112 )
Note: See TracChangeset
for help on using the changeset viewer.