Bug 58434 - Gtk+ port fails to build when enabling WebGL
Summary: Gtk+ port fails to build when enabling WebGL
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2011-04-13 06:00 PDT by Thierry Reding
Modified: 2011-04-13 09:23 PDT (History)
2 users (show)

See Also:

Fix Gtk+ port with WebGL enabled. (3.50 KB, patch)
2011-04-13 06:13 PDT, Thierry Reding
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>