Questions tagged [surfaceflinger]

SurfaceFlinger is Android's window compositor. Use this tag for questions specific to SurfaceFlinger component of Android. In addtion, add android tag as well.

SurfaceFlinger is Android's window compositor. Use this tag for questions specific to SurfaceFlinger component of Android. In addtion, add tag too.

100 questions
3
votes
1 answer

How to boot a Qualcomm Snapdragon without HDMI

I am developing a video app for a Qualcomm Snapdragon which runs Android. I have an app that takes in a video stream, processes it, and sends a datastream out based on the image. It can also have a mode to display the images to HDMI, but it is not…
3
votes
0 answers

Why is SurfaceFlinger still using 5ms of CPU time per frame with Hardware Composer?

I'm trying to run a challenging and latency-senstive application at 60 fps on as many android devices as possible. It involves processing live frames from the camera (ideally also at 60 fps) along with rendering additional graphics on top with…
tangobravo
  • 898
  • 10
  • 24
3
votes
0 answers

What happens when AMediaCodec_releaseOutputBufferAtTime() [IN DETAIL]

When decoded output buffer is available and you want to render it onto the screen. With MediaCodec NDK APIs, you have an option to call AMediaCodec_releaseOutputBufferAtTime() if you have a native window registered already to render. My question is…
3
votes
1 answer

Determine exact screen flip times on Android

I am attempting to determine (to within 1 ms) when particular screen flips happen on Android. Choreographer fires every time a frame flips, but gives no way of determining which frame is actually being displayed. According to…
3
votes
1 answer

Android Surfaceflinger and openGL ES

I have a few questions regarding the SurfaceFlinger: 1) I understand that the app writes to the Surface itself and then moves the buffer to the SurfaceFlinger (let's assume I am using a Hardware Canvas or EGL). What is inside the buffer? raw pixels?…
EyalBellisha
  • 1,874
  • 19
  • 28
3
votes
1 answer

Is it possible to bypass Android's surfaceflinger?

I asked a related question recently, but I forgot to ask this question explicitly. (I want to implement a double-buffer scheme in an Android app using OpenGL ES 2.0, and Android's default scheme seems a little too unpredictable.)
Janin zah
  • 201
  • 2
  • 14
3
votes
1 answer

Accessing layer contents in Android-surfaceflinger

I am reading the layer contents to check whether its the same content as that rendered by the app on-screen. I am reading the contents before they are being composited by SurfaceFlinger. Here is the block of code in…
sg1993
  • 335
  • 2
  • 19
3
votes
0 answers

Android animation: keeping up with vsync

Bacground I am developing an Android based application for a yet to be defined hardware platform (currently testing Ouya and MK802IV, all Android 4.1+) that involves displaying various content to an 1080p@60HZ output (big screens). The application…
Karol
  • 31
  • 1
  • 2
3
votes
2 answers

How to use ScreenCap.cpp on my application?

Android Platform has an utility class that's used to take android screenshot . I copied "ScreenCap.cpp" in to JNI folder then build via NDK but failed. The NDK compiler didn't find needed libraries: #include #include…
Nguyen Minh Binh
  • 23,891
  • 30
  • 115
  • 165
2
votes
1 answer

Memory growth at surfaceflinger process on Android x86 platforms

I am using Virtual displays to take screenshots from Android emulators and I noticed that surfaceflinger's memory has infinite growth (this can be seen in top program) and the emulator stops working after some time. On real Android devices…
2
votes
0 answers

Android device FPS calculation

I'm was using gfxinfo for calculating the app FPS, but apparently that does not work with games, as they don't use UIKit for drawing. I tried to use SurfaceFlinger, but somehow it does not provide any frame information, only gives a refresh period.…
Fahri Azimov
  • 11,470
  • 2
  • 21
  • 29
2
votes
5 answers

surfaceflinger test program

I want to write a native application in Android for testing surfaceflinger. Is there any simple program that shows how to create surface, register buffers and post buffers on Surfaceflinger.
2
votes
1 answer

Double-Buffer Page-Flipping in Android using OpenGL ES 2.0

How close can I get to Android devices' graphics hardware safely, starting with Froyo and later? I want to implement a simple page-flipping scheme on Android devices, using two frame buffers. It should go like this: Render into Frame Buffer A.…
Janin zah
  • 201
  • 2
  • 14
2
votes
2 answers

android 4.4, service 'SurfaceFlinger' died

I am running a native process that is capturing the screen in a loop using ScreenshotClient. randomly after several runs when I close the process I get "service 'SurfaceFlinger' died" and the screen restarts. This does not happen in android 4.2.…
jacob
  • 1,397
  • 1
  • 26
  • 53
2
votes
1 answer

Android Kitkat 4.4.2: Adaptive Playback impact on SurfaceFlinger

I came across this generic question on Adaptive Playback in Android Kitkat in SO. However, I have some specific queries as below: I am able to understand the implications on the codec and the related framework. However, there is one specific point…
Ganesh
  • 5,880
  • 2
  • 36
  • 54