Commit Graph

21 Commits

Author SHA1 Message Date
Mathias Agopian
e700501d0e fix [2170319] gmail bulk operation checkbox latency on passion
This also fixes [2152536] ANR in browser

When SF is enqueuing buffers faster than SF dequeues them.
The update flag in SF is not counted and under some situations SF will only
dequeue the first buffer. The state at this point is not technically
corrupted, it's valid, but just delayed by one buffer.

In the case of the Browser ANR, because the last enqueued buffer was delayed
the resizing of the current buffer couldn't happen.

The system would always fall back onto its feet if anything -else- in
tried to draw, because the "late" buffer would be picked up then.
2009-10-07 16:44:10 -07:00
Mathias Agopian
3330b20303 fix [2167050] glTexImage2D code path buggy in SurfaceFlinger
When EGLImage extension is not available, SurfaceFlinger will fallback to using
glTexImage2D and glTexSubImage2D instead, which requires 50% more memory and an
extra copy. However this code path has never been exercised and had some bugs
which this patch fix.

Mainly the scale factor wasn't computed right when falling back on glDrawElements.
We also fallback to this mode of operation if a buffer doesn't have the adequate
usage bits for EGLImage usage.

This changes only code that is currently not executed. Some refactoring was needed to
keep the change clean. This doesn't change anything functionaly.
2009-10-06 17:00:25 -07:00
Andy McFadden
e0a963b72e Fix sim-eng build.
Appears to have been broken by:

commit 9779b221e999583ff89e0dfc40e56398737adbb3
Author: Mathias Agopian <mathias@google.com>
Date:   Mon Sep 7 16:32:45 2009 -0700

    fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properly

For some reason we don't like to have "-lpthread" globally -- it's a no-op
on device builds, but required for many host tools and all sim binaries --
so adding the use of pthread calls requires adding the library explicitly.
2009-09-09 08:02:54 -07:00
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
6cf50a770d added two EGL helpers for selecting a config matching a certain pixelformat or native window type 2009-08-06 16:05:39 -07:00
Mathias Agopian
84d1f7a098 Merge commit 'goog/master' into merge_master 2009-07-01 18:33:18 -07:00
Android (Google) Code Review
694fcc5d1d am c44989d6: Merge change 5350 into donut
Merge commit 'c44989d6c7bcc761fb37f54fd37aac2070ba8e5e'

* commit 'c44989d6c7bcc761fb37f54fd37aac2070ba8e5e':
  move ui/Time.cpp to core/jni, since this is the only place it is used
2009-06-25 15:11:09 -07:00
Mathias Agopian
a8664df810 move ui/Time.cpp to core/jni, since this is the only place it is used 2009-06-25 14:39:56 -07:00
Mathias Agopian
723ec00af4 Merge commit 'goog/master' into merge_master
Conflicts:
	include/ui/Rect.h
	libs/ui/ISurfaceComposer.cpp
2009-05-27 14:34:50 -07:00
Android (Google) Code Review
2787dddcd0 am 0c0ad39c: Merge change 2502 into donut
Merge commit '0c0ad39cd8eaa6de6b7f99cec3971bcc953461e0'

* commit '0c0ad39cd8eaa6de6b7f99cec3971bcc953461e0':
  minor clean-up to Rect and Point.
2009-05-26 18:15:53 -07:00
Mathias Agopian
35801cea5f minor clean-up to Rect and Point.
- return "const" objects for overloaded operators to disallow constructs like: (a+b) = c;
- don't return references to non-static members, it's not always safe.
- Point.cpp was empty, so get rid of it
2009-05-26 17:47:39 -07:00
Mathias Agopian
310f8da0c3 merge master to master_gl 2009-05-22 02:16:08 -07:00
Mathias Agopian
208059f67e checkpoint: split libutils into libutils + libbinder 2009-05-20 12:55:02 -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
0926f50664 update surfaceflinger, libui and libagl to the new gralloc api
- Currently the lock/unlock path is naive and is done for each drawing operation (glDrawElements and glDrawArrays). this should be improved eventually.
- factor all the lock/unlock code in SurfaceBuffer.
- fixed "showupdate" so it works even when we don't have preserving eglSwapBuffers().
- improved the situation with the dirty-region and fixed a problem that caused GL apps to not update.
- make use of LightRefBase() where needed, instead of duplicating its implementation
- add LightRefBase::getStrongCount()
- renamed EGLNativeWindowSurface.cpp to FramebufferNativeWindow.cpp

- disabled copybits test, since it clashes with the new gralloc api

- Camera/Video will be fixed later when we rework the overlay apis
2009-05-04 14:17:04 -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
8a7a67538a auto import from //branches/cupcake/...@126645 2009-01-15 16:12:10 -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