Discussion:
[cairo] (no subject)
S***@mt.com
2018-09-18 06:29:41 UTC
Permalink
We are using cairo along with GTK2 (with Direct FB) on an embedded Linux system that does not have a FPU/GPU.

We see the rendering of screens being very slow and we suspect it could be because of floating point operations. Since we do not have complex graphics, it is possible to switch off floating point operations or even switch off "double"? Also I am not sure if this is the reason for the poor rendering performance.
Mike Gran
2018-09-18 13:09:22 UTC
Permalink
> We see the rendering of screens being very slow and we suspect it
> could be because of floating point operations. Since we do not have
> complex graphics, it is possible to switch off floating point operations
> or even switch off "double"?  Also I am not sure if this is the reason
> for the poor rendering performance.

I wonder if the problem actually might be the speed of writing to
the framebuffer.

I used to work on stuff like that, and I found that it was speedier to
do all my drawing onto a cairo image surface instead of directly on the
framebuffer.  I would draw an entire frame on the image surface,
and then paint the completed image onto the framebuffer surface.

-Mike Gran
--
cairo mailing list
***@cairographics.or
S***@mt.com
2018-09-21 08:21:36 UTC
Permalink
Hi,

Following additional details:


* Hardware details: PXA270 (ARMV Architecture) with on-chip internal display controller, operating on 512 MHz processor speed, having 64 MB RAM, no FPU/GPU

* Linux kernel version: V2.6.35.9

* Stack is wxWidgets (V3.0.4) -> GTK+2 (V2.24.32) -> Pango (V1.3.0) -> Cairo (V1.14.12) -> XFbdev (X server)

* For example, when calling wxMessgaeBox,

o First, background of message box is drawn

o After noticeable delay, the text and icon are drawn in the message box

o When click on "OK" button, message box disappears immediately


Best regards
Sathya

Begin forwarded message:
From: Mike Gran <***@yahoo.com<mailto:***@yahoo.com>>
Date: 18 September 2018 at 18:39:22 IST
To: <***@cairographics.org<mailto:***@cairographics.org>>, <***@mt.com<mailto:***@mt.com>>
Subject: Re: [cairo] (no subject)
We see the rendering of screens being very slow and we suspect it
could be because of floating point operations. Since we do not have
complex graphics, it is possible to switch off floating point operations
or even switch off "double"? Also I am not sure if this is the reason
for the poor rendering performance.

I wonder if the problem actually might be the speed of writing to
the framebuffer.

I used to work on stuff like that, and I found that it was speedier to
do all my drawing onto a cairo image surface instead of directly on the
framebuffer. I would draw an entire frame on the image surface,
and then paint the completed image onto the framebuffer surface.

-Mike Gran
Petr Kobalíček
2018-09-21 10:47:08 UTC
Permalink
Summary of the floating-point use of 2D libs:

- AGG - single/double precision
- Blend2D - double precision
- Cairo - double precision
- Direct2D - single precision
- Qt - single precision on ARM / double precision on X86 (qreal)
- SKIA - single precision or fixed point - compile-time option (SkScalar)

All libraries mentioned have rasterizers that use fixed point, so floating
point is only used to transform input coordinates and to convert them to
fixed point. SKIA would probably be the best candidate for 2D graphics
considering
your hardware, however, I would say that cairo is not really your issue
here as you have just 64MB RAM and you use 2 gui toolkits to create a
message box. I would consider replacing your entire stack in this case or
using a more powerful hardware that can handle it.

- Petr

On Fri, Sep 21, 2018 at 10:21 AM, <***@mt.com> wrote:

> Hi,
>
>
>
> Following additional details:
>
>
>
> · Hardware details: PXA270 (ARMV Architecture) with on-chip
> internal display controller, operating on 512 MHz processor speed, having
> 64 MB RAM, no FPU/GPU
>
> · Linux kernel version: V2.6.35.9
>
> · Stack is wxWidgets (V3.0.4) -> GTK+2 (V2.24.32) -> Pango (V1.3.0)
> -> Cairo (V1.14.12) -> XFbdev (X server)
>
> · For example, when calling wxMessgaeBox,
>
> o First, background of message box is drawn
>
> o After noticeable delay, the text and icon are drawn in the message box
>
> o When click on "OK" button, message box disappears immediately
>
>
>
> Best regards
>
> Sathya
>
>
>
> Begin forwarded message:
>
> *From:* Mike Gran <***@yahoo.com>
> *Date:* 18 September 2018 at 18:39:22 IST
> *To:* <***@cairographics.org>, <***@mt.com>
> *Subject:* *Re: [cairo] (no subject)*
>
> We see the rendering of screens being very slow and we suspect it
>
> could be because of floating point operations. Since we do not have
>
> complex graphics, it is possible to switch off floating point operations
>
> or even switch off "double"? Also I am not sure if this is the reason
>
> for the poor rendering performance.
>
>
> I wonder if the problem actually might be the speed of writing to
> the framebuffer.
>
> I used to work on stuff like that, and I found that it was speedier to
> do all my drawing onto a cairo image surface instead of directly on the
> framebuffer. I would draw an entire frame on the image surface,
> and then paint the completed image onto the framebuffer surface.
>
> -Mike Gran
>
>
> --
> cairo mailing list
> ***@cairographics.org
> https://lists.cairographics.org/mailman/listinfo/cairo
>
Bryce Harrington
2018-09-18 18:10:11 UTC
Permalink
On Tue, Sep 18, 2018 at 06:29:41AM +0000, ***@mt.com wrote:
> We are using cairo along with GTK2 (with Direct FB) on an embedded Linux system that does not have a FPU/GPU.
>
> We see the rendering of screens being very slow and we suspect it could be because of floating point operations. Since we do not have complex graphics, it is possible to switch off floating point operations or even switch off "double"? Also I am not sure if this is the reason for the poor rendering performance.
>

There is some code in cairo to use fixed point in some areas of the
renderer, but no switch to use it globally afaik.

Bryce
--
cairo mailing list
***@cairographics.org
https
Loading...