Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Android internals     Egor Elizarov     SPbSU 2012
Legal info   Android internals by Egor Elizarov is licensed under a    Creative Commons Attribution-NonCommercial-ShareAl...
Lecture 7                            Graphic Subsystem                          OpenGL HW acceleration                    ...
Previous time   Linux IPC primitives   Binder   Application layer   Service manager   Middleware level   Kernel leve...
Graphic subsystem    Provides buffer to application for drawing    Provides interfaces for draw primitives    Controls ...
Main players    Surface Flinger    Window Manager    Activity Manager                       6       Egor Elizarov SPbSU...
Surface    Virtual buffer we can draw on    Can be marshalled/unmarlled in Parcel    One Activity can have more then on...
Surface Flinger    Allocates surfaces    Composes surfaces    Can combines 2D/3D surfaces    Can use HW acceleration f...
Window Manager    Dispatches input events to clients    Provides transition animation capabilities    Window Manager Po...
Activity manager    Manages activity life cycle    Manages activity stacking    Dispatches intents    Spawn processes ...
Composition example         11           Egor Elizarov SPbSU 2012
Simple view     12       Egor Elizarov SPbSU 2012
Khronos OpenGL API    Khronos Group - not for profit industry    consortium creating open standards.    OpenGL – 2D/3D g...
Graphic libraries    SKIA - 2D graphic library    PixelFlinger – android software renderer    Codeflinger – simple grap...
Renderscript    Renderscript is new API targeted at high-    performance 3D rendering and compute    operations.    Rend...
Java/middleware interaction             16          Egor Elizarov SPbSU 2012
Double buffering       17          Egor Elizarov SPbSU 2012
Composition approach    Dirty regions – regions that should be redrawn    Use Z ordering to compose layers    Use HW co...
SW vs HW OpenGL       19         Egor Elizarov SPbSU 2012
Middleware level        20         Egor Elizarov SPbSU 2012
3D acceleration       21         Egor Elizarov SPbSU 2012
2D acceleration       22         Egor Elizarov SPbSU 2012
HAL/kernel interaction           23            Egor Elizarov SPbSU 2012
Overlay vs Framebuffer surface    Two different type of surfaces in Android < 3.0    Overlay    – Picture in YUV format ...
HWComposer (Omap4)        25           Egor Elizarov SPbSU 2012
Emulator GL acceleration    In ICS Android team added GL acceleration for    Emulator    Emulator uses x86 host GL accel...
Android-emulator approach            27         Egor Elizarov SPbSU 2012
Android-x86 approach         28            Egor Elizarov SPbSU 2012
Next Time    System start up    Media subsystem                      29     Egor Elizarov SPbSU 2012
Useful links    http://vk.com/android_internals    http://www.slideshare.net/jserv/design-and-concepts-of-android-    gr...
Useful links (2)    http://www.ti.com/lit/wp/swpy027/swpy027.pdf    http://www.freescale.com/files/ftf_2010/Americas/FTF...
Thanks to    Sergey Matyukevich for review and advices    (www.linkedin.com/pub/sergey-matyukevich/31/889/769)    Nikola...
Upcoming SlideShare
Loading in …5
×

Android internals 07 - Android graphics (rev_1.1)

13,611 views

Published on

