Bug 58434

Summary: Gtk+ port fails to build when enabling WebGL
Product: WebKit Reporter: Thierry Reding <thierry.reding>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mrobinson, thierry.reding
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Fix Gtk+ port with WebGL enabled. none

Description Thierry Reding 2011-04-13 06:00:30 PDT
I'm getting the following error when building latest WebKit (r83714):

  CXX    Source/WebCore/platform/graphics/opengl/libWebCore_la-GraphicsContext3DOpenGL.lo
In file included from ../Source/JavaScriptCore/wtf/PassRefPtr.h:25:0,
                 from ../Source/JavaScriptCore/wtf/CrossThreadRefCounted.h:35,
                 from ../Source/JavaScriptCore/wtf/text/StringImpl.h:28,
                 from ../Source/JavaScriptCore/wtf/text/WTFString.h:28,
                 from ../Source/WebCore/platform/text/PlatformString.h:28,
                 from ../Source/WebCore/platform/graphics/GraphicsContext3D.h:32,
                 from ../Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:30:
../Source/JavaScriptCore/wtf/NullPtr.h:48:1: warning: identifier ‘nullptr’ will become a keyword in C++0x [-Wc++0x-compat]
../Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: In member function ‘void WebCore::GraphicsContext3D::paintRenderingResultsToCanvas(WebCore::CanvasRenderingContext*)’:
../Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:143:95: error: no matching function for call to ‘WebCore::GraphicsContext3D::paintToCanvas(WTF::OwnArrayPtr<unsigned char>::PtrType, int&, int&, int, int, PlatformGraphicsContext*)’
../Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:143:95: note: candidate is:
../Source/WebCore/platform/graphics/GraphicsContext3D.h:767:10: note: void WebCore::GraphicsContext3D::paintToCanvas(const unsigned char*, int, int, int, int, cairo_t*)
../Source/WebCore/platform/graphics/GraphicsContext3D.h:767:10: note:   no known conversion for argument 6 from ‘PlatformGraphicsContext*’ to ‘cairo_t*’

The error seems to be caused by commit 82962, which wraps the cairo context
within PlatformContextCairo. The attached patch fixes things.
Comment 1 Thierry Reding 2011-04-13 06:13:18 PDT
Created attachment 89368 [details]
Fix Gtk+ port with WebGL enabled.
Comment 2 Martin Robinson 2011-04-13 09:23:45 PDT
Committed r83745: <http://trac.webkit.org/changeset/83745>