Summary: | [GTK] Accelerated 2D Canvas enabled when cairo-gl is not available | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mario Sanchez Prada <mario> | ||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cgarcia, clopez, gustavo, mcatanzaro, mrobinson | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Mario Sanchez Prada
2015-08-04 03:54:20 PDT
Created attachment 258170 [details]
Patch proposal
This patch works makes sure at ACCELERATED_2D_CANVAS cairo-gl is available only when cairo-gl is available in the system, setting it to OFF otherwise.
Excerpt of the relevant cmake output when cairo-gl IS available:
[...]
-- Found OPENGLES2: /usr/include
-- checking for module 'cairo-gl'
-- found cairo-gl, version 1.14.0
-- checking for module 'cairo-glx'
-- found cairo-glx, version 1.14.0
-- checking for module 'cairo-egl'
-- found cairo-egl, version 1.14.0
-- Found CairoGL: /usr/include/cairo;/usr/include/glib-2.0;/usr/lib/i386-linux-gnu/glib-2.0/include;/usr/include/pixman-1;/usr/include/freetype2;/usr/include/libpng12;/usr/include/libdrm;CAIRO_GLX_INCLUDE_DIRS;CAIRO_EGL_INCLUDE_DIRS (Required is at least version "1.10.2")
-- checking for module 'gtk+-3.0'
[...]
-- Enabled features:
-- ENABLE_ACCELERATED_2D_CANVAS ............ ON
-- ENABLE_CREDENTIAL_STORAGE ON
[...]
Excerpt of the relevant cmake output when cairo-gl IS NOT available:
[...]
-- Found OPENGLES2: /usr/include
-- checking for module 'cairo-gl'
-- package 'cairo-gl' not found
-- checking for module 'cairo-glx'
-- package 'cairo-glx' not found
-- checking for module 'cairo-egl'
-- package 'cairo-egl' not found
-- Could NOT find CairoGL (missing: CAIROGL_INCLUDE_DIRS CAIROGL_LIBRARIES) (Required is at least version "1.10.2")
-- checking for module 'gtk+-3.0'
[...]
-- Enabled features:
-- ENABLE_ACCELERATED_2D_CANVAS ............ OFF
-- ENABLE_CREDENTIAL_STORAGE ON
[...]
Please review, thanks!
Btw, it seems that the reason why this was not misbehaving in the 2.8.x releases is because of a typo in FindCairoGL.cmake: In the stable series, the last call to find_package_handle_standard_args() in that file was passing 'CairoGL' as an argument, therefore always defining CAIROGL_FOUND afterwards. However, CAIRO_GL_FOUND was being checked from OptionsGTK.cmake to set ENABLE_ACCELERATED_2D_CANVAS, effectively causing it to be always OFF, no matter what happened before. I'll be filing a new bug for the 2.8.x series soon, but I thought I would explain here why this was a problem now and not before, because it confused me too. (In reply to comment #2) > Btw, it seems that the reason why this was not misbehaving in the 2.8.x > releases is because of a typo in FindCairoGL.cmake: > > In the stable series, the last call to find_package_handle_standard_args() > in that file was passing 'CairoGL' as an argument, therefore always defining > CAIROGL_FOUND afterwards. However, CAIRO_GL_FOUND was being checked from > OptionsGTK.cmake to set ENABLE_ACCELERATED_2D_CANVAS, effectively causing it > to be always OFF, no matter what happened before. > > I'll be filing a new bug for the 2.8.x series soon, but I thought I would > explain here why this was a problem now and not before, because it confused > me too. Actually, I won't do that. All we'd have to do is to backport the patch for bug 144846 together with the one here to the stable releases and that would do it. I'll update trac.webkit.org/wiki/WebKitGTK/2.8.x instead Committed r187854: <http://trac.webkit.org/changeset/187854> |