Version 2.3.3.

int FramebufferNativeWindow::queueBuffer(ANativeWindow* window,
        android_native_buffer_t* buffer)
{
    FramebufferNativeWindow* self = getSelf(window);
    Mutex::Autolock _l(self->mutex);
    framebuffer_device_t* fb = self->fbDev;
    buffer_handle_t handle = static_cast<NativeBuffer*>(buffer)-
>handle;

    const int index = self->mCurrentBufferIndex;
    GraphicLog& logger(GraphicLog::getInstance());
    logger.log(GraphicLog::SF_FB_POST_BEFORE, index);

    int res = fb->post(fb, handle);

    logger.log(GraphicLog::SF_FB_POST_AFTER, index);

    self->front = static_cast<NativeBuffer*>(buffer);
    self->mNumFreeBuffers++;
    self->mCondition.broadcast();
    return res;
}

There are a lot of "buffers"here!  (framebuffer_device_t* fb, self-
>front, handle..)
I can't see where is the "fill" of the buffers with some content. I
would like to find some kind of memcpy or something related with that.


On May 25, 2:38 pm, extrapedestrian <[email protected]>
wrote:
> What version of Android?
>
> in Froyo 2.2 there is FramebufferNativeWindow::queueBuffer and
> FramebufferNativeWindow::dequeueBuffer
> called in SwapBuffers before flip().
>
> I think you can access native buffer there.
>
> On May 24, 8:28 pm, drjunior <[email protected]> wrote:
>
>
>
>
>
>
>
> > I've been digging around SurfaceFlinger service implementation trying
> > to understand how it is implemented. I started studying the /
> > frameworks/base/services/surfaceflinger/SurfaceFlinger.cpp file and
> > the methods handleRepaint() and  composeSurfaces(). What I would like
> > to know is how I can access the buffers(if I can do that) that has the
> > bitmap of the rectangle changed. I already found where the flip is
> > done( /frameworks/base/services/surfaceflinger/DisplayHardware/
> > DisplayHardware.cpp::flip() ) and here I could confirm the size of the
> > rectangle(within the entire surface) that had changes. Now, I would
> > like to access the buffer of the surface that has the content with the
> > bitmap changed. There are a lot of files to search and without
> > documentation it's really difficult to find how to do that.
>
> > Thank you for your help.

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

Reply via email to