I have a question regarding SurfaceFlinger Layer updates with OpenGLES
sw.

SurfaceFlinger uses OpenGLES (agl) to update layers with alpha or
blending effects (see LayerBase::drawWithOpenGL). During layer
updates, I notice that the 3D sw engine writes data in the wrong
framebuffer page currently sent to the LCD: right writes and wrong
writes are "mixed" as if two processes were updating the screen during
a short while... This behaviour is not compatible with the double
buffering "concept" and it creates inconsistent data visible on the
screen as small horizontal lines (only on hw, not in the emulator).

My questions:
- Is there an available lock mechanism to prevent SurfaceFlinger (ie
OpenGLES sw renderer) to write in the wrong framebuffer page when
updating layers with alpha channel or blending effects (layers without
alpha are properly updated)
- Does anyone encounter such behaviour?


If I disable blending effects in LayerBase.cpp drawWithOpenGL():
+glDisable(GL_BLEND);
    if (UNLIKELY(transformed()
           || !(mFlags & DisplayHardware::DRAW_TEXTURE_EXTENSION) ))

there is no more inconsistent data on the LCD (of course, layers are
not properly displayed because there is no more transparency...)

I put traces in PixelFlinger scanline_t32cb16blend() function and I
verified that there are writes to the wrong framebuffer pages.

Notes:
- I have tried with framebuffer in cacheable & in non cacheable memory
with the same result.
- I have tried with pmem in cacheable & in non cacheable memory with
the same result.

Thanks

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to