Tuesday, October 18, 2011

Re: [android-developers] Re: honeycomb HW accelerated 2D bmp.copyPixelsFromBuffer(bf) not reupload texture to GPU

And I forgot: sorry for the inconvenience. Totally my fault!

On Tue, Oct 18, 2011 at 5:57 PM, Romain Guy <romainguy@android.com> wrote:
Update: fixed.

On Tue, Oct 18, 2011 at 5:56 PM, Romain Guy <romainguy@android.com> wrote:
The OpenGL backend needs to know when the pixels have been modified, and copyPixelsFromBuffer() apparently does not notify the Bitmap of the change. I'll fix this tonight.


On Tue, Oct 18, 2011 at 3:19 PM, Josh <combatevolved11@gmail.com> wrote:
I'm having the same problem running API12, and using
bmp.getGenerationId() shows these bitmaps are always the same ID, even
after reloading them with the new pixel data. It seems that the
generationID is supposed to change when these bitmaps are
modified...but they aren't. Perhaps a bug?

In any case my current workaround is to do view.setLayerType(1, null),
essentially, as you mentioned, I'm just not using hardware
acceleration. Sadly, it does slow down what I'm doing, but it seems to
be manageable and it avoids that garbage collection.

Let me know if you find another way to keep HW accel.

On Oct 8, 3:36 am, Selueco <seleuco.nica...@gmail.com> wrote:
> Hi,
>
> I am blitting a byte buffer to an Object Bitmap using a HW accelerated
> Canvas. To avoid garbage collector i would like to reuse the  bitmap
> doing a bmp.copyPixelsFromBuffer(bf).
>
> The problem here is that Android 3.0 canvas HW accelerated seems to
> not reupload bitmap texture unless it is a different object...
>
> My workround was to use  drawBitmap(int[] colors ... previusly i had
> to do a bmp.getPixels( ... this is slow... since involves an RGB565 to
> RGB8888 conversion by frame
>
> any ideas why Android 3.0 HW accelerated not reupload bitmap textures
> which bytes are internally changed?
>
> is this a bug?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



--
Romain Guy
Android framework engineer
romainguy@android.com




--
Romain Guy
Android framework engineer
romainguy@android.com




--
Romain Guy
Android framework engineer
romainguy@android.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment