Age | Commit message (Collapse) | Author |
|
Bug: 31334677
Test: manual && hwuimacro --onscreen partialdamage
Change-Id: I9b346b4053ec12c8a78a143a4dc0e708c44888a2
|
|
Test: manual testing in skiavk mode
Change-Id: I5b9d8af7d9cecf2f022ef104ec33a5b7477e9e0c
|
|
Test: hwui unit tests
Change-Id: Icd94d0e21130d86fb5514801f999d0018a69e151
|
|
|
|
Change-Id: Id8283a0975325e6830d55fd1e33c5f292a1e9be0
Test: refactoring cl.
bug:30999911
|
|
Test: built and booted on device
Change-Id: I4c1060ec72bc67e54e6b2d25b1f2c13aaa513f89
|
|
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
|
|
Bug: 31334677
Test: manual && hwuimacro --onscreen partialdamage
Change-Id: I9b346b4053ec12c8a78a143a4dc0e708c44888a2
|
|
This reverts commit eab3f2658aa41d37c3b05d49a2ce4e3f4ed85399.
Fixes first-frame issue, mReportNextDraw needs to override
mStopped
Fixes: 28118961
Fixes: 27286867
Change-Id: I5c811759637d08ba9f3b342016d1b3006986d5a2
|
|
This reverts commit 945961f78a78eced823d5ba78505c781b079703d.
Change-Id: Iebc1d49fac33380233f8785fc39bec6c30a5e714
|
|
Bug: 27286867
WindowManager has committed to stopped state
controlling the lifecycle of the Surface, so
make that a first-class thing in HWUI as well.
This makes it more resistent to things like
a rogue updateSurface() happening while mStopped=true,
leading to bad things down the line. Instead let
the surface be changed/updated as often as desired,
and just block any attempt to draw on that surface.
Also removes some unnecessary makeCurrent()s, as
EglManager ensures that we *always* have a valid
GL context now (using a pbuffer surface if there is
no window surface set)
Change-Id: Iead78ddebc7997e8fdb0c9534836352f5e54b9bd
|
|
Bug: 27286867
If the system/app is slow, it might take too long to
stop drawing. Switch the ordering of destroying stuff so
that we switch to the pbuffer surface first, then do
cleanup
Change-Id: If64a3dbb71bb9fd53567231590436a89b2f1a09e
|
|
Bug: 27379093
Change-Id: Ifda18287248e4ae07d4bf2ae9642a9d23039e81f
|
|
Change-Id: I68b883e8a1bb17abd4cf151d057dd07e53a80f50
|
|
Not using EGL_SWAP_BEHAVIOR_PRESERVED_BIT as config attribute for
eglChooseConfig doesn't automatically mean the swap behavior is buffer
destroyed. This is driver implementation specific and on some hw this
can still be buffer preserved. Make sure it is buffer destroyed by
explicitly setting it for every new surface when requested.
Change-Id: Ie2c7c89b0d20e35832b488c6263bb4d9dd844a75
Signed-off-by: Christian Poetzsch <christian.potzsch@imgtec.com>
|
|
If eglSwapBuffers is called but the under surface was destroyed,
the EGL_BAD_NATIVE_WINDOW error may also be generated according
to the EGL spec 1.4.
This really shouldn't happen from the upper, but add the graceful
handling of this case also.
Change-Id: Ic0a599808b72f401d2a01c3dc40f9e6ea0e0a564
Signed-off-by: Zhang Dongsheng <dongsheng.zhang@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
|
|
Change-Id: If8d5f5d3ace050577986a554182b2b66fd2257e1
|
|
This reverts commit 096895550b9d5430d7a001d491566decf4f9791b.
Change-Id: Ib2ed1e96d8f7f88302f5e27fe735687194553104
|
|
This reverts commit b2442896e3a226c7ebe9d47fa80b257e98a6a34d.
Change-Id: I50f6555451f71067505245333c8e558b5e3b2b3b
|
|
Change-Id: I4c122278a7e88b6f47c4dd3c5fc553df7d3c900d
|
|
Bug: 25017107
Change-Id: I545a746ba89d577de5769bc3e7dd335a100638c0
|
|
Bug: 25149700
Change-Id: I535ead7c1f8ba8766dff85fcf26a9cfe76647fb8
|
|
Bug: 25149700
Change-Id: I9280e2414255fb01e672094cd8d173efadac1681
|
|
Removes remnants of EGL extension support, and persistence of
GL extension list.
Change-Id: I35aec12d900bdb33549ea47654bb8146f350ef48
|
|
Bug: 21753739
Includes a revert of 13d1b4ab10fbee5e81a2ba1ac59cfae1e51d3ef0
as that only supported EGL_EXT_buffer_age
Change-Id: Ia86a47d19e3355c067934d7764c330b640c6958d
|
|
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
|
|
Bug: 22444755
WindowManager may decide to yank the surface at any point, so
attempt to kinda handle this
Change-Id: Id2f665d2f0f93bccd4ec977fbf52dca4dc1ec891
|
|
Bug: 20761426
Change-Id: I520e60ca4f182dea590bc86eebd522e1db7a018a
|
|
Bug: 20297820
Change-Id: I37c63bab6f6c0d2337c8c6002046d2ef17e74097
|
|
BUG: 20761426
Disabled temporarily
Change-Id: I0b6b6f0eebab886145e13fa35aefe76826965cf5
|
|
|
|
Change-Id: I18d526120651676109200bfd5da87cafcd7e3d13
|
|
Change-Id: Ia6b3c8b2afd3dfcee7f3ce401d846b789612054a
|
|
Change-Id: I1227a3886fb24e4d9fad79fca469794f06cfb15e
|
|
Adds remaining missing overrides and nullptr usages, missed due to
an extreme failure in tool usage.
Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
|
|
Change-Id: I40698ce1e382cb41eec7af5ea49ac0e2f997d555
|
|
Bug: 18317479
RenderNode::prepareSubTree calls prefetchAndMarkInUse
on every bitmapResoruce in the DisplayList. However,
this resulted in textures being uploaded for bitmaps
that would be drawn from the AssetAtlas instead.
To fix this we teach TextureCache about the AssetAtlas
so that calls to TextureCache return the Texture from
AssetAtlas if it exists. Thus usage of AssetAtlas
is now purely to allow for further optimizations via
draw merging instead of a requirement to get
any benefit at all.
Change-Id: I65282fa05bac46f4e93822b3467ffa0261ccf200
|
|
into lmp-mr1-dev
* commit '842697a3602204036e991cfea8b74da3df6e7f14':
Trace some interesting events
|
|
Bug: 18337099
Change-Id: Ie2e60da2b9f06e0368061c944d8123ab6903355c
|
|
a51fba0
* commit 'e05575e9c36850d8cfe49396ac9a1372511b12bf':
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
|
|
into lmp-mr1-dev automerge: a27e1a3
* commit '97054254d4c8eef66538814e1d5def776ceba97a':
Be more conservative about current buffer
|
|
Bug: 18065565
Change-Id: I0b9c85ecf384ebe525e3a38803ab77d7ee37f33a
|
|
lockHardwareCanvas" into lmp-mr1-dev
* commit 'b64e4372bb60bdce75e2af7d0b94efe92d94ac6a':
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
|
|
Narrow the use of #include directives in hwui, replacing with forward
declarations where straightforward. Speeds compiles; doesn't do any
restructuring of code.
Change-Id: Icac2baffb5896f55d8c6718e9bd9d4bfa02d3ca0
|
|
Bug: 17516789
Change-Id: I3dcb10360c2aef6326f7dbbff6815866d4c143b6
|
|
Bug: 17208461
Change-Id: Ibdb104a493285d77a6891c5e74e38a52c7014da9
|
|
bug:17208461
Change-Id: I4d58f301cf0f5e8145e808a5d6ade4de7801970b
|
|
Bug: 15513308
Bug: 15449247
Change-Id: I13a29f9c8d4975cdda6dcb33b6332c2555ff0f7c
|