Title: [106956] trunk/Source/WebCore
- Revision
- 106956
- Author
- d...@apple.com
- Date
- 2012-02-07 09:34:59 -0800 (Tue, 07 Feb 2012)
Log Message
Apple/Safari: Enable WebGL multisampling on ATI cards
for OS X 10.7.2 and above.
https://bugs.webkit.org/show_bug.cgi?id=77922
Reviewed by Chris Marrin.
Follow Chrome's lead to allow WebGL antialiasing
on ATI cards as long as we're on 10.7.2 and above.
No new tests. Covered by existing tests.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::systemAllowsMultisamplingOnATICards):
(WebCore):
(WebCore::GraphicsContext3D::validateAttributes):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (106955 => 106956)
--- trunk/Source/WebCore/ChangeLog 2012-02-07 17:21:25 UTC (rev 106955)
+++ trunk/Source/WebCore/ChangeLog 2012-02-07 17:34:59 UTC (rev 106956)
@@ -1,3 +1,21 @@
+2012-02-07 Dean Jackson <d...@apple.com>
+
+ Apple/Safari: Enable WebGL multisampling on ATI cards
+ for OS X 10.7.2 and above.
+ https://bugs.webkit.org/show_bug.cgi?id=77922
+
+ Reviewed by Chris Marrin.
+
+ Follow Chrome's lead to allow WebGL antialiasing
+ on ATI cards as long as we're on 10.7.2 and above.
+
+ No new tests. Covered by existing tests.
+
+ * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
+ (WebCore::systemAllowsMultisamplingOnATICards):
+ (WebCore):
+ (WebCore::GraphicsContext3D::validateAttributes):
+
2012-02-07 Pavel Feldman <pfeld...@google.com>
Web Inspector: add generic support for undo-ing DOM edits.
Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp (106955 => 106956)
--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp 2012-02-07 17:21:25 UTC (rev 106955)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp 2012-02-07 17:34:59 UTC (rev 106956)
@@ -60,6 +60,21 @@
namespace WebCore {
+static bool systemAllowsMultisamplingOnATICards()
+{
+#if PLATFORM(MAC)
+ static SInt32 version;
+ if (!version) {
+ if (Gestalt(gestaltSystemVersion, &version) != noErr)
+ return false;
+ }
+ // See https://bugs.webkit.org/show_bug.cgi?id=77922 for more details
+ return version > 0x1072;
+#else
+ return false;
+#endif
+}
+
void GraphicsContext3D::validateAttributes()
{
Extensions3D* extensions = getExtensions();
@@ -74,9 +89,10 @@
}
if (m_attrs.antialias) {
bool isValidVendor = true;
- // Currently in Mac we only turn on antialias if vendor is NVIDIA.
+ // Currently in Mac we only turn on antialias if vendor is NVIDIA,
+ // or if ATI and on 10.7.2 and above.
const char* vendor = reinterpret_cast<const char*>(::glGetString(GL_VENDOR));
- if (!std::strstr(vendor, "NVIDIA"))
+ if (!std::strstr(vendor, "NVIDIA") && !(std::strstr(vendor, "ATI") && systemAllowsMultisamplingOnATICards()))
isValidVendor = false;
if (!isValidVendor || !extensions->supports("GL_ANGLE_framebuffer_multisample") || isGLES2Compliant())
m_attrs.antialias = false;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes