Title: [190503] branches/safari-601-branch/Source/WebCore
- Revision
- 190503
- Author
- [email protected]
- Date
- 2015-10-02 06:58:12 -0700 (Fri, 02 Oct 2015)
Log Message
Merge r190380. rdar://problem/22888962
Modified Paths
Diff
Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (190502 => 190503)
--- branches/safari-601-branch/Source/WebCore/ChangeLog 2015-10-02 13:58:08 UTC (rev 190502)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog 2015-10-02 13:58:12 UTC (rev 190503)
@@ -1,5 +1,36 @@
2015-10-02 Matthew Hanson <[email protected]>
+ Merge r190380. rdar://problem/22888962
+
+ 2015-09-30 Dean Jackson <[email protected]>
+
+ Crash in gleLookupHashObject when context is lost
+ https://bugs.webkit.org/show_bug.cgi?id=149690
+ <rdar://problem/22751585>
+ <rdar://problem/22465495>
+
+ Reviewed by Simon Fraser.
+
+ When we received notification that the GPU has reset,
+ we were nulling out and deleting our OpenGL contexts
+ and then trying to do it all over again. The fix was
+ to flip the order of operations.
+
+ While there I added some logging, and changed the
+ way we check GPU status to make sure we do a check
+ after the first draw call.
+
+ Unfortunately we can't test automatically because it
+ involves resetting the GPU which can possibly cause
+ concurrent tests to fail.
+
+ * platform/graphics/mac/GraphicsContext3DMac.mm:
+ (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): Move forceContextLost()
+ to be the first thing we do after we've realised we need to
+ bail.
+
+2015-10-02 Matthew Hanson <[email protected]>
+
Merge r190252. rdar://problem/22867962
2015-09-25 Beth Dakin <[email protected]>
Modified: branches/safari-601-branch/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm (190502 => 190503)
--- branches/safari-601-branch/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm 2015-10-02 13:58:08 UTC (rev 190502)
+++ branches/safari-601-branch/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm 2015-10-02 13:58:12 UTC (rev 190503)
@@ -40,6 +40,7 @@
#include "GraphicsContext.h"
#include "HTMLCanvasElement.h"
#include "ImageBuffer.h"
+#include "Logging.h"
#if PLATFORM(IOS)
#import "OpenGLESSPI.h"
#import <OpenGLES/ES2/glext.h>
@@ -373,25 +374,27 @@
void GraphicsContext3D::checkGPUStatusIfNecessary()
{
#if USE_GPU_STATUS_CHECK
+ bool needsCheck = !GPUCheckCounter;
GPUCheckCounter = (GPUCheckCounter + 1) % GPUStatusCheckThreshold;
- if (GPUCheckCounter)
+
+ if (!needsCheck)
return;
+
+ GLint restartStatus = 0;
#if PLATFORM(MAC)
- GLint restartStatus = 0;
CGLGetParameter(platformGraphicsContext3D(), kCGLCPGPURestartStatus, &restartStatus);
if (restartStatus == kCGLCPGPURestartStatusCaused || restartStatus == kCGLCPGPURestartStatusBlacklisted) {
+ LOG(WebGL, "The GPU has either reset or blacklisted us. Lose the context.");
+ forceContextLost();
CGLSetCurrentContext(0);
- CGLDestroyContext(platformGraphicsContext3D());
- forceContextLost();
}
#elif PLATFORM(IOS)
- GLint restartStatus = 0;
EAGLContext* currentContext = static_cast<EAGLContext*>(PlatformGraphicsContext3D());
[currentContext getParameter:kEAGLCPGPURestartStatus to:&restartStatus];
if (restartStatus == kEAGLCPGPURestartStatusCaused || restartStatus == kEAGLCPGPURestartStatusBlacklisted) {
+ LOG(WebGL, "The GPU has either reset or blacklisted us. Lose the context.");
+ forceContextLost();
[EAGLContext setCurrentContext:0];
- [static_cast<EAGLContext*>(currentContext) release];
- forceContextLost();
}
#endif
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes