Commit Graph

96 Commits

Author SHA1 Message Date
John Reck
322b8ab774 Remove old TaskManager system
Replace it with a newer, fancier, WorkQueue-inspired
one that's just a global common thread pool.

Test: hwuiunit passes
Change-Id: Ib5d03104a08bbac9a4ec67a1bfc0db2b35d6700f
2019-03-18 09:34:11 -07:00
Derek Sollenberger
a19b71a54a Directly manage buffer presentation in Vulkan using AHardwareBuffers.
Instead of relying on Vulkan swapchains this CL enables HWUI to directly
manage the native window.  This allows us to preallocate buffers using
our own strategy as well as having no longer having to jump through an
unecessary translation layer that resulted in code that was hard to
reason about and also introduced inefficiencies.

Bug: 123541940
Bug: 119687951
Test: CtsUiRenderingTestCases and CtsGraphicsTestCases
Change-Id: I7e5930748795e7ca4a998ab2c608c3c9b6363037
2019-03-08 09:25:35 -05:00
John Reck
700079e817 Fix RenderThread setForLooper
RenderThread doesn't use ThreadBase::threadLoop
so it also needs to explicitly Looper::setForLooper

Fixes: 124467483
Test: hwuiunit
Change-Id: I3703b5d3dbbbaa68e88fc23756dfccacfce863cb
2019-02-19 10:38:50 -08:00
Leon Scroggins III
1249757910 Remove references to ANDROID_ENABLE_LINEAR_BLENDING
Test: make

There is no longer any intent to turn on linear blending.

Change-Id: Ia1016f31833212da6ad4b4c6ebe03d16a509746d
2019-01-31 14:25:32 -05:00
dimitry
61dfd8fa83 hwui: Add libGLESv1_CM to the list of shared_libs
hwui tests are using glMapBufferRangeEXT symbol from libGLESv2
which according to the include file is provided by libGLESv1_CM.

Bug: http://b/69603741
Test: make
Change-Id: I946ec66ce08e0296a553f3c67bddefa4b568d0fd
2018-12-28 22:51:17 +01:00
John Reck
c0cd1d7f33 Merge "New WebViewFunctor API" 2018-12-18 17:50:37 +00:00
Stan Iliev
b8811aa52f Read product property to set Vulkan as default render pipeline
Bug: 119267168
Test: Booted pixel 3 with Vulkan rendering
Change-Id: Ibc4b2e00d791b1fb333c0e0f5db2b5f084808c24
2018-12-14 22:36:40 +00:00
John Reck
283bb46846 New WebViewFunctor API
Should function alongside existing functor API.

Bug: 120997728
Test: hwuiunit passes
Change-Id: I8f6143d0be1111431b55016f34de319f6b8c8910
2018-12-14 14:07:18 -08:00
dimitry
cab37cd652 hwui: Add libGLESv3 to the list of shared_libs
hwui tests are using symbols from libGLESv3 byt rely on the fact
that they used to be exported by libGLESv2. It used to rely on
the fact that libGLESv3.so was a symlink to libGLESv2.so which
is no longer the case.

Bug: http://b/69603741
Test: make
Change-Id: I769f1fa79e364ae87d01c07f6a3976200e8722a2
2018-12-13 15:36:45 +01:00
John Reck
4f2b2d6b88 Merge "Revert "Revert "Make HWUI's surface Reliable^TM""" 2018-12-07 22:02:02 +00:00
John Reck
848f651554 Revert "Revert "Make HWUI's surface Reliable^TM""
This reverts commit dd08224e4d.

Bug: 120097554
Bug: 120342364
Bug: 120421537

Test: verified emulator can boot OK, with no log warnings
Test: verified keyboard works in landscape

Change-Id: Iae2cd1140d81755b126adfb21ec885181f3bc6b6
2018-12-06 15:18:27 -08:00
Chris Blume
4142339381 Add non-interop Vulkan functor
An interop Vulkan functor already exists. It will call the OpenGL
functor and use AHardwareBuffer to translate the OpenGL textures into
something which can be used in Vulkan.

This CL adds the frameworks for a non-interop Vulkan functor. This
functor is not yet complete (and as a result cannot yet be tested). This
is just setting the stage for future work.

Test: This is dead code and cannot yet be tested.
BUG=115613038

Change-Id: I2b87c86cb511abb961c31c17c2fbbc085b07ca4a
2018-12-05 16:26:59 -08:00
Elliott Hughes
01fb624e09 Merge "C++17 is the default now." am: fbb102ea84 am: ccb3d1d61a
am: 8dd21cd6b5

Change-Id: I79e72e3a99c9590fdbaab72507044aa85dfa38ef
2018-12-03 18:05:24 -08:00
Elliott Hughes
60a42ccac5 C++17 is the default now.
Test: builds
Change-Id: I64495775afe4ded7d3312cc35a154fecba64adc3
2018-12-03 09:38:35 -08:00
Bo Hu
dd08224e4d Revert "Make HWUI's surface Reliable^TM"
This reverts commit 650bd9a7b3.

Reason for revert: broken emulator b/120342364

Exempt-From-Owner-Approval:

Change-Id: If05d9d87325e1d836375d7dc79ff66ef057d228d
2018-12-03 13:59:49 +00:00
John Reck
f0732618f0 Merge "Make HWUI's surface Reliable^TM" 2018-11-29 23:23:00 +00:00
John Reck
820f382b9e Merge "Remove USE_HWC2 usage" am: 8757179e52 am: 70a2813e86
am: 0ff158799a

Change-Id: I8e87f4661e51b422886c72ef506f196608a32a42
2018-11-28 17:30:15 -08:00
John Reck
650bd9a7b3 Make HWUI's surface Reliable^TM
You won't believe this one weird trick to make
EGL_BAD_ALLOC errors never happen again! libgui
hates it!

Bug: way too many to list
Test: none - there probably should be, though
Change-Id: I8e7fc3e584f90c01e0fd932497604a1d93710ba6
2018-11-28 13:39:07 -08:00
John Reck
c77543022d Remove USE_HWC2 usage
It's always true now

Test: didn't
Change-Id: Ibefde5feaeaec8fb68cbc6ea1c019bf8b5e608bb
2018-11-28 13:07:24 -08:00
Chris Blume
5f1ac2b217 Rename VkFunctorDrawable->VkInteropFunctorDrawable
The Vulkan functor is currently doing interop, calling into the real
OpenGL functor. We will be adding a real, non-interop Vulkan functor
soon. In order to enable that, this patch renames the existing
VkFunctorDrawable to VkInteropFunctorDrawable. That allows us to use the
name VkFunctorDrawable for the real functor.

Test: This is a simple rename. Existing unit tests should work.

BUG=115613038

Change-Id: I427ad4d17ee92c3832e7bace55450b41a036f557
2018-11-06 11:30:47 -08:00
Chih-Hung Hsieh
e1afb6cb29 Allow implicit-fallthrough warnings locally.
It will be a global error by default.
Cherry pick lost changes from AOSP, for Android.mk and main.cpp.

Test: make checkbuild
Bug: 112564944
Change-Id: I6f1024fa5e31302af27fa9d5bac195e511f4ba20
Exempt-From-Owner-Approval: do not block on new warnings
2018-10-22 12:25:50 -07:00
Derek Sollenberger
e65e6c0d7c Merge "Remove unused classes from HWUI." 2018-10-18 16:43:11 +00:00
Yangster-mac
ba5bf0d401 Log the davey event.
Test: statsd test
Fix: 117528646

Change-Id: Idb7cc37cd18047120adabbc9fbda1c89b109f3a7
2018-10-10 05:41:37 +00:00
Derek Sollenberger
72903272ae Remove unused classes from HWUI.
Test: compiles and hwui_unit_tests
Change-Id: I42e279a497ea17ad06a857c9914d5aca5df9f6df
2018-10-03 14:30:21 -04:00
John Reck
bb3a358317 Wire-up default force-dark based off of isLightTheme
Bug: 102591313
Test: Compared settings in light & dark UI modes with
force_dark set to true. Observed that force_dark fixes
were not present when UI mode was set to dark, indicating
force_dark was appropriately globally-disabled

Change-Id: I5882829bb5871829fc8fc9911682f52a6ba5f445
2018-09-27 19:38:13 +00:00
Stan Iliev
11606ffa36 Implement WebView support for Vulkan using temporary buffer
Draw WebView in an offscreen GL buffer, then import and draw the
buffer with Vulkan.

