Changeset 283308 in webkit
- Timestamp:
- Sep 30, 2021, 5:47:13 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/GraphicsContextGLAttributes.h (modified) (1 diff)
-
platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm (modified) (2 diffs)
-
platform/graphics/opengl/GraphicsContextGLOpenGL.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r283307 r283308 1 2021-09-30 Kimmo Kinnunen <kkinnunen@apple.com> 2 3 GraphicsContextGLAttributes::hasFenceSync should be a property of GraphicsContextGLOpenGL 4 https://bugs.webkit.org/show_bug.cgi?id=230939 5 6 Reviewed by Antti Koivisto. 7 8 Move hasFenceSync from GraphicsContextGLAttributes to GraphicsContextGLOpenGL. 9 10 No new tests, a refactor. 11 12 * platform/graphics/GraphicsContextGLAttributes.h: 13 * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: 14 (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): 15 (WebCore::GraphicsContextGLOpenGL::prepareForDisplay): 16 * platform/graphics/opengl/GraphicsContextGLOpenGL.h: 17 1 18 2021-09-30 Youenn Fablet <youenn@apple.com> 2 19 -
trunk/Source/WebCore/platform/graphics/GraphicsContextGLAttributes.h
r281124 r283308 65 65 #if PLATFORM(COCOA) 66 66 bool useMetal { true }; 67 bool hasFenceSync { false };68 67 #endif 69 68 #if ENABLE(WEBXR) -
trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm
r283301 r283308 357 357 } 358 358 if (contextAttributes().useMetal) { 359 // The implementation uses GLsync objects. Enable the functionality for WebGL 1.0 contexts 360 // that use OpenGL ES 2.0. 359 // GraphicsContextGLOpenGL uses sync objects to throttle display on Metal implementations. 360 // OpenGL sync objects are not signaling upon completion on Catalina-era drivers, so 361 // OpenGL cannot use this method of throttling. OpenGL drivers typically implement 362 // some sort of internal throttling. 361 363 if (extensions.supports("GL_ARB_sync"_s)) { 362 attrs.hasFenceSync= true;364 m_useFenceSyncForDisplayRateLimit = true; 363 365 extensions.ensureEnabled("GL_ARB_sync"_s); 364 setContextAttributes(attrs);365 366 } 366 367 } … … 839 840 markLayerComposited(); 840 841 841 if (contextAttributes().useMetal && contextAttributes().hasFenceSync) { 842 // OpenGL sync objects are not signaling upon completion on Catalina-era drivers. 843 // OpenGL drivers typically implement some sort of internal throttling. 842 if (m_useFenceSyncForDisplayRateLimit) { 844 843 bool success = waitAndUpdateOldestFrame(); 845 844 UNUSED_VARIABLE(success); // FIXME: implement context lost. -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h
r283238 r283308 797 797 #endif 798 798 #if USE(ANGLE) 799 bool m_useFenceSyncForDisplayRateLimit = false; 799 800 static constexpr size_t maxPendingFrames = 3; 800 801 size_t m_oldestFrameCompletionFence { 0 };
Note:
See TracChangeset
for help on using the changeset viewer.