History log of /frameworks/native/libs/gui/GLConsumer.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1834f8ea975e9a882b44dc479320fe02e306e630 06-Aug-2014 Jesse Hall <jessehall@google.com> GLConsumer: correct EGL_NO_DISPLAY to EGL_NO_CONTEXT

Change-Id: I4dcb57a0db9ee3c5222cd453c9213859384212b0
(cherry picked from commit 46a1f6b40e1f7677cd41cd30f729ff66c7c21517)
/frameworks/native/libs/gui/GLConsumer.cpp
78be65e7bf6898c6afa55c9016f331ab1aa2503a 02-Oct-2014 Michael Lentine <mlentine@google.com> Adding eglInitialize and eglTerminate image creation and deletion.

Previously it was possible to have the driver's eglTerminate called beofre
eglDestroyImageKHR in GLConsumer. This was because we didn't increment the
refcount for the lifetime of the image. This could lead to a crash or a deadlock
when multiple threads called terminate and destroy simultaneously.

Bug: 17700483
Change-Id: I7010d0f1b3db875332e95630b5e098a5564ba755
/frameworks/native/libs/gui/GLConsumer.cpp
2d14a0ed4f5861bfa67e9db138ffdc70d2d5e6e4 26-Aug-2014 Eric Penner <epenner@google.com> GLConsumer: Fix eglTerminate/eglInit edge case.

If a display is terminated and then initialized, we can't detect
this using the display itself (it has the same value), but all
EglImages still become invalid for the display. This patch detects
this during image binding and forces creation of a new EglImage.

Bug: 10430249
Change-Id: I75101c50962f21263dca3ec6e241a2e5a3c23dad
/frameworks/native/libs/gui/GLConsumer.cpp
5c3d243fcca6d0678bcbb0461bbbe0b63f35212c 12-Jul-2014 Eric Penner <epenner@google.com> GLProducer: Reference count images rather than buffers.

In most cases, EGLImages can be created one-to-one with graphic
buffers in slots, but that was difficult due to some special
cases:
- ReleaseTexImage binds a custom 'unslotted' debug image.
- When all slots are freed, we still need to hang on to one.

These cases were handled by keeping an additional reference to
the 'current' buffer (mCurrentTextureBuf), but we would create
new images since we can't reference count them in the same way.
This patch uses the same semantics, except that it reference
counts the image (an EglImage wrapper class) rather than just
buffer. The wrapper class also detects the cases when we need
a new EGLImage, and only creates them in those rare cases.

Change-Id: I2915761dbe49d2a9bda1f59e60f857543634636b
/frameworks/native/libs/gui/GLConsumer.cpp
ab57491de3a89a2d454d3060d36adef71741a7ae 25-Jun-2014 Dan Stoza <stoza@google.com> GLConsumer: Allow creation in detached mode

Adds a constructor that doesn't require a GLES texture name and sets
up the GLConsumer in detached mode.

Bug: 15616428
Change-Id: Idc9ea2e59baa24bbd959da9fffe0fb71c0aa9818
/frameworks/native/libs/gui/GLConsumer.cpp
87a678478005026d950bedec49ee80b693777b95 05-Apr-2014 Andy McFadden <fadden@android.com> Always release a buffer

In GLConsumer's updateAndReleaseLocked(), we must release either
the previously-acquired buffer or the newly-acquired buffer.

Bug 13755224

Change-Id: I96adc255400ed008ba6e6ac1725ab3514c7cc8ba
/frameworks/native/libs/gui/GLConsumer.cpp
dbe9245e2e362b12e184cd33b9a27b0901f81244 24-Sep-2013 Jamie Gennis <jgennis@google.com> GLConsumer: start using EGL_ANDROID_image_crop

This change makes GLConsumer use the EGL_ANDROID_image_crop extension when
available on a device. The crop rectangle is passed to the EGL driver when
creating EGLImages, allowing the crop to be performed by the driver rather than
using the texture transform matrix.

Bug: 10897141
Change-Id: I63e9a5d5c85067376abc420e3639154468346311
/frameworks/native/libs/gui/GLConsumer.cpp
d171da973de3c6b30263011334fdcd916739144f 19-Sep-2013 Eino-Ville Talvala <etalvala@google.com> GLConsumer: Add query for current frame number.

Surface the underlying frame number of the current texture.

Bug: 10830400
Change-Id: Ide3a7da12ea0aac54588beb6bf00dbfe2cd37653
/frameworks/native/libs/gui/GLConsumer.cpp
3f84483382be2d528918cc1a6fbc6a7d68e0b181 08-Aug-2013 Mathias Agopian <mathias@google.com> SurfaceFlinger now uses GLES 2.x when available

Bug: 8679321

