Title: [194485] trunk/Source/WebCore
- Revision
- 194485
- Author
- bfulg...@apple.com
- Date
- 2016-01-01 18:41:01 -0800 (Fri, 01 Jan 2016)
Log Message
[WebGL] Blacklisted OpenGL contexts are not safe to use
https://bugs.webkit.org/show_bug.cgi?id=152513
<rdar://problem/23127838>
Reviewed by Zalan Bujtas.
When the GPU has blacklisted an OpenGL context, it is not safe to use -- even to
attempt to release GL resources. Instead, our only correct behavior is to terminate
the WebProcess.
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): If the context was lost
because the GPU blacklisted it, terminate the process.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (194484 => 194485)
--- trunk/Source/WebCore/ChangeLog 2016-01-02 00:21:06 UTC (rev 194484)
+++ trunk/Source/WebCore/ChangeLog 2016-01-02 02:41:01 UTC (rev 194485)
@@ -1,3 +1,19 @@
+2015-12-22 Brent Fulgham <bfulg...@apple.com>
+
+ [WebGL] Blacklisted OpenGL contexts are not safe to use
+ https://bugs.webkit.org/show_bug.cgi?id=152513
+ <rdar://problem/23127838>
+
+ Reviewed by Zalan Bujtas.
+
+ When the GPU has blacklisted an OpenGL context, it is not safe to use -- even to
+ attempt to release GL resources. Instead, our only correct behavior is to terminate
+ the WebProcess.
+
+ * platform/graphics/mac/GraphicsContext3DMac.mm:
+ (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): If the context was lost
+ because the GPU blacklisted it, terminate the process.
+
2016-01-01 Jeff Miller <je...@apple.com>
Update user-visible copyright strings to include 2016
Modified: trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm (194484 => 194485)
--- trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm 2016-01-02 00:21:06 UTC (rev 194484)
+++ trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm 2016-01-02 02:41:01 UTC (rev 194485)
@@ -59,6 +59,7 @@
#include <runtime/Int32Array.h>
#include <runtime/Float32Array.h>
#include <runtime/Uint8Array.h>
+#include <sysexits.h>
#include <wtf/text/CString.h>
namespace WebCore {
@@ -376,8 +377,12 @@
GLint restartStatus = 0;
#if PLATFORM(MAC)
CGLGetParameter(platformGraphicsContext3D(), kCGLCPGPURestartStatus, &restartStatus);
- if (restartStatus == kCGLCPGPURestartStatusCaused || restartStatus == kCGLCPGPURestartStatusBlacklisted) {
- LOG(WebGL, "The GPU has either reset or blacklisted us. Lose the context.");
+ if (restartStatus == kCGLCPGPURestartStatusBlacklisted) {
+ LOG(WebGL, "The GPU has blacklisted us. Terminating.");
+ exit(EX_OSERR);
+ }
+ if (restartStatus == kCGLCPGPURestartStatusCaused) {
+ LOG(WebGL, "The GPU has reset us. Lose the context.");
forceContextLost();
CGLSetCurrentContext(0);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes