Commit Graph

71 Commits

Author SHA1 Message Date
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
Mike Reed
e7f688bd01 remove BakedOps and much of renderstate
Test: make

Change-Id: If070b7436b848c6840abfac5f051b0f5b6cb17ce
2018-05-04 15:21:49 -04:00
android-build-team Robot
2214272f1c Merge "remove shadow related references" 2018-05-04 18:04:24 +00:00
Mike Reed
4ad8f5329f remove shadow related references
Test: make

Change-Id: I1fc387ee442ca9120ff4f80248cc2395e93128f6
2018-05-04 13:12:16 -04:00
John Reck
d9d7f127b5 Delete a bunch of code
This removes the duality of DisplayList, removing a small amount of
overhead

Test: buids & hwuiunit passes

Change-Id: I8bb3a20e9ead1caec4b4a8a3e9f2c08f717a7096
2018-05-03 15:25:19 -07:00
Mike Reed
8cafcc628f remove (dead) caches from hwui
Test: make

Change-Id: I18bfe51896672272ce7d471eaead69b651399368
2018-05-03 13:23:40 -04:00
Mike Reed
ebf9ffce47 remove (dead) Font code
Test: make

Change-Id: Icdb0f2fc356459718f02569054b91eadcd6a15c2
2018-05-02 12:56:08 -04:00
Yao Chen
c0100c1222 Merge changes from topic "statsd_socket_review" into pi-dev am: 46fca44ee5
am: 3585804c70

Change-Id: I97f951a53f7d0466be48c521a58ac77b3616145a
2018-04-20 20:33:43 -07:00
Yao Chen
49954cd681 Add socket listener to statsd. And remove Davey atom.
+ The socket listener is behind a flag. It's disabled until we get sepolicy changes in.
+ Data parsing code is from logd, because we use the same format.

+ Removed Davey from JankTracker because it violates our new sepolicy

Test: manually
Bug: 78239479

Change-Id: Ib17729fbc362cdb13385f780e2d636a95adf9bc3
2018-04-20 17:41:25 -07:00
John Reck
80e73eee08 Merge changes Ie7b336ea,I36a8cb45
* changes:
  Remove Properties::isSkiaPipeline (3/!?)
  So long OpenGLPipeline & OpenGLReadback (2/??)
2018-04-17 21:18:39 +00:00
TreeHugger Robot
8d009c6c16 Merge "Adding privacy tags to graphicsstats proto." 2018-04-12 22:32:37 +00:00
John Reck
1072fffddb Remove Properties::isSkiaPipeline (3/!?)
Test: hwuiunit & CtsUiRenderingTestCases pass
Change-Id: Ie7b336eacdd1b8660e09653c64eb6ea0a7b4a258
2018-04-12 15:21:21 -07:00
Kweku Adams
1856a4cfcc Adding privacy tags to graphicsstats proto.
Creating a copy of the graphicsstats proto so that one can be tagged
with privacy annotations and the other can be used internally while
still using the protobuf-cpp-lite library.

Bug: 72570104
Test: flash device and check incident output
Merged-In: I2d72e7bd17689c1401a16d5a13956e6528ddb525
Change-Id: I0a46ee6cc463b133925be1cf8dee8cf3d107930c
2018-04-12 14:23:15 -07:00
Kweku Adams
228b6d2ab5 Adding privacy tags to graphicsstats proto.
Creating a copy of the graphicsstats proto so that one can be tagged
with privacy annotations and the other can be used internally while
still using the protobuf-cpp-lite library.