Change-Id: I2b152d01fb4e2de2ea9fe87f1ddbd6826d7520d7
/frameworks/native/libs/gui/GLConsumer.cpp
45155969dc747d09d267cd1f22baf0eaf886a801 09-Aug-2013 Mathias Agopian <mathias@google.com> make sure GLConsumer::releaseTexImage() works after detachFromContext()

Change-Id: I27e0bc57e927d47b2b98113ee37b5396bcc72019
/frameworks/native/libs/gui/GLConsumer.cpp
9870c9b66cc73ee31aabba23aa06deaf673ee5ef 09-Aug-2013 Mathias Agopian <mathias@google.com> make GLConsumer's debug texture static

this is so that we don't burn a gralloc handle and a bit
of memory per GLConsumer.

Change-Id: I30c3e7ec45d7f1b5426aca8e06c7716870877706
/frameworks/native/libs/gui/GLConsumer.cpp
45263e2475ac6a885dbd78eff7d4e44f374e5237 07-Aug-2013 Mathias Agopian <mathias@google.com> don't hardcode debug texture dimensions

Change-Id: I356333801d246a8cafb3e977a77dc7325e8b822d
/frameworks/native/libs/gui/GLConsumer.cpp
db89edc94bd2a78226b407f9f7261e202e7fa325 02-Aug-2013 Mathias Agopian <mathias@google.com> All consumers now take an IGraphicBufferConsumer instead of a BufferQueue

this means they only have access to the consumer end of
the interface. we had a lot of code that assumed consumers
where holding a BufferQueue (i.e.: both ends), so most of
this change is untangling in fix that

Bug: 9265647
Change-Id: Ic2e2596ee14c7535f51bf26d9a897a0fc036d22c
/frameworks/native/libs/gui/GLConsumer.cpp
ad678e18b66f495efa78dc3b9ab99b579945c9e2 24-Jul-2013 Mathias Agopian <mathias@google.com> single buffer mode for BufferQueue

Bug: 9891035
Change-Id: Id1ab5f911a6dc4c1d8235e65775b3d3635231ad4
/frameworks/native/libs/gui/GLConsumer.cpp
c2414bb0989763641ca57cf72c11ef6d86565a23 26-Jul-2013 Mathias Agopian <mathias@google.com> get rid of HAL pixelformats 5551 and 4444

Change-Id: I39409103144c1ba09078c4ddc323a58987fb09ea
/frameworks/native/libs/gui/GLConsumer.cpp
595264f1af12e25dce57d7c5b1d52ed86ac0d0c9 17-Jul-2013 Mathias Agopian <mathias@google.com> BufferQueue improvements and APIs changes

this is the first step of a series of improvements to
BufferQueue. A few things happen in this change:

- setSynchronousMode() goes away as well as the SynchronousModeAllowed flag
- BufferQueue now defaults to (what used to be) synchronous mode
- a new "controlled by app" flag is passed when creating consumers and producers
those flags are used to put the BufferQueue in a mode where it
will never block if both flags are set. This is achieved by:
- returning an error from dequeueBuffer() if it would block
- making sure a buffer is always available by replacing
the previous buffer with the new one in queueBuffer()
(note: this is similar to what asynchrnous mode used to be)

Note: in this change EGL's swap-interval 0 is broken; this will be
fixed in another change.

Change-Id: I691f9507d6e2e158287e3039f2a79a4d4434211d
/frameworks/native/libs/gui/GLConsumer.cpp
8f938a53385a3c6d1c6aa24b3f38437bb2cc47ae 13-Jul-2013 Mathias Agopian <mathias@google.com> always pass the BufferQueue explicitely to consumers

Change-Id: I883b0a7b19d8e722f9ab714ba6f49e658b02ca86
/frameworks/native/libs/gui/GLConsumer.cpp
1585c4d9fbbba3ba70ae625923b85cd02cb8a0fd 28-Jun-2013 Andy McFadden <fadden@android.com> Pay attention to buffer timestamps

When acquiring a buffer, SurfaceFlinger now computes the expected
presentation time and passes it to the BufferQueue acquireBuffer()
method. If it's not yet time to display the buffer, acquireBuffer()
returns PRESENT_LATER instead of a buffer.

The current implementation of the expected-present-time computation
uses approximations and guesswork.

Bug 7900302

Change-Id: If9345611c5983a11a811935aaf27d6388a5036f1
/frameworks/native/libs/gui/GLConsumer.cpp
c5d7b7d323bba8772a9005f7d300ad983a04733a 03-May-2013 Lajos Molnar <lajos@google.com> BufferQueue: track buffer-queue by instance vs. by reference

Instead of representing the buffer-queue as a vector of buffer
indices, represent them as a vector of BufferItems (copies).
This allows modifying the buffer slots independent of the queued
buffers.

As part of this change, BufferSlot properties that are only
been relevant in the buffer-queue have been removed.