Bug: 115610873
Test: Passed WebView CTS tests that are part of UiRendering.
Change-Id: Ida137fe9b8652d2a936ec2798b909be7e77b3462
2018-09-18 18:01:48 -04:00
John Reck
bdc9f1bb90 Disable GLES validation
Need to disable this for SurfaceTexture users specifically
but the quickest is to just disable it globally

Bug: 115311435
Test: builds
Change-Id: I75daddf993c784238593db3d40126af0e9d0ffdc
2018-09-14 15:34:22 -07:00
TreeHugger Robot
2f1e32fff5 Merge "Refactor HWUI readback code to be backend independent" 2018-09-10 19:22:57 +00:00
Stan Iliev
1a025a7163 Refactor HWUI readback code to be backend independent
Implement readback from Surface, TextureView and HW Bitmap
for Vulkan pipeline by wrapping the graphics buffer in an SkImage.
Refactor both Vulkan and GL readback to use common code.
TextureView readback is moved from IRenderPipeline interface to
Readback class. Refactor all 3 readback flows to use common
implementation.

Test: Passed all view, uirendering and graphics CTS tests with GL
Test: Passed many CTS test with Vulkan, that require readback
Bug: 113673613
Change-Id: Ifbfd8170a5401f87a709b4b1b9fa058e8e11768d
2018-09-10 13:18:04 -04:00
TreeHugger Robot
7fb73e0b0a Merge "Remove dead code" 2018-09-08 04:51:44 +00:00
John Reck
c3b7c20999 Remove dead code
This appears to have been added for use by skia, but
there are no references to this anymore. So delete it.

Test: builds
Change-Id: Iac2d25c8d50f48c38c735b2bf092d73596937f74
2018-09-07 12:59:05 -07:00
Stan Iliev
564ca3e2c9 Reland "TextureView Vulkan support and optimized OpenGL draw"
Fix an issue with incorrect texture matrix, when there is 90/270 rotation.
This happened, because after refactoring SkImage has buffer width/height,
instead of layer width/height.
This reverts commit a683eb3945.

Bug: 113673613
Test: Ran TextureView CTS and lensblur in camera app
Change-Id: If3bcf9cd5195de09fd67a753708568a8e3ca3a9a
2018-09-05 01:58:34 +00:00
Yichi Chen
9f95955620 Add cache validation to ensure the validity
Create cache identity from GL_VERSION and store in ShaderCache.
In the next time ShaderCache is restored from disk, compare the
cache identity to ensure its validity. If GL_VERSION changes in
between, flush out entire FileBlobCache and start from an empty
one.

Bug: b/71800782
Test: Wrote a new unit test to save and restore ShaderCache
Test: hwui_unit_tests
Change-Id: Ie573dc4f18733eee090725be30445d879765231b
2018-09-04 04:04:58 +00:00
Stan Iliev
e6cfb09cc4 Merge "Revert "TextureView Vulkan support and optimized OpenGL draw"" 2018-08-30 18:56:41 +00:00
John Reck
867c43de05 Revert "TextureView Vulkan support and optimized OpenGL draw"
This reverts commit c8e22a6532.

Reason for revert: broke camera, b/113555199

Bug: 113555199
Change-Id: Iae9b462694d5de0cd99427afead63b567fb4d71d
2018-08-30 18:42:08 +00:00
John Reck
8f45d4afd9 New DisplayList v2
First step of many

* Pulls SkLiteDL and SkLiteRecorder into HWUI

* forceDark shifted to be a sync-time transformation
instead of record time. No meaningful behavior change,
but much more flexible heuristics are possible this
way.

Test: build, poked around with forceDark on

Change-Id: I7b7cec5b7fd7c2b18823b4d92d821cf5898f9b88
2018-08-29 13:53:36 -07:00
Stan Iliev
c8e22a6532 TextureView Vulkan support and optimized OpenGL draw
Render TextureView as hardware bitmaps, instead of GL textures.
Cache SkImage for each observed GraphicBuffer, which is faster
even for GL.
Implement C++ SurfaceTexture, which allows Java SurfaceTexture
to be used with Vulkan HWUI render thread and application GL.
threads. Delete GLLayer and VkLayer classes and texture code
from old HWUI pipeline.

