Commit Graph

9751 Commits

Author SHA1 Message Date
John Reck
4b2de2ff17 Merge "Don't run comparisons on non-jank frames" am: 903dad812e am: 4007dd103f
am: 21013eebd7

Change-Id: Idf00d170ac8f1ab7a9c378c281b02ab5aa767ee1
2018-09-19 18:44:23 -07:00
John Reck
21013eebd7 Merge "Don't run comparisons on non-jank frames" am: 903dad812e
am: 4007dd103f

Change-Id: I175e245bd2ced35505a2295f4037c6d9c932f056
2018-09-19 18:34:59 -07:00
John Reck
4007dd103f Merge "Don't run comparisons on non-jank frames"
am: 903dad812e

Change-Id: I7cbca9acb9f14149868f18af8970d5324d51e260
2018-09-19 18:21:47 -07:00
Treehugger Robot
903dad812e Merge "Don't run comparisons on non-jank frames" 2018-09-19 23:28:55 +00:00
TreeHugger Robot
f22e05e5e5 Merge "use custom Parcel format to pull data" 2018-09-19 17:45:11 +00:00
TreeHugger Robot
a500ceab71 Merge "Implement WebView support for Vulkan using temporary buffer" 2018-09-18 23:46:33 +00:00
Chenjie Yu
12e5e6755f use custom Parcel format to pull data
When statsd pulls data from StatsCompanionService, the data is put into
log_msg format on java side and expanded into LogEvent on cpp side.
There is a lot of dependency on log_msg and liblog to add new types.
There is pending bug to rewrite thta part of the code in statsd to
completely rid the legacy of logd and liblog. But that may not happen
soon.

Now we can support new storage type.
Also no need to specify number of fields in StatsLogEventWrapper cstr,
which is a source of bug in P.

Bug: 115775035
Test: manual test and cts test
Change-Id: Id1f0b033885da6f3bcebe043968061821db48f35
2018-09-18 16:29:52 -07: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
TreeHugger Robot
b3b8d16d6a Merge "Fix silly mistake" 2018-09-18 20:27:13 +00:00
Derek Sollenberger
17662389b9 Refactor DeviceInfo in HWUI
Remove the need for both Vulkan and EGL managers to initialize
it. Also remove unused code paths.

Test: hwui_unit_tests
Change-Id: I33ad881468eddbf91ec63207f0d82bed8d97f5ad
2018-09-18 09:30:13 -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
0ee549d67b Merge "Disable GLES validation" 2018-09-15 00:31:22 +00: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
John Reck
50be3b8378 Don't run comparisons on non-jank frames
Unclear why mSwapDeadline doesn't already
account for this, but the handling of vsync
phase offsets may be throwing things off a bit.

For now just do the simple fix.

Bug: 109894489
Test: builds, patch was verified by reporter
Change-Id: I5a6f25ceac4986d366293fe7b5e3af64a326114c
2018-09-14 11:25:58 -07:00
Peiyong Lin
13bfadb562 Merge "[HWUI] Implement legacy color mode." 2018-09-13 23:54:08 +00:00
Peiyong Lin
1f6aa122a5 [HWUI] Implement legacy color mode.
Previously, HWUI always produces SRGB buffers. We introduced new APIs for
SurfaceFlinger, a.k.a. the composer service to return to composition preference
for data space, and pixel format. This patch makes HWUI query composition
preference from composer service, and creates the corresponding EGL surface
with the correct attributes.

In legacy mode, HWUI will take the pixel value from source color space, and
interpret it as pixel value in destination color space.

BUG: 111436479
BUG: 113530681
Test: Build, flash, boot and check dumpsys SurfaceFlinger
Change-Id: I64562d5ea6f653076c8b448feb56b5e0624bc81c
2018-09-13 13:50:27 -07:00
Stan Iliev
dcedc99ba9 DO NOT MERGE: Use GL_LINEAR filter when drawing scaled TextureView
am: 93ac4012f2

Change-Id: I969216b071ab42b9fa14ce3cfcd2b99a3ecc002c
2018-09-13 02:34:50 -07:00
Mårten Kongstad
2bb42051f0 Merge "ByteBucketArray.h: fix typo" am: b848ce8e20 am: 0bb76346f5
am: 50bec961b3

Change-Id: I1ff25b8a7ff8385646ef128ae41e9794b6313cf8
2018-09-12 17:41:10 -07:00
Mårten Kongstad
0bb76346f5 Merge "ByteBucketArray.h: fix typo"
am: b848ce8e20

Change-Id: I81aff763f5572b6c72e1a845fda518179cf95e15
2018-09-12 16:57:17 -07:00
Treehugger Robot
b848ce8e20 Merge "ByteBucketArray.h: fix typo" 2018-09-12 22:26:22 +00:00
Stan Iliev
93ac4012f2 DO NOT MERGE: Use GL_LINEAR filter when drawing scaled TextureView
Use GL_LINEAR instead of GL_NEAREST sampling, when drawing
a TextureView, which has a buffer size that does not match
layer size.
Scale SkImage to layer size with a matrix, instead of
passing wrong size to MakeFromTexture.
This CL must not be merged in master, becase this issue has
been fixed already by ag/4936023.

Bug: 114324288
Test: Passed CtsViewTestCases and CtsUiRenderingTestCases
Test: Ran apps using scaled TextureView including Instagram
Change-Id: I9ee659d08998c932d8b708a64f3c879ab696fd9e
2018-09-11 20:45:23 +00:00
Mårten Kongstad
cb54cd2dac ByteBucketArray.h: fix typo
Bug: 78815803
Test: builds, boots
Change-Id: I93d7ce5255911797d6afdb05caf0cf7dbfdc22b9
2018-09-11 14:24:40 +02: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
Mike Reed
61066649e6 use unique_ptr version of MakeFromStream
Test: make

Change-Id: I30cad3e78cc7359ccd10b6041d6371d7e2da5623
2018-09-05 17:08:23 -04:00
TreeHugger Robot
8019cb8898 Merge "Refactor String8 to std::string calls" 2018-09-05 17:35:38 +00:00
Chia-I Wu
c803806efb Merge "Fix widecg and hdr ordering in Configuration" 2018-09-05 17:24:56 +00: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
Chia-I Wu
0d8acf5a96 Fix widecg and hdr ordering in Configuration
Wide Gamut qualifier should be before the HDR one.

Bug: 78136980
Test: am get-config
Change-Id: If0f09ddb750d586d29b4cedcbab3d5981f393b92
2018-08-31 17:18:36 +00:00
TreeHugger Robot
bb66334058 Merge "Update the initialize list for DisplayInfo" 2018-08-30 19:08:10 +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
Greg Kaiser
5dda003e68 RecordingCanvas: Avoid accessing moved variable
We explicitly use the "image" class member, instead of the function
parameter, since we've already used move() on the function
parameter.

Test: TreeHugger
Change-Id: I631517ca7cbf7cc59f75f8a66b125be4ee391944
2018-08-30 06:45:03 -07: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
TreeHugger Robot
54b9892f3c Merge "TextureView Vulkan support and optimized OpenGL draw" 2018-08-29 15:51:15 +00: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
Stan Iliev
cccd03859c Don't apply filter in readback, when there is no scaling
Fix check for scaling in SkiaOpenGLReadback: old code was not
taking into account that matrix rotation swaps width/height.

Test: Passed PixelCopyTest#testWindowProducerCopyToRGBA16F
Bug: 110097060
Bug: 111776948
Change-Id: I0d26416fa72a026bc376417773d5a73548b1f1a5
Merged-In: I0d26416fa72a026bc376417773d5a73548b1f1a5
(cherry picked from commit d50edd004b)
(cherry picked from commit ee7b63aa646c937e326ac5f39f07f724020533bb)
2018-08-29 15:03:08 +08:00
Stan Iliev
421449a4a6 Fix TextureView.getBitmap with scale layer transform
Fix TextureView.getBitmap to capture content only from the layer.

Bug: 111401911
Test: A new test TextureViewTest.testTransformScale is passing
Change-Id: I2b9cee17fc48de7b12ed03d5b4f173ce5445dbfe
Merged-In: I2b9cee17fc48de7b12ed03d5b4f173ce5445dbfe
(cherry-picked from ff129aefe2)
(cherry picked from commit 9675537555913a6aa7c25a71a6b854a083e22ede)
2018-08-29 14:54:53 +08:00
Mike Reed
d19d39425c onDrawTextOnPath is deprecated (not called)
Test: build

Change-Id: I28a4886ba011d35de323c75b49c1377aeb09548a
2018-08-28 15:59:22 -04:00
Sudheer Shanka
25469aacb8 Remove DefaultContainerService usage in StorageManagerService.
StorageManagerService uses DefaultContainerService to obtain ObbInfo
for files passed through mountObb() transaction. This change moves this
logic to client side and so ObbInfo will be passed as part of mountObb()
transaction.

Bug: 111838160
Test: atest src/android/os/storage/cts/StorageManagerTest.java
Test: atest core/tests/coretests/src/android/os/storage/StorageManagerIntegrationTest.java
Test: atest services/tests/servicestests/src/com/android/server/MountServiceTests.java
Change-Id: I29aee3aa54a45057df96aae289888161a3e3af71
2018-08-27 15:50:59 -07:00
Greg Kaiser
f15c333ddc Merge changes Ie072511b,I6424f90c am: 9d10637e01 am: ddedd24e96
am: 57d7cabbf5

Change-Id: Ic92512281269ceedbbfb197e1d7d0a230bf2317f
2018-08-24 15:54:32 -07:00
Greg Kaiser
ddedd24e96 Merge changes Ie072511b,I6424f90c
am: 9d10637e01

Change-Id: I06ca7319633534e38b45ab960f285a072cff84da
2018-08-24 15:38:07 -07:00
Ryan Mitchell
b9b540baf1 AFW: Lookup shared library resource ids
Shared libraries were failing to retrieve correct resource ids from the
values of attributes in xml files. The packages of the shared ids were
not changed from 0 to their runtime assigned package ids.

Bug: 112776204
Test: atest FieldsClassificationTest#testGetAlgorithm
Change-Id: I509bc7632f5ec3e9b644e590934e6cf569a4d938
2018-08-24 10:11:01 -07:00
Greg Kaiser
174b50fa50 TreeInfo: Make ~ErrorHandler() virtual
ErrorHandler has a pure virtual function, so we also make its
destructor virtual, to assure any children classes will get
properly destructed.

Test: TreeHugger
Change-Id: Ie072511b450d507f8764b0888d232ffac8f6d6f5
2018-08-24 06:10:18 -07:00
Yiwei Zhang
2c2bfc33f0 Update the initialize list for DisplayInfo
Bug: b/113041831
Test: build
Change-Id: I2a6468e55137834c9215ca9410b00e2dbba6ee87
2018-08-23 17:24:55 -07:00
Greg Kaiser
a95435b836 RenderThread: Make ~IFrameCallback() virtual
IFrameCallback has a pure virtual method, but its destructor was
non-virtual.  While CanvasContext, which inherits from
IFrameCallback, declares its own destructor virtual, this is not
sufficient when accessing via an IFrameCallback pointer.

We fix this by making the base destructor virtual.

Test: Treehugger
Change-Id: I6424f90c16caea417b5f80b60d76a7ca7c7ef97c
2018-08-23 17:07:56 -07:00
Anton Hansson
47ee291898 Merge "androidfw changes to support /product-services." 2018-08-22 13:58:00 +00:00