Commit Graph

18 Commits

Author SHA1 Message Date
John Reck
1bcacfdcab Format the world (or just HWUI)
Test: No code changes, just ran through clang-format
Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
2017-11-03 10:57:44 -07:00
Romain Guy
8472ac67fd Fix PixelCopyTest failure in CTS
This feature needs support for renderable float textures, but the checks
were only guaranteeing support for float texture reads.

Bug: 68754504
Test: CtsViewTestCases

Change-Id: I0ce4a81cb8e09c10a5f1e65234685767a24ef8c4
2017-11-01 13:06:54 -07:00
TreeHugger Robot
a6aafa33ec Merge "Speculative fix for missing target crash" into oc-mr1-dev 2017-09-22 22:41:59 +00:00
Chris Craik
89cd62c8f3 Speculative fix for missing target crash
Bug: 66451158
Test: manual app usage

Change-Id: I2db3aa73edcb80da25ead64205011705f0beef91
2017-09-22 10:00:14 -07:00
Arun
530a2b44d9 Disable hwui blending for first draw to main FBO
bug:34809371

In some applications, the first draw is not opaque - either because the
application is misbehaved, or because hwui is not able to reliably tell
whether the layer is opaque or translucent. This is undefined behaviour
in OpenGL ES and has a significant performance and bandwidth impact on
some tiler GPUs as it requires loading the previous frame's color data.
This change disables blending in that case and also for effectively
opaque blend modes (SRC=GL_ONE, DST=GL_ZERO). It increases performance
by ~10% for Leanback CTS on some low-end GPUs (gradient layer that hwui
incorrectly believes to be translucent).

Test: manual - visual inspection on fugu (nexus player)

Change-Id: I2cbf1c76678acae1a36923e72fd18ed55cd89dc2
2017-08-18 16:52:55 -07:00
Stan Iliev
df6520efd7 Fix Skia pipeline readback for non-portrait mode
Apply correctly the image transform matrix passed to
SkiaOpenGLReadback::copyImageInto.
This is fixing 13 of 14 failing android.view.cts.PixelCopyTest
tests (the last failing test is caused by missing wide gamut
support).

Test: Ran CtsViewTestCases CTS tests for Skia and HWUI pipelines.
Bug: 63629735
Change-Id: I67fb06968e21f9aa88973c076870b5557f15d483
2017-07-18 17:25:55 -04:00
John Reck
abbedfc84f Add missing notifyPixelsChanged
Fixes: 63400947
Test: CTS test PixelCopyTest#testReuseBitmap
Change-Id: Iad6fe331f84415528c1858a1fdbf26bce784cd53
2017-07-06 23:01:39 +00:00
John Reck
dfce81961d Merge "Selectively disable filtering if estimated safe" into oc-dev
am: 38c97237e3

Change-Id: Ic3be7167429e8cd6a291ac0465e883522afcf9e3
2017-06-29 02:13:18 +00:00
John Reck
7bf96a0a6f Selectively disable filtering if estimated safe
If the output matches the source rect then use
GL_NEAREST instead of GL_FILTER. This is a more
pixel-exact capture.

Bug: 38242146
Test: CtsUiRendering & CtsViewTestCases:.PixelCopyTest passes on fugu
Change-Id: I9f57a4124374568f83d45fdc8f83cc767ded888a
2017-06-28 18:13:19 +00:00
Romain Guy
88e060f881 Add support for RGBA_F16 readbacks
WCG windows render into RGBA16F surfaces, we need to give the readback
API the ability to read the raw source data for testing.

Bug: 62728191
Test: CtsViewTestCases
Change-Id: I93ead84207dab38fba02d4419b5ae18df9555f8e
2017-06-16 18:07:54 -07:00
Mathias Agopian
3d7d5f999f fix circular dependency libnativewindow <-> libui
Bug: 37647680, 37648355
Test: compile, manual
Change-Id: I00d72d063c252739ca5a63dbf84424ad4f837f89
2017-05-09 16:40:50 -07:00
Mike Reed
7c0ae0f58b bitmaps and pixelrefs no longer need lock/unlock
Test: covered by CtsGraphicsTestCases and hwui_unit_tests

Change-Id: I42a25961a2eb3755d2fd22a617aa21a24ec0994f
2017-04-18 10:22:42 -04:00
Greg Daniel
8cd3edfa15 Break Layer class into Gl and Vulkan subclasses
Test: manual testing
Change-Id: Ibd2beed39de3ac6da7448e96496253cfe427dfbb
2017-01-10 15:05:07 -05:00
Romain Guy
9505a65527 Add new RGBA_F16 bitmap config
This configuration uses 64 bits per pixel. Heach component is stored as a
half precision float value (16 bits). Half floats can be decoded/encoded
using android.util.Half.

RGBA_F16 bitmaps are used to decode wide-gamut images stored in 16 bit
formats (PNG 16 bit for instance). aapt is currently not aware of PNG
16 bits so such files must be placed in raw/ resource directories.

This first pass provides only partial drawing support with hardware
acceleration. RGBA_F16 bitmaps are stored in linear space and need
to be encoded to gamma space with the appropriate OETF to be rendered
properly on Android's current surfaces. They are however suitable for
linear blending. Full rendering support will be provided in a future
CL (BitmapShaders might be a bit tricky to handle properly during
shader generation).

Bug: 32984164
Test: bit CtsGraphicsTestCases:android.graphics.cts.BitmapRGBAF16Test

Change-Id: I328e6b567441a1b9d152a3e7be944a2cf63193bd
2016-12-16 09:15:07 -08:00
John Reck
eb418edae4 Actually fix pixelcopy for 90/180/270 rotation
Bug: 33421965
Test: PixelCopyTest testWindow* CTS tests
Change-Id: I1b49b3643c5d030c3d2de95de4a0ce3a4ff0111d
2016-12-15 10:26:33 -08:00
John Reck
912bebeb74 Fix window copy for rotation = 90/270
Bug: 33421965
Test: Manual via PixelCopyWindow test in HwAccelerationTest
Change-Id: I2a59fd6a26499635a22444e124cd1ec6f82f6e31
2016-12-08 11:22:31 -08:00
sergeyv
59eecb526a Support readback from hardware bitmaps
Test: hwuimacro readbackFromHBitmap --onscreen.
bug:30999911
Change-Id: I369c069c40cb0f9adae5a94501815f29c2d7df0f
2016-11-18 10:49:27 -08:00
Derek Sollenberger
c4fbada76a Support Surface and Layer Readback in the SkiaPipelines.
Test: CTS TextureViewTests and UIRendering
Change-Id: I2969c8f5a975bfd9aebcbb585c64d1fcbb2487c2
2016-11-16 13:30:00 -05:00