Test: Ran skiagl and skiavk pipeline with a TextureView app.
Test: TextureView CTS tests pass for GL pipeline.
Test: Ran Android NDK Native codec sample app.
Change-Id: Idc94f864ce2d34fd6ceff4be4fc7d3327e99879c
2018-08-29 10:22:03 -04:00
John Reck
4d7c62b0f2 Remove unused library dependency
Test: builds
Change-Id: I38e2672238e4571b9236621528e5b362039de03d
2018-08-02 16:33:21 -07:00
Florin Malita
aee140c8b6 Remove SkiaCanvasProxy
No longer being used.

Change-Id: Iae2c1938522b7802c4d38a04a365ad8881f3c4aa
2018-07-26 14:12:08 -04:00
John Reck
e5a55523d6 Merge "Merge "Disable LTO on -eng" am: 1918b39942 am: af3e763358" into pi-dev-plus-aosp
am: 7ac9ac5605

Change-Id: I7b048d8897006ba3e0772a9c6e60ecfed0cbe2a8
2018-07-11 16:03:35 -07:00
John Reck
af3e763358 Merge "Disable LTO on -eng"
am: 1918b39942

Change-Id: I925182b722d7bf6b1bb63c298a8ec9e345f0c4ac
2018-07-11 14:48:50 -07:00
John Reck
2729418128 Disable LTO on -eng
Speeds up incremental compile of one cpp file change
from over a minute to around 15 seconds

Bug: 111277863
Test: touch a .cpp file in hwui & mmm
Change-Id: I946ecad411a7a59f87ed9e1eeb146d6f57bd038a
2018-07-11 18:24:58 +00:00
John Reck
9ce2bf7e0c Auto-dark mode prototype
Experimental force_dark prototype mode. Enabled
by setting debug.hwui.force_dark to true.

Test: verified nothing changes without prop being set

Change-Id: Ib02f3f1a9c591cab1f312b827451f04c782c2f41
2018-07-09 10:16:25 -07:00
Derek Sollenberger
0fba15b2ba Bind correct FBO when drawing a WebView into a layer.
The WebView was unable to draw into either a standard clipped
layer or the "fading edges" unclipped layer. This CL and its
companion test cases ensure that both work with simple and
complex clips.

Bug: 79619253
Bug: 80443556
Bug: 80477645
Test: atest CtsUiRenderingTestCases:.LayerTests
Merged-In: I0e16b724f74415a61cc2a841ccf4a491f293ac94
Change-Id: I4900222975fc841b11828916878fb0ea6d87dcda
2018-06-01 01:08:15 +00:00
TreeHugger Robot
dd309ea63a Merge "Bind correct FBO when drawing a WebView into a layer." 2018-05-31 21:21:52 +00:00
Derek Sollenberger
02456f0ce1 Bind correct FBO when drawing a WebView into a layer.
The WebView was unable to draw into either a standard clipped
layer or the "fading edges" unclipped layer. This CL and its
companion test cases ensure that both work with simple and
complex clips.

Bug: 79619253
Bug: 80443556
Bug: 80477645
Test: atest CtsUiRenderingTestCases:.LayerTests
Change-Id: I0e16b724f74415a61cc2a841ccf4a491f293ac94
2018-05-31 15:55:13 -04:00
John Reck
e4c1e6c5a1 Remove dead code
Test: builds
Change-Id: I57cf72ca460115463d7759097d5ba598b5ec1775
2018-05-30 16:40:07 -07:00
John Reck
e170fb6686 A better HW Bitmap uploader
Move all HW bitmap upload operations off of RenderThread.
Ensure EGL context outlives all upload requests

Bug: 79250950
Test: builds, boots, systrace is good, CTS bitmap tests pass

Change-Id: I5ace6c516d33b1afdf1a407cd8b183f6b60c22c1
2018-05-09 11:39:37 -07:00
Mike Reed
faaf6872b1 remove unneeded RecordedOps
Test: make

Change-Id: Ifcb0df64ad649623ae875462f55d9009a4e1ac03
2018-05-09 13:18:35 -04:00
Mike Reed
932caf0668 remove obsolete Glop, Tessellators, Programs, and SkiaShader
Test: make

Change-Id: I92f36335830dfc37be72468546637d9986f0baf1
2018-05-08 20:47:45 +00:00