Course: Android Internals
Lecture 7: Android Graphics

  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • There is a REAL system that is helping thousands of people, just like you, earn REAL money right from the comfort of their own homes. The entire system is made up with PROVEN ways for regular people just like you to get started making money online... the RIGHT way... the REAL way. ●●● http://t.cn/AisJWzdm
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Real people just like you are kissing the idea of punching the clock for someone else goodbye, and embracing a new way of living. The internet economy is exploding, and there are literally THOUSANDS of great earnings opportunities available right now, all just one click away. ●●● http://ishbv.com/ezpayjobs/pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • My last month paycheck was for 11000 dollars… All i did was simple online work from comfort at home for 3-4 hours/day that I got from this agency I discovered over the internet and they paid me for it 95 bucks every hour.... click here ★★★ http://scamcb.com/ezpayjobs/pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Unlock Her Legs is your passage way to a life full of loving and sex... read more ... ➤➤ http://scamcb.com/unlockher/pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Android internals 07 - Android graphics (rev_1.1)

  1. 1. Android internals Egor Elizarov SPbSU 2012
  2. 2. Legal info Android internals by Egor Elizarov is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License You are free to – copy, distribute, display, and perform the work – make derivative works Under the following conditions – Attribution. You must give the original author credit – Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one All pictures and trademarks are the property of their respective owners. Use of these trademarks and pictures is subject to owners permissions. Corrections, suggestions, contributions and translations are welcome! 2 Egor Elizarov SPbSU 2012
  3. 3. Lecture 7 Graphic Subsystem OpenGL HW acceleration yegor.yelizarov(at)gmail.comRev: 1.1Last update: 06/01/2012 http://vk.com/android_internals 3 Egor Elizarov SPbSU 2012
  4. 4. Previous time Linux IPC primitives Binder Application layer Service manager Middleware level Kernel level Typical Android sybsystem 4 Egor Elizarov SPbSU 2012
  5. 5. Graphic subsystem Provides buffer to application for drawing Provides interfaces for draw primitives Controls and composes surfaces (windows) Provides 2D & 3D primitives Uses HW acceleration where acceptable 5 Egor Elizarov SPbSU 2012
  6. 6. Main players Surface Flinger Window Manager Activity Manager 6 Egor Elizarov SPbSU 2012
  7. 7. Surface Virtual buffer we can draw on Can be marshalled/unmarlled in Parcel One Activity can have more then one Surface 7 Egor Elizarov SPbSU 2012
  8. 8. Surface Flinger Allocates surfaces Composes surfaces Can combines 2D/3D surfaces Can use HW acceleration for surface composition 8 Egor Elizarov SPbSU 2012
  9. 9. Window Manager Dispatches input events to clients Provides transition animation capabilities Window Manager Policy handles common key events in PhoneWindowManager (Home/Back/Volume) 9 Egor Elizarov SPbSU 2012
  10. 10. Activity manager Manages activity life cycle Manages activity stacking Dispatches intents Spawn processes 10 Egor Elizarov SPbSU 2012
  11. 11. Composition example 11 Egor Elizarov SPbSU 2012
  12. 12. Simple view 12 Egor Elizarov SPbSU 2012
  13. 13. Khronos OpenGL API Khronos Group - not for profit industry consortium creating open standards. OpenGL – 2D/3D graphics API OpenGLES – 2D/3D graphics API for embedded systems EGL – interface between OpenGLES and native platform window system 13 Egor Elizarov SPbSU 2012
  14. 14. Graphic libraries SKIA - 2D graphic library PixelFlinger – android software renderer Codeflinger – simple graphic JIT Gralloc – android graphics memory allocator Mesa – open source OpenGL implementation 14 Egor Elizarov SPbSU 2012
  15. 15. Renderscript Renderscript is new API targeted at high- performance 3D rendering and compute operations. Renderscript provides: • 3D rendering API on top of HW acceleration • compute API (similar to CUDA) • familiar language in C99 15 Egor Elizarov SPbSU 2012
  16. 16. Java/middleware interaction 16 Egor Elizarov SPbSU 2012
  17. 17. Double buffering 17 Egor Elizarov SPbSU 2012
  18. 18. Composition approach Dirty regions – regions that should be redrawn Use Z ordering to compose layers Use HW composer to compose layers if possible frameworks/base/services/surfaceflinger/Surface Flinger.cpp 18 Egor Elizarov SPbSU 2012
  19. 19. SW vs HW OpenGL 19 Egor Elizarov SPbSU 2012
  20. 20. Middleware level 20 Egor Elizarov SPbSU 2012
  21. 21. 3D acceleration 21 Egor Elizarov SPbSU 2012
  22. 22. 2D acceleration 22 Egor Elizarov SPbSU 2012
  23. 23. HAL/kernel interaction 23 Egor Elizarov SPbSU 2012
  24. 24. Overlay vs Framebuffer surface Two different type of surfaces in Android < 3.0 Overlay – Picture in YUV format (Video, Camera) – Video4Linux devices (/dev/video*) Framebuffer surfaces – Picture in RGB format – Framebuffer device (/dev/fb*) Composition is performed by HW 24 Egor Elizarov SPbSU 2012
  25. 25. HWComposer (Omap4) 25 Egor Elizarov SPbSU 2012
  26. 26. Emulator GL acceleration In ICS Android team added GL acceleration for Emulator Emulator uses x86 host GL acceleration relying on host hardware accelerated libraries 26 Egor Elizarov SPbSU 2012
  27. 27. Android-emulator approach 27 Egor Elizarov SPbSU 2012
  28. 28. Android-x86 approach 28 Egor Elizarov SPbSU 2012
  29. 29. Next Time System start up Media subsystem 29 Egor Elizarov SPbSU 2012
  30. 30. Useful links http://vk.com/android_internals http://www.slideshare.net/jserv/design-and-concepts-of-android- graphics http://people.debian.org.tw/~olv/surfaceflinger/surfaceflinger.pdf http://www.cnblogs.com/xl19862005/archive/2011/11/17/22153 63.html Http://www.khronos.org https://plus.google.com/105051985738280261832/posts/2FXDC z8x93s 30 Egor Elizarov SPbSU 2012
  31. 31. Useful links (2) http://www.ti.com/lit/wp/swpy027/swpy027.pdf http://www.freescale.com/files/ftf_2010/Americas/FTF10_FT F-ENT-F0824.pdf http://elinux.org/images/0/02/Android_Platform_Optimization s_SNPS_20111027.pdf http://android-developers.blogspot.com/2011/02/introducing- renderscript.html http://android- developers.blogspot.com/2011/03/renderscript.html 31 Egor Elizarov SPbSU 2012
  32. 32. Thanks to Sergey Matyukevich for review and advices (www.linkedin.com/pub/sergey-matyukevich/31/889/769) Nikolay F. Fominykh for review and advices Nikita Shulga for advices and notes (http://www.linkedin.com/pub/nikita-shulga/8/582/287) Grigory Tolstolytkin for advices and notes (http://www.linkedin.com/pub/grigory- tolstolytkin/2a/b41/74) 32 Egor Elizarov SPbSU 2012

×