Title: [223257] branches/safari-604-branch/Source/WebCore
- Revision
- 223257
- Author
- [email protected]
- Date
- 2017-10-12 14:21:57 -0700 (Thu, 12 Oct 2017)
Log Message
Cherry-pick r223063. rdar://problem/34921832
Modified Paths
Diff
Modified: branches/safari-604-branch/Source/WebCore/ChangeLog (223256 => 223257)
--- branches/safari-604-branch/Source/WebCore/ChangeLog 2017-10-12 21:16:59 UTC (rev 223256)
+++ branches/safari-604-branch/Source/WebCore/ChangeLog 2017-10-12 21:21:57 UTC (rev 223257)
@@ -1,5 +1,25 @@
2017-10-13 Dean Jackson <[email protected]>
+ Cherry-pick r223063. rdar://problem/34921832
+
+ 2017-10-09 Dean Jackson <[email protected]>
+
+ [WebGL] Third IOSurface buffer might be allocated with the wrong size
+ https://bugs.webkit.org/show_bug.cgi?id=178092
+ <rdar://problem/34893173>
+
+ Reviewed by Jer Noble.
+
+ If the WebGL canvas resizes after the third buffer was allocated, it
+ was never getting told that its backing store should be thrown away.
+
+ * platform/graphics/cocoa/WebGLLayer.mm: Allocate the third buffer at
+ the same time as the first two.
+ (-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]):
+ (-[WebGLLayer bindFramebufferToNextAvailableSurface]):
+
+2017-10-13 Dean Jackson <[email protected]>
+
Cherry-pick r222961. rdar://problem/34891070
2017-10-05 Dean Jackson <[email protected]>
Modified: branches/safari-604-branch/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm (223256 => 223257)
--- branches/safari-604-branch/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm 2017-10-12 21:16:59 UTC (rev 223256)
+++ branches/safari-604-branch/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm 2017-10-12 21:21:57 UTC (rev 223257)
@@ -153,8 +153,10 @@
_usingAlpha = usingAlpha;
_contentsBuffer = WebCore::IOSurface::create(size, sRGBColorSpaceRef());
_drawingBuffer = WebCore::IOSurface::create(size, sRGBColorSpaceRef());
+ _spareBuffer = WebCore::IOSurface::create(size, sRGBColorSpaceRef());
ASSERT(_contentsBuffer);
ASSERT(_drawingBuffer);
+ ASSERT(_spareBuffer);
}
- (void)bindFramebufferToNextAvailableSurface
@@ -162,11 +164,8 @@
GC3Denum texture = _context->platformTexture();
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, texture);
- if (_drawingBuffer && _drawingBuffer->isInUse()) {
- if (!_spareBuffer)
- _spareBuffer = WebCore::IOSurface::create(_bufferSize, sRGBColorSpaceRef());
+ if (_drawingBuffer && _drawingBuffer->isInUse())
std::swap(_drawingBuffer, _spareBuffer);
- }
IOSurfaceRef ioSurface = _drawingBuffer->surface();
GC3Denum internalFormat = _usingAlpha ? GL_RGBA : GL_RGB;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes