Diff
Modified: trunk/Source/WebCore/ChangeLog (100067 => 100068)
--- trunk/Source/WebCore/ChangeLog 2011-11-12 04:40:28 UTC (rev 100067)
+++ trunk/Source/WebCore/ChangeLog 2011-11-12 04:45:00 UTC (rev 100068)
@@ -1,3 +1,24 @@
+2011-11-11 Nat Duca <[email protected]>
+
+ Since GraphicsContext3D::makeContextCurrent can fail, return bool.
+
+ https://bugs.webkit.org/show_bug.cgi?id=72101
+
+ Reviewed by Kenneth Russell.
+
+ * platform/graphics/GraphicsContext3D.h:
+ * platform/graphics/efl/GraphicsContext3DEfl.cpp:
+ (WebCore::GraphicsContext3D::makeContextCurrent):
+ * platform/graphics/gtk/GraphicsContext3DGtk.cpp:
+ (WebCore::GraphicsContext3D::makeContextCurrent):
+ * platform/graphics/gtk/GraphicsContext3DPrivate.cpp:
+ (WebCore::GraphicsContext3DPrivate::makeContextCurrent):
+ * platform/graphics/gtk/GraphicsContext3DPrivate.h:
+ * platform/graphics/mac/GraphicsContext3DMac.mm:
+ (WebCore::GraphicsContext3D::makeContextCurrent):
+ * platform/graphics/qt/GraphicsContext3DQt.cpp:
+ (WebCore::GraphicsContext3D::makeContextCurrent):
+
2011-11-11 Ojan Vafai <[email protected]>
Unreviewed. Rollout http://trac.webkit.org/changeset/99744.
Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h (100067 => 100068)
--- trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h 2011-11-12 04:40:28 UTC (rev 100067)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext3D.h 2011-11-12 04:45:00 UTC (rev 100068)
@@ -498,7 +498,7 @@
PlatformLayer* platformLayer() const { return 0; }
#endif
#endif
- void makeContextCurrent();
+ bool makeContextCurrent();
#if PLATFORM(MAC) || PLATFORM(CHROMIUM) || PLATFORM(GTK) || PLATFORM(QT)
// With multisampling on, blit from multisampleFBO to regular FBO.
Modified: trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp (100067 => 100068)
--- trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp 2011-11-12 04:40:28 UTC (rev 100067)
+++ trunk/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp 2011-11-12 04:45:00 UTC (rev 100068)
@@ -65,9 +65,10 @@
}
#endif
-void GraphicsContext3D::makeContextCurrent()
+bool GraphicsContext3D::makeContextCurrent()
{
m_internal->makeContextCurrent();
+ return true;
}
bool GraphicsContext3D::isGLES2Compliant() const
Modified: trunk/Source/WebCore/platform/graphics/gtk/GraphicsContext3DGtk.cpp (100067 => 100068)
--- trunk/Source/WebCore/platform/graphics/gtk/GraphicsContext3DGtk.cpp 2011-11-12 04:40:28 UTC (rev 100067)
+++ trunk/Source/WebCore/platform/graphics/gtk/GraphicsContext3DGtk.cpp 2011-11-12 04:45:00 UTC (rev 100068)
@@ -135,11 +135,11 @@
::glDeleteFramebuffersEXT(1, &m_fbo);
}
-void GraphicsContext3D::makeContextCurrent()
+bool GraphicsContext3D::makeContextCurrent()
{
if (!m_private)
return;
- m_private->makeContextCurrent();
+ return m_private->makeContextCurrent();
}
PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D()
Modified: trunk/Source/WebCore/platform/graphics/gtk/GraphicsContext3DPrivate.cpp (100067 => 100068)
--- trunk/Source/WebCore/platform/graphics/gtk/GraphicsContext3DPrivate.cpp 2011-11-12 04:40:28 UTC (rev 100067)
+++ trunk/Source/WebCore/platform/graphics/gtk/GraphicsContext3DPrivate.cpp 2011-11-12 04:45:00 UTC (rev 100068)
@@ -234,7 +234,7 @@
}
}
-void GraphicsContext3DPrivate::makeContextCurrent()
+bool GraphicsContext3DPrivate::makeContextCurrent()
{
if (::glXGetCurrentContext() == m_context)
return;
Modified: trunk/Source/WebCore/platform/graphics/gtk/GraphicsContext3DPrivate.h (100067 => 100068)
--- trunk/Source/WebCore/platform/graphics/gtk/GraphicsContext3DPrivate.h 2011-11-12 04:40:28 UTC (rev 100067)
+++ trunk/Source/WebCore/platform/graphics/gtk/GraphicsContext3DPrivate.h 2011-11-12 04:45:00 UTC (rev 100068)
@@ -36,7 +36,7 @@
public:
static PassOwnPtr<GraphicsContext3DPrivate> create();
~GraphicsContext3DPrivate();
- void makeContextCurrent();
+ bool makeContextCurrent();
private:
friend class GraphicsContext3D;
Modified: trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm (100067 => 100068)
--- trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm 2011-11-12 04:40:28 UTC (rev 100067)
+++ trunk/Source/WebCore/platform/graphics/mac/GraphicsContext3DMac.mm 2011-11-12 04:45:00 UTC (rev 100068)
@@ -258,14 +258,15 @@
}
}
-void GraphicsContext3D::makeContextCurrent()
+bool GraphicsContext3D::makeContextCurrent()
{
if (!m_contextObj)
- return;
+ return false;
CGLContextObj currentContext = CGLGetCurrentContext();
if (currentContext != m_contextObj)
CGLSetCurrentContext(m_contextObj);
+ return true;
}
bool GraphicsContext3D::isGLES2Compliant() const
Modified: trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp (100067 => 100068)
--- trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp 2011-11-12 04:40:28 UTC (rev 100067)
+++ trunk/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp 2011-11-12 04:45:00 UTC (rev 100068)
@@ -415,9 +415,10 @@
}
#endif
-void GraphicsContext3D::makeContextCurrent()
+bool GraphicsContext3D::makeContextCurrent()
{
m_private->m_glWidget->makeCurrent();
+ return true;
}
void GraphicsContext3D::paintRenderingResultsToCanvas(CanvasRenderingContext* context, DrawingBuffer*)
Modified: trunk/Source/WebKit/chromium/ChangeLog (100067 => 100068)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-11-12 04:40:28 UTC (rev 100067)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-11-12 04:45:00 UTC (rev 100068)
@@ -1,3 +1,13 @@
+2011-11-11 Nat Duca <[email protected]>
+
+ Since GraphicsContext3D::makeContextCurrent can fail, return bool.
+
+ https://bugs.webkit.org/show_bug.cgi?id=72101
+
+ Reviewed by Kenneth Russell.
+
+ * src/GraphicsContext3DChromium.cpp:
+
2011-11-11 Ojan Vafai <[email protected]>
Unreviewed. Rolled DEPS.
Modified: trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp (100067 => 100068)
--- trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp 2011-11-12 04:40:28 UTC (rev 100067)
+++ trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp 2011-11-12 04:45:00 UTC (rev 100068)
@@ -1066,7 +1066,7 @@
}
#endif
-DELEGATE_TO_INTERNAL(makeContextCurrent)
+DELEGATE_TO_INTERNAL_R(makeContextCurrent, bool)
DELEGATE_TO_INTERNAL_2(reshape, int, int)
DELEGATE_TO_INTERNAL_1(activeTexture, GC3Denum)