[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
cmarrin at apple.com
cmarrin at apple.com
Thu Oct 29 20:44:32 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 18afa062ea1adf10f027601b3a2dbee3640bb7ba
Author: cmarrin at apple.com <cmarrin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 14 17:18:14 2009 +0000
More changes to figure out why the webgl tests are crashing on the build bot.
* platform/graphics/mac/GraphicsContext3DMac.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index de0abe5..bb05dfc 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,10 @@
+2009-10-14 Chris Marrin <cmarrin at apple.com>
+
+ More changes to figure out why the webgl tests are crashing on the build bot.
+
+ * platform/graphics/mac/GraphicsContext3DMac.cpp:
+ (WebCore::GraphicsContext3D::GraphicsContext3D):
+
2009-10-14 Victor Wang <victorw at chromium.org>
Reviewed by David Hyatt.
diff --git a/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp b/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp
index ca5bfbe..64b288c 100644
--- a/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp
+++ b/WebCore/platform/graphics/mac/GraphicsContext3DMac.cpp
@@ -68,26 +68,45 @@ GraphicsContext3D::GraphicsContext3D()
(CGLPixelFormatAttribute) 0
};
+ // Make sure to change these constants to match the above list
+ const int superSampleIndex = 5;
+ const int depthSizeIndex = 4;
+
CGLPixelFormatObj pixelFormatObj = 0;
GLint numPixelFormats = 0;
- CGLError err = CGLChoosePixelFormat(attribs, &pixelFormatObj, &numPixelFormats);
- if (err != kCGLNoError) {
- // FIXME: temporary change to get error.
- fprintf(stderr, "CGLChoosePixelFormat failed, err %d\n", err);
- return;
+ // We will try for the above format first. If that fails, we will
+ // try for one without supersample. If that fails, we will try for
+ // one that has a 16 bit depth buffer. If none of that works, we
+ // simply fail and set m_contextObj to 0.
+ CGLChoosePixelFormat(attribs, &pixelFormatObj, &numPixelFormats);
+ if (numPixelFormats == 0) {
+ attribs[superSampleIndex] = static_cast<CGLPixelFormatAttribute>(0);
+ CGLChoosePixelFormat(attribs, &pixelFormatObj, &numPixelFormats);
+
+ if (numPixelFormats == 0) {
+ attribs[depthSizeIndex] = static_cast<CGLPixelFormatAttribute>(16);
+ CGLChoosePixelFormat(attribs, &pixelFormatObj, &numPixelFormats);
+
+ if (numPixelFormats == 0) {
+ // FIXME: temporary printf for diagnostics
+ fprintf(stderr, "CGLCreateContext failed, no pixel formats found\n");
+ m_contextObj = 0;
+ return;
+ }
+ }
}
- err = CGLCreateContext(pixelFormatObj, 0, &m_contextObj);
+ CGLError err = CGLCreateContext(pixelFormatObj, 0, &m_contextObj);
+ CGLDestroyPixelFormat(pixelFormatObj);
+
if (err != kCGLNoError || !m_contextObj) {
// FIXME: temporary change to get error.
fprintf(stderr, "CGLCreateContext failed, err %d (context %p)\n", err, m_contextObj);
m_contextObj = 0;
return;
}
-
- CGLDestroyPixelFormat(pixelFormatObj);
-
+
// Set the current context to the one given to us.
CGLSetCurrentContext(m_contextObj);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list