History log of /frameworks/base/libs/hwui/renderthread/EglManager.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd55852fcd840f7f4c4d7a0a7253a2995c77afa2 17-Nov-2016 Greg Daniel <egdaniel@google.com> Make buffer age work in Vulkan

Test: manual testing in skiavk mode

Change-Id: I5b9d8af7d9cecf2f022ef104ec33a5b7477e9e0c
/frameworks/base/libs/hwui/renderthread/EglManager.h
500a0c30d4dcd012218c3e44a62926a1c34a259f 26-Oct-2016 Stan Iliev <stani@google.com> Implement Skia pipelines for OpenGL and Vulkan.

Implement Skia pipelines for OpenGL and Vulkan:
base SkiaPipeline, SkiaOpenGLPipeline and SkiaVulkanPipeline.
Write unit tests for SkiaPipeline.

Test: Built and run manually on angler-eng.
Change-Id: Ie02583426cb3547541ad9bf91700602a6163ff58
/frameworks/base/libs/hwui/renderthread/EglManager.h
694d499662838123f474f41b31dea84ec5d563f0 27-Oct-2016 sergeyv <sergeyv@google.com> Routine to upload hardware bitmaps

Change-Id: Id8283a0975325e6830d55fd1e33c5f292a1e9be0
Test: refactoring cl.
bug:30999911
/frameworks/base/libs/hwui/renderthread/EglManager.h
253f2c213f6ecda63b6872aee77bd30d5ec07c82 29-Sep-2016 Romain Guy <romainguy@google.com> Linear blending, step 1

NOTE: Linear blending is currently disabled in this CL as the
feature is still a work in progress

Android currently performs all blending (any kind of linear math
on colors really) on gamma-encoded colors. Since Android assumes
that the default color space is sRGB, all bitmaps and colors
are encoded with the sRGB Opto-Electronic Conversion Function
(OECF, which can be approximated with a power function). Since
the power curve is not linear, our linear math is incorrect.
The result is that we generate colors that tend to be too dark;
this affects blending but also anti-aliasing, gradients, blurs,
etc.

The solution is to convert gamma-encoded colors back to linear
space before doing any math on them, using the sRGB Electo-Optical
Conversion Function (EOCF). This is achieved in different
ways in different parts of the pipeline:

- Using hardware conversions when sampling from OpenGL textures
or writing into OpenGL frame buffers
- Using software conversion functions, to translate app-supplied
colors to and from sRGB
- Using Skia's color spaces

Any type of processing on colors must roughly ollow these steps:

[sRGB input]->EOCF->[linear data]->[processing]->OECF->[sRGB output]

For the sRGB color space, the conversion functions are defined as
follows:

OECF(linear) :=
linear <= 0.0031308 ? linear * 12.92 : (pow(linear, 1/2.4) * 1.055) - 0.055

EOCF(srgb) :=
srgb <= 0.04045 ? srgb / 12.92 : pow((srgb + 0.055) / 1.055, 2.4)

The EOCF is simply the reciprocal of the OECF.
While it is highly recommended to use the exact sRGB conversion
functions everywhere possible, it is sometimes useful or beneficial
to rely on approximations:

- pow(x,2.2) and pow(x,1/2.2)
- x^2 and sqrt(x)

The latter is particularly useful in fragment shaders (for instance
to apply dithering in sRGB space), especially if the sqrt() can be
replaced with an inversesqrt().

Here is a fairly exhaustive list of modifications implemented
in this CL:

- Set TARGET_ENABLE_LINEAR_BLENDING := false in BoardConfig.mk
to disable linear blending. This is only for GLES 2.0 GPUs
with no hardware sRGB support. This flag is currently assumed
to be false (see note above)
- sRGB writes are disabled when entering a functor (WebView).
This will need to be fixed at some point
- Skia bitmaps are created with the sRGB color space
- Bitmaps using a 565 config are expanded to 888
- Linear blending is disabled when entering a functor
- External textures are not properly sampled (see below)
- Gradients are interpolated in linear space
- Texture-based dithering was replaced with analytical dithering
- Dithering is done in the quantization color space, which is
why we must do EOCF(OECF(color)+dither)
- Text is now gamma corrected differently depending on the luminance
of the source pixel. The asumption is that a bright pixel will be
blended on a dark background and the other way around. The source
alpha is gamma corrected to thicken dark on bright and thin
bright on dark to match the intended design of fonts. This also
matches the behavior of popular design/drawing applications
- Removed the asset atlas. It did not contain anything useful and
could not be sampled in sRGB without a yet-to-be-defined GL
extension
- The last column of color matrices is converted to linear space
because its value are added to linear colors

Missing features:
- Resource qualifier?
- Regeneration of goldeng images for automated tests
- Handle alpha8/grey8 properly
- Disable sRGB write for layers with external textures

Test: Manual testing while work in progress
Bug: 29940137

Change-Id: I6a07b15ab49b554377cd33a36b6d9971a15e9a0b
/frameworks/base/libs/hwui/renderthread/EglManager.h
49796451cb9d1dae580618eb320ef3c5e6d90cd4 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in libs/hwui.

* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
Test: build with WITH_TIDY=1

Change-Id: Iab3e6636f60a70cb124f29dc19f20f842fa8dfda
/frameworks/base/libs/hwui/renderthread/EglManager.h
c96955d9bb997b51be5fa929b5a67349d0459c3a 26-Feb-2016 John Reck <jreck@google.com> Always swap buffers if using partial update extension

Bug: 27379093
Change-Id: Ifda18287248e4ae07d4bf2ae9642a9d23039e81f
/frameworks/base/libs/hwui/renderthread/EglManager.h
149173d28c0843aba86b0810ce75b34be6a0d08f 10-Aug-2015 John Reck <jreck@google.com> Support new EGL extensions

Bug: 21753739

Includes a revert of 13d1b4ab10fbee5e81a2ba1ac59cfae1e51d3ef0
as that only supported EGL_EXT_buffer_age

Change-Id: Ia86a47d19e3355c067934d7764c330b640c6958d
/frameworks/base/libs/hwui/renderthread/EglManager.h
13d1b4ab10fbee5e81a2ba1ac59cfae1e51d3ef0 30-Jul-2015 Season Li <seasonl@nvidia.com> renderthread: add EGL_EXT_buffer_age support

EGL_EXT_buffer_age is better than EGL_BUFFER_PRESERVED
because it can save memory bandwidth used to blit
back buffer into front buffer.

Change-Id: I2fea0ee08dc7dd66e348b04dd694d075d509d01b
/frameworks/base/libs/hwui/renderthread/EglManager.h
f2dcc2aecb94e726096256c47b913ed0a57ae7e2 16-Jul-2015 John Reck <jreck@google.com> Don't crash on makeCurrent fail

Bug: 22444755

WindowManager may decide to yank the surface at any point, so
attempt to kinda handle this

Change-Id: Id2f665d2f0f93bccd4ec977fbf52dca4dc1ec891
/frameworks/base/libs/hwui/renderthread/EglManager.h
d7db4d767246b41d44995acb93d03d220b53c748 20-May-2015 John Reck <jreck@google.com> Eliminate requireGlContext

Bug: 20297820

Change-Id: I37c63bab6f6c0d2337c8c6002046d2ef17e74097
/frameworks/base/libs/hwui/renderthread/EglManager.h
d04794a9a3f9edc8b7ca336175d66eb81a8f55fa 08-May-2015 John Reck <jreck@google.com> Add eglSwapBuffersWithDamageKHR support

BUG: 20761426
Disabled temporarily

Change-Id: I0b6b6f0eebab886145e13fa35aefe76826965cf5
/frameworks/base/libs/hwui/renderthread/EglManager.h
5515637540bedd8fc9a1a6e46a4b512dd45520a5 21-Jan-2015 John Reck <jreck@google.com> Add a WAIT_FOR_GPU_COMPLETION option

Change-Id: I18d526120651676109200bfd5da87cafcd7e3d13
/frameworks/base/libs/hwui/renderthread/EglManager.h
0e89e2b7bcb2c035e8cee77f93120e7c5617f8d2 31-Oct-2014 John Reck <jreck@google.com> Layer changes

Bug: 17208461

* Switch Layer to be VirtualLightRefBase instead of
Caches' side-channel ref-counting
* Include active layers in gfxinfo dump
* Run gfxinfo dump on the correct thread
* Dump gfxinfo on Layer creation failure

Change-Id: I28d195699e2334518e215ab28c7a17355aee9678
/frameworks/base/libs/hwui/renderthread/EglManager.h
1125d1fa92ab9f3b8315bbfb72e038b62dfd454b 23-Oct-2014 John Reck <jreck@google.com> Add some free zoom to lockHardwareCanvas

Bug: 18099195

Don't use EGL_SWAP_BUFFER_PRESERVED on surfaces that will
never benefit. Also clean up some confusing naming

Change-Id: I674ca64e0464a3282cff79e5ecd350d08f47c014
/frameworks/base/libs/hwui/renderthread/EglManager.h
2cdbc7d2283aae3d77b12c8fdbba8ca4bd3db5ea 18-Sep-2014 John Reck <jreck@google.com> Special case EGL_BAD_SURFACE

Bug: 17516789

Change-Id: I3dcb10360c2aef6326f7dbbff6815866d4c143b6
/frameworks/base/libs/hwui/renderthread/EglManager.h
3b20251a355c88193c439f928a84ae69483fb488 23-Jun-2014 John Reck <jreck@google.com> No-fail invokeFunctor

Bug: 15513308
Bug: 15449247

Change-Id: I13a29f9c8d4975cdda6dcb33b6332c2555ff0f7c
/frameworks/base/libs/hwui/renderthread/EglManager.h