Hello piplz,

A bitmap 128x128 ARGB8 is loaded. Only the alpha channel is needed as the 
opaqueness is used to draw the desired color. Using the original bitmap with 
a PorterDuffColorFilter and Mode.SRC_IN functions properly.
The next step was to extract the alpha channel to save some memory. The 
extracting seems to function properly, but the actual drawing in Canvas 
results in a SIGSEGV.

Info: all drawing happens in another thread.
Drawing:

void android.graphics.Canvas.drawBitmap(Bitmap bitmap, Rect src, RectF dst, 
Paint paint)

Alpha extracting alternative 1:

Bitmap android.graphics.Bitmap.copy(Config config, boolean isMutable)
... with Config.ALPHA_8, true

Alpha extracting alternative 2:

Bitmap android.graphics.Bitmap.extractAlpha()


Will try: doing the same pre-extracting and then drawing with ES 2.0. 

Here logcat output:

03-25 12:18:49.774: DEBUG/MainService.1(7323): onCreate
03-25 12:18:49.794: DEBUG/MainEngine.1(7323): enabling TOUCH events for this 
engine
03-25 12:18:49.794: DEBUG/MainEngine.1(7323): onCreate, surface comes 
soon...
03-25 12:18:49.834: DEBUG/MainEngine.1(7323): onSurfaceCreated
03-25 12:18:49.834: DEBUG/MainContext.1(7323): precreate
03-25 12:18:49.834: DEBUG/MainGame.1(7323): precreate
03-25 12:18:49.834: DEBUG/MainEngine.1(7323): onSurfaceChanged 480x800
03-25 12:18:49.844: DEBUG/MainEngine.1(7323): onVisibilityChanged to true
03-25 12:18:49.854: DEBUG/MainGame.1(7323): GS_LOAD
03-25 12:18:49.864: DEBUG/MainRenderer.1(7323): 
onSurfaceVisibleReadyToRender
03-25 12:18:49.864: DEBUG/MainGame.1(7323): onResize 480x800
03-25 12:18:49.864: DEBUG/MainEngine.1(7323): setTouchEventsEnabled true
*03-25 12:18:49.894: VERBOSE/GL20BitmapLoader(7323): Decoding bitmap 
2130968576 (tiles_snowflakes_128)*
*03-25 12:18:49.894: DEBUG/GL20BitmapHolder.1(7323): converted normal 
(65536) to alpha (16384)*
*03-25 12:18:49.894: DEBUG/GL20BitmapHolder.1(7323): loaded bitmap res 
2130968576(EBLT_Normal_To_Alpha)*
03-25 12:18:49.904: DEBUG/MainGame.1(7323): GS_RENDER
03-25 12:18:50.114: INFO/DEBUG(65): *** *** *** *** *** *** *** *** *** *** 
*** *** *** *** *** ***
03-25 12:18:50.114: INFO/DEBUG(65): Build fingerprint: 
'google/passion/passion:2.3.3/GRI40/102588:user/release-keys'
03-25 12:18:50.114: INFO/DEBUG(65): pid: 7323, tid: 7331  >>> 
com.devdroy.android.snowskyengine <<<
03-25 12:18:50.114: INFO/DEBUG(65): signal 11 (SIGSEGV), code 1 
(SEGV_MAPERR), fault addr 00000000
03-25 12:18:50.114: INFO/DEBUG(65):  r0 00000000  r1 002b8438  r2 002b8580 
 r3 0000000c
03-25 12:18:50.114: INFO/DEBUG(65):  r4 00000001  r5 44838f14  r6 00000011 
 r7 002b8438
03-25 12:18:50.114: INFO/DEBUG(65):  r8 44838a5f  r9 0000000c  10 44838a2c 
 fp 002b8580
03-25 12:18:50.114: INFO/DEBUG(65):  ip 00000000  sp 44838990  lr ab14ed30 
 pc ab15e66c  cpsr 60000010
03-25 12:18:50.114: INFO/DEBUG(65):  d0  0000c0000004c002  d1 
 0001000000010000
03-25 12:18:50.114: INFO/DEBUG(65):  d2  0000800100034000  d3 
 0003400100020001
03-25 12:18:50.114: INFO/DEBUG(65):  d4  0000000000000002  d5 
 0000000000000000
03-25 12:18:50.114: INFO/DEBUG(65):  d6  0001000000010000  d7 
 0001000000010000
03-25 12:18:50.114: INFO/DEBUG(65):  d8  fffffffa00000000  d9 
 0000028b0000000c
03-25 12:18:50.114: INFO/DEBUG(65):  d10 4006408c93f48090  d11 
426ec06000000002
03-25 12:18:50.124: INFO/DEBUG(65):  d12 0000000000000000  d13 
0000000000000000
03-25 12:18:50.124: INFO/DEBUG(65):  d14 0000000000000000  d15 
0000000000000000
03-25 12:18:50.124: INFO/DEBUG(65):  d16 fff75a7ffff95346  d17 
fff368f1fff561b8
03-25 12:18:50.124: INFO/DEBUG(65):  d18 00018cea0001348c  d19 
00023da60001e548
03-25 12:18:50.124: INFO/DEBUG(65):  d20 0000000000000000  d21 
0000000000000000
03-25 12:18:50.124: INFO/DEBUG(65):  d22 0000001f0000001f  d23 
0000001f0000001f
03-25 12:18:50.124: INFO/DEBUG(65):  d24 0000002000000020  d25 
0000002000000020
03-25 12:18:50.124: INFO/DEBUG(65):  d26 fff81ce4fff81ce4  d27 
fff81ce4fff81ce4
03-25 12:18:50.124: INFO/DEBUG(65):  d28 0001617800016178  d29 
0001617800016178
03-25 12:18:50.124: INFO/DEBUG(65):  d30 0001000000010000  d31 
0001000000010000
03-25 12:18:50.124: INFO/DEBUG(65):  scr 60000012
03-25 12:18:50.194: INFO/DEBUG(65):          #00  pc 0005e66c 
 /system/lib/libskia.so
03-25 12:18:50.194: INFO/DEBUG(65):          #01  pc 00059b7c 
 /system/lib/libskia.so
03-25 12:18:50.204: INFO/DEBUG(65):          #02  pc 0008a984 
 /system/lib/libskia.so
03-25 12:18:50.204: INFO/DEBUG(65): code around pc:
03-25 12:18:50.204: INFO/DEBUG(65): ab15e64c e58d9000 e1a0e00f e59cf020 
e595c010 
03-25 12:18:50.204: INFO/DEBUG(65): ab15e65c e1a01007 e1a0200b e1a0000c 
e1a03009 
03-25 12:18:50.204: INFO/DEBUG(65): ab15e66c e59cc000 e58d8000 e1a0e00f 
e59cf020 
03-25 12:18:50.204: INFO/DEBUG(65): ab15e67c e5950004 e59a2014 e3760001 
e5903018 
03-25 12:18:50.204: INFO/DEBUG(65): ab15e68c e0888002 e0877003 1affffe4 
e28dd014 
03-25 12:18:50.204: INFO/DEBUG(65): code around lr:
03-25 12:18:50.204: INFO/DEBUG(65): ab14ed10 e0866004 e12fff3c e1a03007 
e1a00008 
03-25 12:18:50.204: INFO/DEBUG(65): ab14ed20 e1a0100a e1a02004 e59dc008 
e12fff3c 
03-25 12:18:50.204: INFO/DEBUG(65): ab14ed30 e0555004 e0877104 1affffeb 
eaffffdf 
03-25 12:18:50.204: INFO/DEBUG(65): ab14ed40 e92d41f0 e1a04000 e1a05002 
eb00fd51 
03-25 12:18:50.204: INFO/DEBUG(65): ab14ed50 e3500000 1a000001 e3a00000 
e8bd81f0 
03-25 12:18:50.204: INFO/DEBUG(65): stack:
03-25 12:18:50.204: INFO/DEBUG(65):     44838950  ab20d978  
03-25 12:18:50.204: INFO/DEBUG(65):     44838954  44838964  
03-25 12:18:50.204: INFO/DEBUG(65):     44838958  fffffed4  
03-25 12:18:50.204: INFO/DEBUG(65):     4483895c  448389bc  
03-25 12:18:50.204: INFO/DEBUG(65):     44838960  00000000  
03-25 12:18:50.204: INFO/DEBUG(65):     44838964  00000000  
03-25 12:18:50.204: INFO/DEBUG(65):     44838968  00004000  
03-25 12:18:50.204: INFO/DEBUG(65):     4483896c  00000001  
03-25 12:18:50.204: INFO/DEBUG(65):     44838970  44838f14  
03-25 12:18:50.204: INFO/DEBUG(65):     44838974  00000011  
03-25 12:18:50.204: INFO/DEBUG(65):     44838978  002b8438  
03-25 12:18:50.204: INFO/DEBUG(65):     4483897c  44838a5f  
03-25 12:18:50.204: INFO/DEBUG(65):     44838980  0000000c  
03-25 12:18:50.204: INFO/DEBUG(65):     44838984  44838a2c  
03-25 12:18:50.204: INFO/DEBUG(65):     44838988  df002777  
03-25 12:18:50.204: INFO/DEBUG(65):     4483898c  e3a070ad  
03-25 12:18:50.204: INFO/DEBUG(65): #00 44838990  0000000c  
03-25 12:18:50.204: INFO/DEBUG(65):     44838994  7fffffff  
03-25 12:18:50.204: INFO/DEBUG(65):     44838998  00000000  
03-25 12:18:50.204: INFO/DEBUG(65):     4483899c  00000000  
03-25 12:18:50.204: INFO/DEBUG(65):     448389a0  44838984  
03-25 12:18:50.204: INFO/DEBUG(65):     448389a4  00000013  
03-25 12:18:50.204: INFO/DEBUG(65):     448389a8  0000000c  
03-25 12:18:50.204: INFO/DEBUG(65):     448389ac  00000000  
03-25 12:18:50.204: INFO/DEBUG(65):     448389b0  448389c8  
03-25 12:18:50.204: INFO/DEBUG(65):     448389b4  00000000  
03-25 12:18:50.204: INFO/DEBUG(65):     448389b8  44838e5c  
03-25 12:18:50.204: INFO/DEBUG(65):     448389bc  44838a2c  
03-25 12:18:50.204: INFO/DEBUG(65):     448389c0  44838eb8  
03-25 12:18:50.204: INFO/DEBUG(65):     448389c4  ab159b80 
 /system/lib/libskia.so
