History log of /external/drm_hwcomposer/glworker.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d68353163dc72d2282c564379785dfca47b6df65 23-Oct-2015 Zach Reizner <zachr@google.com> drm_hwcomposer: lazily generate shaders for GLWorkerCompositor

This still generates the first shader at GLWorkerCompositor::Init() to check
for shader generation errors. It's the only time that shader compilation errors
will be shown on the log.

This change shortens GL initialization time from 2.8 seconds to about 450
milliseconds. Besides improving boot time by 2.3 seconds, less fence timeouts
should happen at boot time due to HWC blocking.

TEST=run and see no display glitches or glworker related errors in logs
BUG=chrome-os-partner:46739

Change-Id: Ia264e3f73a0ebe8558165ae3c215777ef6339ecc
/external/drm_hwcomposer/glworker.h
92f8e6399c0829c6ba6db77d5ea1bbd22f510bb1 13-Oct-2015 Zach Reizner <zachr@google.com> drm_hwcomposer: ground work for squashing

This patch rearranges things to make squashing possible.
The high-level changes:
- A new Plan phase that happens in QueueComposition. This is where the
overlay allocation is moved to. It's also the only safe time that
the composition can try to plan squashing. This is because squashing
depends on the exact ordering of compositions.
- GLWorker now renders regions rather than layers. A region in this case is
a clipping rectange and set of layers that are to be rendered in that
rectangle. This is always what GLWorker did in the end, but now the work
to seperate layers into regions is done externally. This was changed
because the output of SquashState is a list of stable regions that need to
be put through GLWorker

The Plan methods of the Compositions are responsible for updating per-display
SquashState and for allocation regions/layers to squashing, pre-composition, or
hardware overlay. Because of the drastic changes to how composition planning
works, it was necessary to bundle it with the GLWorker change.

This change also includes plenty of other refactorings that were deemed to
be too painful to try and seperate into another change.

Change-Id: Ie7bfe077067e936a0862a07cbe87b525eab8d4f8
/external/drm_hwcomposer/glworker.h
4a253659cef3d82bfb0b25b3ff4c7b073d7a0460 11-Sep-2015 Zach Reizner <zachr@google.com> drm_hwcomposer: implement the safe handling of layers

This is a sweeping change to discard our usage of struct hwc_layer_t outside
hwcomposer.cpp. That was a dangerous struct that was a source of many of our
errors. Replacing it with safer RAII-style classes reduces the amount and
complexity of our code.

Change-Id: I580cafdf89bd1e7e6583f3073858b8e78e6018ba
/external/drm_hwcomposer/glworker.h
8d63e7fde00f5830480cd2225954f70e6b681d8b 20-Aug-2015 Zach Reizner <zachr@google.com> drm_hwcomposer: cache the framebuffers given to the GLWorker

This saves some work in EGL/GL that would normally get repeated every frame.
Because the same framebuffers are generally used every frame, this CL adds a
cache containing all the EGL/GL objects that correspond to the given
GraphicBuffer. The cache initially holds a strong reference while rendering,
but once glFinish is called, only a weak reference is held until rendering
to that same GraphicBuffer starts again. The weak reference is used to check
if that GraphicBuffer has been destroyed, which means the corresponding EGL/GL
resources should be destroyed.

The cache can be disabled with the following command:
$ adb shell setprop hwc.drm.use_framebuffer_cache 0

Change-Id: Iddee1efc5bad67f6c4479e7f402354e229c3b0a2
/external/drm_hwcomposer/glworker.h
098070590ae648ede5f2ef846298de178ccd3637 13-Aug-2015 Zach Reizner <zachr@google.com> drm_hwcomposer: enhance stability using various wrapper classes

This commit contains a lot of churn because it changes code to use automatic
resource lifetimes as much as possible. As more things get changed, this is
essential to maintaining stability.

In addition, this change changes how layers are passed through the compositor
API. Before each layer was passed down one at a time. Now they are passed in
all at once. This is simpler for the implementation because it makes errors
more atomic and makes decisions easier for the compositors.

