I suppose you are referring to the OpenGL texture coordinate system.

Surfaceflinger uses OpenGL ES and textures. Surfaces are stored as
textures.

When SurfaceFlinger needs to draw a surface, the coordinates need to be
mapped from pixel X,Y to texture X,Y. In OpenGL, (0,0) is bottom left and
(1,1) is top right. Note that the coordinates are normalized to fall in the
range 0..1, plus the Y axis is actually reversed! That's why you see the
one minus for y coordinates...

--Shree
On 02-Sep-2015 10:53 pm, "林作健" <manjian2...@gmail.com> wrote:

> Hi recently when I am digging surfaceflinger's code, I found this service
> draw its layer vertically flipped. Using the method like 1.0f minus top. I
> feel confused and wonder why it is done like that. Can anyone explain it?
> Thanks.
>
> --
> --
> unsubscribe: android-porting+unsubscr...@googlegroups.com
> website: http://groups.google.com/group/android-porting
>
> ---
> You received this message because you are subscribed to the Google Groups
> "android-porting" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-porting+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

--- 
You received this message because you are subscribed to the Google Groups 
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-porting+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to