03-25 12:18:50.204: INFO/DEBUG(65): #01 448389c8  00000000  
03-25 12:18:50.204: INFO/DEBUG(65):     448389cc  00000000  
03-25 12:18:50.204: INFO/DEBUG(65):     448389d0  0000000c  
03-25 12:18:50.204: INFO/DEBUG(65):     448389d4  00000013  
03-25 12:18:50.204: INFO/DEBUG(65):     448389d8  ab20d978  
03-25 12:18:50.204: INFO/DEBUG(65):     448389dc  44839234  
03-25 12:18:50.204: INFO/DEBUG(65):     448389e0  ab20d978  
03-25 12:18:50.204: INFO/DEBUG(65):     448389e4  002b7b68  
03-25 12:18:50.204: INFO/DEBUG(65):     448389e8  44838a14  
03-25 12:18:50.214: INFO/DEBUG(65):     448389ec  44838e5c  
03-25 12:18:50.214: INFO/DEBUG(65):     448389f0  44838a18  
03-25 12:18:50.214: INFO/DEBUG(65):     448389f4  ab18a988 
 /system/lib/libskia.so
03-25 12:18:50.484: INFO/BootReceiver(96): Copying 
/data/tombstones/tombstone_05 to DropBox (SYSTEM_TOMBSTONE)
03-25 12:18:50.504: WARN/LiveWallpaperPreview(7257): Wallpaper service gone: 
ComponentInfo{com.devdroy.android.snowskyengine/com.devdroy.android.snowskyengine.MainService}
03-25 12:18:50.504: ERROR/InputDispatcher(96): channel '4085c1b0 
com.devdroy.android.snowskyengine.MainService (server)' ~ Consumer closed 
input channel or an error occurred.  events=0x8
03-25 12:18:50.504: ERROR/InputDispatcher(96): channel '4085c1b0 
com.devdroy.android.snowskyengine.MainService (server)' ~ Channel is 
unrecoverably broken and will be disposed!
03-25 12:18:50.504: DEBUG/Zygote(67): Process 7323 terminated by signal (11)

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

Reply via email to