All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos Rafael Giani <dv@pseudoterminal.org>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-browser][PATCH v2 3/4] chromium: Add use-egl PACKAGECONFIG option
Date: Tue, 29 Apr 2014 21:53:40 +0200	[thread overview]
Message-ID: <53600344.4030801@pseudoterminal.org> (raw)
In-Reply-To: <CAP9ODKq3Es6T2weEZXZnUtYHs3J6FKVG1e6VA-6k8j_425wuvA@mail.gmail.com>

On 2014-04-29 20:30, Otavio Salvador wrote:
> On Tue, Apr 29, 2014 at 3:39 AM, Carlos Rafael Giani
> <dv@pseudoterminal.org> wrote:
>> By default, Chromium will try to use GLX and regular OpenGL. On embedded
>> platforms, these are often not present, or unaccelerated, and using EGL
>> and OpenGL ES instead makes more sense. To produce builds that use EGL and
>> OpenGL ES by default instead, this PACKAGECONFIG option can be used.
>>
>> An EGL/OpenGLES-enabled build produces a chromium version that renders
>> 2D and WebGL with GPU acceleration (if present).
>>
>> Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
>> ---
>>   recipes-browser/chromium/chromium_35.0.1883.0.bb | 8 +++++++-
>>   1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/recipes-browser/chromium/chromium_35.0.1883.0.bb b/recipes-browser/chromium/chromium_35.0.1883.0.bb
>> index 1923b4e..1fb050f 100644
>> --- a/recipes-browser/chromium/chromium_35.0.1883.0.bb
>> +++ b/recipes-browser/chromium/chromium_35.0.1883.0.bb
>> @@ -23,6 +23,10 @@ COMPATIBLE_MACHINE_armv7a = "(.*)"
>>
>>   inherit gettext
>>
>> +# this makes sure the dependencies for the EGL mode are present; otherwise, the configure scripts
>> +# automatically and silently fall back to GLX
>> +PACKAGECONFIG[use-egl] = ",,virtual/egl virtual/libgles2"
> There is any way to 'force' build to use egl here and fail if
> something here is missing?
>

That is actually tough. Chromium does not simply link to the EGL and 
GLESv2 libraries; it opens them with dlopen() and gets the GL function 
pointers with dlsym() , as part of the sandboxing strategy. Furthermore, 
cairo requires virtual/egl too (not virtual/libgles2 though). As for 
compilation errors, I haven't found a way to provoke them. I am not 
entirely sure if Chromium is using system EGL/GLES headers, or if it is 
always using its internal copy of the Khronos headers instead. I got 
conflicting responses. So, to be sure (and also to emphasize the 
dependency in the recipe), I added it.

What is certain is that without the --use-gl=egl switch, Chromium will 
always use GLX.


  reply	other threads:[~2014-04-29 19:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-29  6:39 [meta-browser][PATCH v2 0/4] Introduce EGL/GLES and component build patches for Chromium Carlos Rafael Giani
2014-04-29  6:39 ` [meta-browser][PATCH v2 1/4] chromium: Add component-build PACKAGECONFIG option Carlos Rafael Giani
2014-04-29 18:25   ` Otavio Salvador
2014-04-29 19:07     ` Carlos Rafael Giani
2014-04-29 19:10       ` Otavio Salvador
2014-04-29  6:39 ` [meta-browser][PATCH v2 2/4] chromium: Add variable to contain extra command-line arguments Carlos Rafael Giani
2014-04-29  6:39 ` [meta-browser][PATCH v2 3/4] chromium: Add use-egl PACKAGECONFIG option Carlos Rafael Giani
2014-04-29 18:30   ` Otavio Salvador
2014-04-29 19:53     ` Carlos Rafael Giani [this message]
2014-04-29  6:39 ` [meta-browser][PATCH v2 4/4] chromium: Add ignore-lost-context " Carlos Rafael Giani
2014-04-29 18:31 ` [meta-browser][PATCH v2 0/4] Introduce EGL/GLES and component build patches for Chromium Otavio Salvador

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53600344.4030801@pseudoterminal.org \
    --to=dv@pseudoterminal.org \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.