Hello,

On Jun 8, 2:13 pm, cemil <[email protected]> wrote:
> Hi Mathias,
>
> I'd like to clarify one point. If we implement copybit, will this only
> benefit SurfaceFlinger and not the (Java) apps? AFAIK, java apps use
> skia middleware. Does skia backend make use of copybit somehow? I
> can't see this in the code, but want to confirm. If that's true, what
> mechanisms are there for blit acceleration for apps?

Copybit is only used in SurfaceFlinger when OpenGL ES cannot be used
or when it's software.
Actually in the current implementation (cupcake), SurfaceFlinger
always uses copybit instead of GL if copybit is available -- but
that's an oversight.

There are no mechanism to accelerate applications at the moment. Skia
is a purely software renderer. It can greatly benefit from newer CPUs
though, which have SIMD instructions, often, it'll be able to operate
at bus speed in that case. We're working on optimization in that area.

If a device has a GPU, it makes no sense to implement copybit, because
(1) it won't be used by apps and (2) SurfaceFlinger already uses the
GPU for its work. Now, if the device has an additional 2D part (like
the G1), it is useful to implement copybit, this way application won't
have to share the GPU with SurfaceFlinger.


Mathias


>
> Thanks,
> Cemil
>
> On May 22, 3:52 am, pixelflinger <[email protected]> wrote:
>
>
>
> > Hi,
>
> > copybitis just an abstraction for a basic 2D blitter with support for
> > rotation, scaling and color/pixelformat conversions. These features
> > can be supported in full or partially.
>
> > If thecopybitmodule is present, then SurfaceFlinger will try to use
> > it instead of using OpenGL ES.
>
> > On the G1copybitis used for all window compositions and video
> > playback (CC and scaling), on this h/wcopybitis very fast and
> > provide very good up and down scaling.
>
> > HOWEVER, on the release after Donut, thecopybitmodule won't be used
> > by SurfaceFlinger directly, instead it will be used as a back-end for
> > our software OpenGL ES 1.x and SurfaceFlinger will only use the OpenGL
> > ES API.
> > Eventually, thecopybitmodule will be phased out, instead, we will
> > ask the ISV/OEMs to implement these features on their OpenGL ES
> > drivers, if they think it is necessary.
>
> > If your h/w doesn't have accelerated GL, but has some sort of decent
> > 2D blitter, you can write acopybitHAL module for it, and it will be
> > used automatically by SurfaceFlinger -- at least under cupcake and
> > donut.
>
> > Mathias
>
> > On May 20, 8:57 pm, Wenlong Li <[email protected]> wrote:
>
> > > Should I send this message to this group? anyone can help answer my
> > > question. thx very much
>
> > > On Wed, May 20, 2009 at 6:17 PM, Wenlong Li <[email protected]> wrote:
> > > > Hello,
>
> > > > Can anyone share some info aboutcopybit? I saw there is a header file
> > > > (copybit.h) under hardware directory, but don't know the detailed
> > > > implementation. I guess the main operation is to copy image from
> > > > source to destination, and scale image. Is my understanding correct?
>
> > > > Besides these, can it support image format conversion, such as from
> > > > YUV to RGB. Seems camera capatures image in YUV format, and does
> > > > conversion before showing it in screen.
>
> > > > The third question is which device is used forcopybit? GPU or other 
> > > > devices?
>
> > > > thx,
> > > > Wenlong
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to