Commit Graph

15 Commits

Author SHA1 Message Date
Mathias Agopian cbb288bfe8 fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properly
Rewrote SurfaceFlinger's buffer management from the ground-up.
The design now support an arbitrary number of buffers per surface, however the current implementation is limited to four. Currently only 2 buffers are used in practice.

The main new feature is to be able to dequeue all buffers at once (very important when there are only two). 

A client can dequeue all buffers until there are none available, it can lock all buffers except the last one that is used for composition. The client will block then, until a new buffer is enqueued.

The current implementation requires that buffers are locked in the same order they are dequeued and enqueued in the same order they are locked. Only one buffer can be locked at a time.

eg. Allowed sequence:   DQ, DQ, LOCK, Q, LOCK, Q
eg. Forbidden sequence: DQ, DQ, LOCK, LOCK, Q, Q
2009-09-07 16:32:45 -07:00
Mathias Agopian cf70e3301b second take, hopefully this time it doesn't break one of the builds: "SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything." 2009-08-11 23:44:13 -07:00
Mathias Agopian 5221271375 second take, hopefully this time it doesn't break one of the builds: "SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything." 2009-08-11 23:32:29 -07:00
Fred Quintana b2fd4665e6 Revert "SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything."
This reverts commit 8b76a0ac6fbf07254629ed1ea86af014d5abe050.
2009-08-11 20:49:35 -07:00
Mathias Agopian df37b62c62 SurfaceFlinger will now allocate buffers based on the usage specified by the clients. This allows to allocate the right kind of buffer automatically, without having the user to specify anything.
This change makes SurfaceHolder.setType(GPU) obsolete (it's now ignored).
Added an API to android_native_window_t to allow extending the functionality without ever breaking binary compatibility. This is used to implement the new set_usage() API. This API needs to be called by software renderers because the default is to use usage flags suitable for h/w.
2009-08-11 16:12:56 -07:00
Mathias Agopian 446ff92038 don't use a 1/4th of the screen size texture for the dim layer
we can't use a texture of 1/4th of the screen for the dim layer, because the mdp internal input resultion is alwyas integers and for very small blits of a couple pixels the scale factor can get way out of range, for instance for a 7 pixels source, the scale factor would be either 7 (7/1) or 3.5 (7/2) instead of 4 (7/1.75). This caused the mdp to fail in some cases and revert to software. we now always use a texture of the actual screen size, so the problem will never happen. This burns 300KB of pmem instead of 21KB. On devices with a larger screen we might want to use a smaller texture and tile it by hand.
2009-06-29 17:32:20 -07:00
Mathias Agopian 958b3cac99 use 1/16 the size (20KB) for the dim texture in the copybit/msm case 2009-06-25 16:21:32 -07:00
Mathias Agopian f9d932774e fix a memory corruption where a SF Client could be used after it's been destroyed 2009-06-19 17:00:27 -07:00
Mathias Agopian 945ebbfd3d implement dimming with a texture on msm7k so it uses copybit 2009-06-18 18:48:39 -07:00
Mathias Agopian 20f68782a4 Region now has its own implementation instead of relying on SkRegion, which allows us to break libui's dependency on libcorecg. 2009-05-17 23:34:16 -07:00
Mathias Agopian 076b1cc3a9 Integrate from //sandbox/mathias/donut/...@145728
SurfaceFlinger rework for new EGL driver model support.
2009-04-10 14:24:30 -07:00
The Android Open Source Project edbf3b6af7 auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
The Android Open Source Project d5193d9394 auto import from //depot/cupcake/@135843 2009-03-03 18:28:45 -08:00
The Android Open Source Project e09fd9e819 Code drop from //branches/cupcake/...@124589 2008-12-17 18:05:43 -08:00
The Android Open Source Project 7c1b96a165 Initial Contribution 2008-10-21 07:00:00 -07:00