Change-Id: Ic3e6b5d0089fb1631ea256adcce9910ed8f38366
/external/drm_hwcomposer/glworker.h
810ecc67ae408e752325497c836cf6fdccd5ce55 01-Aug-2015 Zach Reizner <zachr@google.com> Revert "Revert "drm_hwcomposer: remove GLCompositor and the GLWorker thread""

This reverts commit d078e4cab78f81057cd25355199caba5a147342e.
/external/drm_hwcomposer/glworker.h
713a6788528d4cc4cd477b2f546c8b922beb6dde 01-Aug-2015 Zach Reizner <zachr@google.com> Revert "Revert "drm_hwcomposer: have DrmDisplayCompositor do its own OpenGL composition""

This reverts commit cbe9c01336e23a63259db65d22d63d6a697b8813.
/external/drm_hwcomposer/glworker.h
cbe9c01336e23a63259db65d22d63d6a697b8813 30-Jul-2015 Puneet Kumar <puneetster@google.com> Revert "drm_hwcomposer: have DrmDisplayCompositor do its own OpenGL composition"

This reverts commit 2317bb19d8663efc31e6fcd8cf7fd2a73577253d.

For now until we figure out a more stable SF/hwc

Change-Id: Ia5ca089610a487bf036a1ddd5fb62e504e02ad98
/external/drm_hwcomposer/glworker.h
d078e4cab78f81057cd25355199caba5a147342e 30-Jul-2015 Puneet Kumar <puneetster@google.com> Revert "drm_hwcomposer: remove GLCompositor and the GLWorker thread"

This reverts commit abebc7a78fe8a4df6495c8e5064719dc92b04004.

For now until we figure out a more stable solution for SF/hwc

Change-Id: I7a505fc67873f943704e8b48db4167b9beca7691
/external/drm_hwcomposer/glworker.h
abebc7a78fe8a4df6495c8e5064719dc92b04004 22-Jul-2015 Zach Reizner <zachr@google.com> drm_hwcomposer: remove GLCompositor and the GLWorker thread

They are dead code now that DrmDisplayCompositor uses GL directly.

Change-Id: Ie4beeab60440a51bd87486847b5453e20288d1d8
/external/drm_hwcomposer/glworker.h
2317bb19d8663efc31e6fcd8cf7fd2a73577253d 16-Jul-2015 Zach Reizner <zachr@google.com> drm_hwcomposer: have DrmDisplayCompositor do its own OpenGL composition

To accomplish this a few things changed:
- DrmComposition::GetRemainingLayers always returns the number of planes needed
- DrmComposition::AddLayer succeeds even if no DrmPlane was found for it
- DrmDisplayComposition::AddLayer has overload that imports the given buffer
- GLWorkerCompositor has a function to finish its composite before returning

Put together this change makes DrmComposition always accepts all layers given to
it even if it means some of those layers are assigned a NULL DrmPlane. The
DrmDisplayCompositor will scan its given layers for any that are missing planes.
In such a case, a DrmPlane is stolen from the last layer to receive a plane.
Then all layers in the DrmDisplayComposition that have no planes (including the
one stolen from) are composited synchronously using a GLWorkerCompositor and a
new layer is generated from the results. That layer is added to the
DrmDisplayComposition using the new import AddLayer function and the stolen
DrmPlane. DrmDisplayCompostior then continues as usual.

Change-Id: Ia6477c210c8f1307a4e537bec46889110d79ca18
/external/drm_hwcomposer/glworker.h
dac5d199ba3d6adeb96c385fa184351543f7cad6 16-Jul-2015 Zach Reizner <zachr@google.com> drm_hwcomposer: make the gl worker compositor not nested

Change-Id: I06b75644408a570044499a9f603a478f3199661f
/external/drm_hwcomposer/glworker.h
6cbe883275ec58139ea13fef69628f233822808e 27-Jun-2015 Zach Reizner <zachr@google.com> drm_hwcomposer: Add glworker

The glworker allows signalling the fence synchronously once the GL
work is done. It also helps performance by putting all GL in a
separate thread, which avoids (costly on some GPUs) makecurrent.

Change-Id: Ia4ee137df5c9a4b1afcf6180407371d6ba7f699a
/external/drm_hwcomposer/glworker.h