Title: [223707] trunk/Source/WebCore
- Revision
- 223707
- Author
- d...@apple.com
- Date
- 2017-10-19 13:32:10 -0700 (Thu, 19 Oct 2017)
Log Message
Avoid duplicate multisample resolve before WebGL compositing
https://bugs.webkit.org/show_bug.cgi?id=178537
<rdar://problem/35080724>
Reviewed by Jer Noble.
Both endPaint and prepareTexture were doing the MSAA resolve
into the renderbuffer, and being called on macOS before compositing.
Without that step, endPaint became unnecessary on iOS so I renamed
it presentRenderbuffer.
Covered by existing tests.
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
(WebCore::GraphicsContext3D::presentRenderbuffer):
(WebCore::GraphicsContext3D::endPaint): Deleted.
* platform/graphics/cocoa/WebGLLayer.mm:
(-[WebGLLayer display]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (223706 => 223707)
--- trunk/Source/WebCore/ChangeLog 2017-10-19 20:30:40 UTC (rev 223706)
+++ trunk/Source/WebCore/ChangeLog 2017-10-19 20:32:10 UTC (rev 223707)
@@ -1,3 +1,25 @@
+2017-10-19 Dean Jackson <d...@apple.com>
+
+ Avoid duplicate multisample resolve before WebGL compositing
+ https://bugs.webkit.org/show_bug.cgi?id=178537
+ <rdar://problem/35080724>
+
+ Reviewed by Jer Noble.
+
+ Both endPaint and prepareTexture were doing the MSAA resolve
+ into the renderbuffer, and being called on macOS before compositing.
+ Without that step, endPaint became unnecessary on iOS so I renamed
+ it presentRenderbuffer.
+
+ Covered by existing tests.
+
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
+ (WebCore::GraphicsContext3D::presentRenderbuffer):
+ (WebCore::GraphicsContext3D::endPaint): Deleted.
+ * platform/graphics/cocoa/WebGLLayer.mm:
+ (-[WebGLLayer display]):
+
2017-10-19 Andy Estes <aes...@apple.com>
[Payment Request] Only process shipping options if shipping is requested, and throw an exception on duplicate shipping option IDs
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h (223706 => 223707)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h 2017-10-19 20:30:40 UTC (rev 223706)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h 2017-10-19 20:32:10 UTC (rev 223707)
@@ -1150,10 +1150,13 @@
bool paintCompositedResultsToCanvas(ImageBuffer*);
#if PLATFORM(COCOA)
- void endPaint();
bool texImageIOSurface2D(GC3Denum target, GC3Denum internalFormat, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, IOSurfaceRef, GC3Duint plane);
#endif
+#if PLATFORM(IOS)
+ void presentRenderbuffer();
+#endif
+
#if PLATFORM(MAC)
void allocateIOSurfaceBackingStore(IntSize);
void updateFramebufferTextureBackingStoreFromLayer();
Modified: trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm (223706 => 223707)
--- trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm 2017-10-19 20:30:40 UTC (rev 223706)
+++ trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm 2017-10-19 20:32:10 UTC (rev 223707)
@@ -657,21 +657,19 @@
#endif
}
-void GraphicsContext3D::endPaint()
+#if PLATFORM(IOS)
+void GraphicsContext3D::presentRenderbuffer()
{
makeContextCurrent();
if (m_attrs.antialias)
resolveMultisamplingIfNecessary();
-#if PLATFORM(IOS)
- // This is the place where we actually push our current rendering
- // results to the compositor on iOS. On macOS it comes from the
- // calling function, which is inside WebGLLayer.
+
::glFlush();
::glBindRenderbuffer(GL_RENDERBUFFER, m_texture);
[static_cast<EAGLContext*>(m_contextObj) presentRenderbuffer:GL_RENDERBUFFER];
[EAGLContext setCurrentContext:nil];
+}
#endif
-}
bool GraphicsContext3D::texImageIOSurface2D(GC3Denum target, GC3Denum internalFormat, GC3Dsizei width, GC3Dsizei height, GC3Denum format, GC3Denum type, IOSurfaceRef surface, GC3Duint plane)
{
Modified: trunk/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm (223706 => 223707)
--- trunk/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm 2017-10-19 20:30:40 UTC (rev 223706)
+++ trunk/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm 2017-10-19 20:32:10 UTC (rev 223707)
@@ -128,8 +128,6 @@
if (!_context)
return;
- _context->endPaint();
-
#if PLATFORM(MAC)
_context->prepareTexture();
if (_drawingBuffer) {
@@ -138,6 +136,8 @@
[self reloadValueForKeyPath:@"contents"];
[self bindFramebufferToNextAvailableSurface];
}
+#else
+ _context->presentRenderbuffer();
#endif
_context->markLayerComposited();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes