Commit Graph

13 Commits

Author SHA1 Message Date
Greg Daniel
78b7ddc12e Couple fixes to HardwareBitmapUploader.
When we had to make a copy SkBitmap for an unsupported format, we
were dropping the color space information.

Added a null check in terminate.

Test: manual build and running on blueline
Change-Id: I3cf386231e76b7505a691d006585918d343f6c96
2019-03-27 12:52:43 -04:00
Greg Daniel
c073252f76 Add support for uploading to AHBs using Vulkan.
Test: manual build and testing on blueline.

Change-Id: I240a5f1e3ba34677b03131eba36ffd8783d99041
2019-03-19 10:09:53 -04: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
Leon Scroggins III
ee3bfe7681 Only decode to F16 if HARDWARE supports it
Bug: 123301974
Test: Infeasible

If a Bitmap is going to be decoded to F16 and then converted to
HARDWARE, only decode to F16 if HARDWARE supports it.

Previously, if we discovered after the decode that HARDWARE did not
support F16, we had to copy back to 8888 before the upload.

Change-Id: I3ceb9d053ba134bb96cfb9d638e54ac652e5db29
2019-01-31 10:38:26 -05:00
Derek Sollenberger
6e35e63740 Don't assume all FP16 bitmaps are linearly encoded.
The bitmap.create() function that does not take a colorspace does
not enforce that the bitmap is linearly encoded and as such it is
possible for us to end up with FP16 bitmaps that are sRGB encoded.

Given that we want to remove that restriction (see b/120870651)
we update getColorSpace to report the actual colorSpace of the
underlying bitmap. This pulls a thread that causes a chain of
updates to various classes to ensure proper handling of the native
colorspace.

Bug: 120904891
Test: CtsUiRenderingTestCases
Change-Id: I27780aa603138b0e48f9320c2837bc53e22cdf95
2019-01-23 16:31:52 -05:00
John Reck
6104cea3fb Fix leak/crash in exit
Bug: 120440607
Test: hwuimacro32 doesn't crash
Change-Id: I35b7a924e338efb314f07b923ba22ffcf98f75ee
2019-01-10 15:34:49 -08:00
Derek Sollenberger
e216948d63 Cleanup of Bitmap.h entry points.
All Bitmap constructors have been made private and the only way to
create one is through the allocate or createFrom factories.

SkColorSpace is now explicitly passed in to all the factories and is
no longer assumed to be sRGB.

Test: atest CtsGraphicsTestCases
Change-Id: I92c1c5c59df6de7fdd90e9504a2c2717cb854588
2018-12-18 14:20:24 -05:00
Chris Blume
7b8a808b7d Remove ; from closing namespaces in libs/hwui
When closing a namespace a } is sufficient. It doesn't need to be };
like closing a class or enum.

Within frameworks/base/libs/hwui there is a mix between } and }; when
closing a namespace. There are even mixes between a .h and the
corresponding .cpp files.

In a separate CL I was asked to not close with };. That was a good
comment. I adopted the style from nearby code. This CL cleans up the
nearby code.

Test: I made sure the code still built as expected.
Change-Id: Ieb314a4f48d6e33752463f3be4361fdc9be97482
2018-12-03 16:05:14 -08:00
TreeHugger Robot
a500ceab71 Merge "Implement WebView support for Vulkan using temporary buffer" 2018-09-18 23:46:33 +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
d1a491fdfa Fix silly mistake
Need to actually store to a local or the scope is lost -_-

Test: builds
Bug: 114220418

Change-Id: I372e9df11c3e3671af124b9f1c490f32abf8342c
2018-09-17 22:06:46 +00:00
John Reck
339cf9b327 More auto-dark stuff
Initial attempt at selective bitmap inverting
Use CIE_LAB colorspace for inverting instead of HSV

Test: Manually poking around
Change-Id: I014ff31eeae471ee7f6a40a6daa4e7099c2a7ff8
2018-07-19 15:58:39 -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