Thanks for your help, but I'm still quite confused! My big question
is: can I access the bitmap that the NativeBuffer supposedly should
have? Or it's only accessible on the hardware side?(I don't have
access to the proprietary source of the driver, so I would like to use
some existent function implemented by the driver that returns the
bitmap).

Is this possible?

On May 25, 5:26 pm, Dianne Hackborn <hack...@android.com> wrote:
> The surface flinger doesn't draw the buffer, the application does.
>
>
>
>
>
>
>
>
>
> On Wed, May 25, 2011 at 7:57 AM, drjunior <drjunior....@gmail.com> wrote:
> > 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 <extra.pedestr...@gmail.com>
> > 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 <drjunior....@gmail.com> 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: android-porting+unsubscr...@googlegroups.com
> > website:http://groups.google.com/group/android-porting
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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

Reply via email to