This is the same change as the pi-dev one (http://ag/3841646), but due
to changes in master, that change has a merge conflict, so I have to
create a separate CL for master.

Bug: 72570104
Test: it builds
Change-Id: I2d72e7bd17689c1401a16d5a13956e6528ddb525
2018-04-12 14:23:00 -07:00
John Reck
44627c264f So long OpenGLPipeline & OpenGLReadback (2/??)
Hello EglReadback

Test: hwuiunit & PixelCopyTests pass
Change-Id: I36a8cb45b11141b09e75a2e978ed13e336425625
2018-04-12 13:58:13 -07:00
John Reck
55665d499c Merge "Remove RenderPipelineType::OpenGL (1/many)" 2018-04-11 22:06:37 +00:00
John Reck
18f442eb2d Remove RenderPipelineType::OpenGL (1/many)
Just removes the define & all things referencing the define.

Test: hwui_unit passes
Change-Id: I3f98c271e23ef696c40addf260abdc0fb149a70d
2018-04-11 13:39:19 -07:00
John Reck
617673f83f Remove dead code
Remove an old protobuf serialization experiement, skp capture
does this better

Test: builds

Change-Id: Icd875eabee6b517729f901841e48e579d0e8de4d
2018-04-09 14:50:40 -07:00
Derek Sollenberger
0057db22fe Print detailed memory usage of Skia for dumpsys gfxinfo
Bug: 74435803
Test: adb shell dumpsys gfxinfo [package_name]
Change-Id: I1f2bcab500fb47c5e0b50c7459d4a876b063916b
2018-04-02 15:37:06 -04:00
Pirama Arumuga Nainar
b7913e1f8a Revert "Disable LTO temporarily for hwui"
Bug: http://b/62839002
Bug: http://b/74395273

Turn LTO back on for hwui.  The reason for the build breaks were stale profile files in ccache. We'll hold off on updating profile files until this can be fixed.  LTO can be turned back on in the mean time.

This reverts commit 7184e28b3a.

Change-Id: I051c39a44be6a85682393e7d6e78f49b30bb85e1
2018-03-09 00:04:43 +00:00
Pirama Arumuga Nainar
7184e28b3a Disable LTO temporarily for hwui
Bug: http://b/62839002

LTO does not seem to interact well with PGO profile-file updates and
incremental builds in the build servers.

Test: build
Change-Id: I42175b2376b374d00ec169d4fe8d84cd938b21e5
2018-03-07 23:24:02 -08:00
Zhizhou Yang
f30f112da0 Enable ThinLTO for hwui
ThinLTO will benefit hwui on both performance and code size.

Now that hwui is with PGO, ThinLTO provides 3.8% performance improvement
on top of it (tested using hwui benchmarks on marlin device).

Enabling ThinLTO also decreases current code size of libhwui.so by 3.2%.

To be mentioned, Thinlto property in bp file will go through all static
libraries that hwui depends on (such as libskia) and enable Thinlto for
them when building hwui.

Test: Build and run benchmarks with ThinLTO enabled.
Bug: http://b/62839002
Change-Id: I89466d50c3715f6e7b0518ff10240bf8a5e9714c
2018-03-01 11:21:30 -08:00
Tej Singh
bb8554afda Atom: DaveyOccurred
Atom for davey occurred

Test: cts test accompanying && statsd unit tests && hwui unit tests
Change-Id: I715ac213b09ef2b3ef1de75bc456a5edf7e0a244
2018-02-01 16:34:55 -08:00
Leon Scroggins III
5b7f426ff0 Use a separate thread to decode AnimatedImageDrawable
Bug: 63908092
Test: Manual: Ie18811ba29a1db163aca08472b04ae185e9344f0

Depends on https://skia-review.googlesource.com/#/c/skia/+/101544. That
change removes the Skia class's time checks, and leaving it up to the
client to keep track of the time. In this case, the client wants to keep
track of the time because it only wants to update while it is being
drawn. If it goes off screen (for example), it will just resume where it
left off when it returns on screen. This allows for smooth animations.

If an AnimatedImageDrawable is being drawn to a SkiaRecordingCanvas,
decode on the new (lazily-created) AnimatedImageThread.

When running, always decode one frame ahead on the AnimatedImageThread
so that it will be ready when it is time to display.

During prepareTree, update the time and check whether there is a new
frame ready to draw or the next frame needs to be decoded. In either
case, return true. The next frame to be decoded will be triggered by
onDraw.

Change-Id: If447976e9df417060a950f658dbca9cf7980dd02
2018-01-29 21:08:18 -05:00
Derek Sollenberger
2d14213849 Initial implmentation of AnimatedImageDrawables on the RenderThread.
The current implementation schedules the next frame of the images
to be decoded after the current frame completes but potentially
schedules tasks that will result in a no-op execution if a new
frame is not yet needed.

Test: HwAccelerationTest
Change-Id: I0510cb5a1b801abd651327e924deb586af0306d6
2018-01-24 13:11:39 +00:00
Zhizhou Yang
58e1b782be Turn on PGO for hwui
This patch is to turn on PGO for hwui. PGO for hwui was turned off for
now because skia, a very important dependency of hwui, was not compiled
with PGO at that time. This patch will be committed along with the patch
to turn on PGO for skia, so that we could get the best performance
improvement.

According to our test, turning on PGO for hwui only introduces an
performance improvement of 5.5%, while with skia PGO turned on, the
improvement increases to 7.6%, both on hwui benchmarks.

Bug: http://b/63768402
Test: None
Change-Id: I17af2cce8e7991aeb89d8bd14ef2e40e6d1049b6
2017-12-06 16:59:06 -08:00