Bug 143763 - [W32] Wrong configure tests for OpenGL on Windows, wrong ifdefs
Summary: [W32] Wrong configure tests for OpenGL on Windows, wrong ifdefs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 133028
  Show dependency treegraph
 
Reported: 2015-04-15 06:25 PDT by LRN
Modified: 2015-05-18 11:44 PDT (History)
2 users (show)

See Also:


Attachments
Change OpenGL checks to work on W32, add libopengl32 (5.20 KB, patch)
2015-04-15 09:59 PDT, LRN
cgarcia: review+
cgarcia: commit-queue-
Details | Formatted Diff | Diff
wk patch (839 bytes, text/plain)
2015-04-17 16:32 PDT, Milan Crha
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description LRN 2015-04-15 06:25:18 PDT
OpenGLShims.cpp says PLATFORM(WIN), means OS(WINDOWS)
Comment 1 LRN 2015-04-15 09:59:19 PDT
Created attachment 250809 [details]
Change OpenGL checks to work on W32, add libopengl32

AGain, use OS(WINDOWS) for things that are W32 but not necessarily MSVC.
Don't try to check for dlopen() on W32 (it might be available, but
native code is already here, so use it).

Correctly cast the result of GetProcAddress(), because C++.

Link W32 version to -lOpenGL32 instead of -lGL, otherwise libtool complains:
*** Warning: linker path does not have real file for library -lGL.
Comment 2 Milan Crha 2015-04-17 16:32:16 PDT
Created attachment 251067 [details]
wk patch

Just in case, this is the only change I use with webkit-2.4 branch at revision 182543, even I configure with:

--enable-win32-target --enable-spellcheck --enable-jit --disable-geolocation --disable-video --disable-web-audio --disable-webgl --disable-accelerated-compositing --disable-glx --disable-egl --disable-gles2 --disable-webkit2 --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf

thus maybe the LRN changes are skipped completely for me.
Comment 3 LRN 2015-04-17 17:42:53 PDT
(In reply to comment #2)
> Created attachment 251067 [details]
> wk patch
> 
> Just in case, this is the only change I use with webkit-2.4 branch at
> revision 182543, even I configure with:
> 
> --enable-win32-target --enable-spellcheck --enable-jit --disable-geolocation
> --disable-video --disable-web-audio --disable-webgl
> --disable-accelerated-compositing --disable-glx --disable-egl
> --disable-gles2 --disable-webkit2 --disable-gtk-doc --disable-gtk-doc-html
> --disable-gtk-doc-pdf
> 
> thus maybe the LRN changes are skipped completely for me.

These are practically equivalent.

This:

+    elif test "$os_win32" = "yes"; then
+        acceleration_description="$acceleration_description (gl"
+        OPENGL_LIBS="-lopengl32"
     else
         acceleration_description="$acceleration_description (gl"
         OPENGL_LIBS="-lGL"

comes just a few lines above this:

     else
         acceleration_description="$acceleration_description (gl"
-        OPENGL_LIBS="-lGL"
+        case "$host" in
+            *-*-mingw*)
+                OPENGL_LIBS="-lopengl32"
+                ;;
+            *)
+                OPENGL_LIBS="-lGL"
+                ;;
+        esac

and does the same thing in a slightly diffrent way (checks for os_win32, not host).

Also, AFAIU, some webgl code is still compiled even with --disable-webgl. I didn't dig any further though. My configure arguments are:
    --disable-x11-target \
    --enable-win32-target \
    --enable-jit \
    --with-gtk=3.0 \
    --enable-webgl \
    --disable-webkit2 \
    --enable-spellcheck \
    --disable-geolocation \
    --disable-accelerated-compositing \
    --enable-debug-symbols=min \
    --enable-optimizations \
    --enable-introspection \
    --enable-gtk-doc \
    --enable-silent-rules \
Comment 4 Carlos Garcia Campos 2015-05-18 11:44:52 PDT
Committed to 2.4 http://trac.webkit.org/changeset/184505