Also, invalid scalingMode in queueBuffer now returns an error.

ConsumerBase has also changed to allow reuse of the same
buffer slots by different buffers.

Change-Id: If2a698fa142b67c69ad41b8eaca6e127eb3ef75b
Signed-off-by: Lajos Molnar <lajos@google.com>
Related-to-bug: 7093648
/frameworks/native/libs/gui/GLConsumer.cpp
2381033ad001960c606d13e3a4198e5da3672ec7 17-May-2013 Mathias Agopian <mathias@google.com> am e6eef6c1: am ea74d3b7: make the warning timout of Fence::waitForever() implicit and longer

* commit 'e6eef6c136b007f3a7e1e19884875b855c0c5f95':
make the warning timout of Fence::waitForever() implicit and longer
ea74d3b78d607cde17790a7bb83e6f68ffd34cfd 17-May-2013 Mathias Agopian <mathias@google.com> make the warning timout of Fence::waitForever() implicit and longer

- timeout is now 3 seconds instead of 1
- simplifies the API a bit
- allows us to change/tweak this timeout globaly

Bug: 8988871

Change-Id: I8d3c6ec43a372f602fb3f29856710339f86c0ec9
/frameworks/native/libs/gui/GLConsumer.cpp
bdcf1fe2ba4f6fe2eb63a5ec8246b1582b638e04 24-Apr-2013 Mathias Agopian <mathias@google.com> Merge changes I0d9f18d1,Ib96c9161

* changes:
Add a --color option to dumpsys SurfaceFlinger
clean-up/simplify all dump() APIs
74d211ae26a0257c6075a823812e40b55aa1e653 22-Apr-2013 Mathias Agopian <mathias@google.com> clean-up/simplify all dump() APIs

remove the scratch buffer parameter and use
String8::appendFormat() instead.

Change-Id: Ib96c91617c8e7292de87433d15cf6232b7d591b0
/frameworks/native/libs/gui/GLConsumer.cpp
e692ab9a6be63193c5b52a6562d85d06c40463b8 22-Apr-2013 Mathias Agopian <mathias@google.com> fix uninitialized variables in GLConsumer

mDefaultWidth, mDefaultHeight and mCurrentScallingMode are now
initialized to the same default value that BufferQueue uses.

Change-Id: I0d4da2022b06419d12745716d8ddbd48c8869953
/frameworks/native/libs/gui/GLConsumer.cpp
ca08833d5ea99130797e10ad68a651b50e99da74 29-Mar-2013 Mathias Agopian <mathias@google.com> don't use compile-time configuration of libgui as much as possible

We now detect at runtime which sync features to use, which
allows us to remove a lot of the compile-time configuration
options. There is still one option though, to disable
KHR_fence_sync on some devices (which are more efficient
without it).

- added a backdoor to get the vendor's EGL strings

the new logic is:
- use always ANDROID_native_fence_sync if available
- fallback to KHR_fence_sync if available and not disabled
by the compile-time option
- use KHR_wait_sync if available and either of the above is
enabled

Change-Id: I9c4b49d9ff1151faf902cc93bd53ea5f205aaabf
/frameworks/native/libs/gui/GLConsumer.cpp
2bb716871cf8bfadfff1193ed798da3bffc1f8ec 28-Mar-2013 Mathias Agopian <mathias@google.com> replace eglWaitSyncANDROID by eglWaitSyncKHR

Change-Id: I22f1b3588011c88389e249f738f1e6915cc97e72
/frameworks/native/libs/gui/GLConsumer.cpp
13f01cbdbd34779a234bc674df79e23672fd5c0b 20-Mar-2013 Jesse Hall <jessehall@google.com> Pass sp<Fence>s around instead of file descriptors

Change-Id: Iac70584a2207940730e8f803a543e4e9a4000c47
/frameworks/native/libs/gui/GLConsumer.cpp
1df8c345854155cbbcb9f80de9d12d66ea70ac08 20-Dec-2012 Jamie Gennis <jgennis@google.com> libgui: disallow NULL Fence pointers

This change eliminates the uses of a NULL sp<Fence> indicating that no waiting
is required. Instead we use a non-NULL but invalid Fence object for which the
wait methods will return immediately.

Bug: 7892871
Change-Id: I5360aebe3090422ef6920d56c99fc4eedc642e48
/frameworks/native/libs/gui/GLConsumer.cpp
2adaf04fab35cf47c824d74d901b54094e01ccd3 18-Dec-2012 Andy McFadden <fadden@android.com> Rename ISurfaceTexture and SurfaceTexture

The C++ class names don't match what the classes do, so rename
ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
GLConsumer.

Bug 7736700

Change-Id: Ia03e468888025b5cae3c0ee1995434515dbea387
/frameworks/native/libs/gui/GLConsumer.cpp