3798 Commits

Author SHA1 Message Date
John Reck
5f3ed9b7de Merge "Fix a use-of-uninitialized-value warning." am: 95ef9ec5b1
am: 44e14d0d2b

Change-Id: I5e5243c75f446d46bb81252583cfa46e47d60309
2017-01-11 01:21:30 +00:00
John Reck
95ef9ec5b1 Merge "Fix a use-of-uninitialized-value warning." 2017-01-11 00:57:35 +00:00
George Burgess IV
a483173c78 Fix a use-of-uninitialized-value warning.
This warning was generated by the static analyzer:
warning: The left expression of the compound assignment is an
uninitialized value. The computed value will also be garbage
        *mDirtyMask |= animator->dirtyMask();

This can be fixed by initializing dirtyMask before using it in
AnimateFunctor.

Bug: None
Test: Static analyzer no longer complains about this.
Change-Id: I892749079cf93a012f1bed059a3f0c8bbaed9d7e
2017-01-10 15:33:57 -08:00
Greg Daniel
45ec62ba72 Add support for dummy draws for Vulkan webview and texture views.
Test: manual testing
Change-Id: Iaec8c3a34367673c281665ff6c6e97d1ce532265
2017-01-10 15:54:14 -05: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
John Reck
cfc07d4b2b Merge "Support EGL_KHR_partial_update without EGL_EXT_buffer_age" am: f66126c828 am: 620d4c24de
am: 43818c45a4

Change-Id: Ia093688d4c9fc2e923daf5da6d5b6d67c6b56975
2017-01-10 00:49:35 +00:00
John Reck
43818c45a4 Merge "Support EGL_KHR_partial_update without EGL_EXT_buffer_age" am: f66126c828
am: 620d4c24de

Change-Id: I4fdb8ecba5a08f712871d3b99e0286c61f6d0806
2017-01-10 00:44:29 +00:00
John Reck
1deac99c55 Support EGL_KHR_partial_update without EGL_EXT_buffer_age
Bug: 31334677
Test: manual && hwuimacro --onscreen partialdamage

Change-Id: I9b346b4053ec12c8a78a143a4dc0e708c44888a2
2017-01-09 14:35:37 -08:00
Mark Salyzyn
52eb4e01a4 Replace cutils/log.h and log/logger.h with log/log.h
Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I578b15b48f0fc2807a92abbc69a377c3d2191496
2017-01-09 14:31:34 -08:00
Derek Sollenberger
c543713bab Merge "Remove clipRegion from the public API." 2017-01-09 18:01:50 +00:00
Stan Iliev
770e0b5007 Implement image draw functions in SkiaCanvasProxy
Implement onDrawImage, onDrawImageRect and onDrawImageLattice in
SkiaCanvasProxy. This allows to replay SkPicture with HWUI pipeline.
This CL is needed to keep up with other changes in SkiaRecordingCanvas,
because Canvas::drawBitmap is translated to SkCanvas::drawImage.

Test: Built and ran angler-userdebug, ran HWUI unit tests.
Change-Id: Icd6cfd3bc51628a2c336faf4c95dfd5366a949a9
2017-01-05 16:53:14 -05:00
Derek Sollenberger
b29b16e542 Remove clipRegion from the public API.
This API is difficult to support for printing and has other negative
effects as it does not respect the current matrix/clip.

Test: compile
Bug: 14650725
Change-Id: I71f9bd687d446c7ce8910d755421aad8e09458db
2017-01-04 14:57:43 -05:00
Sergei Vasilinetc
8b6fe1d894 Merge "Support Bitmap.copy for hardware bitmaps" 2016-12-19 18:41:21 +00:00
sergeyv
05126d151e Support Bitmap.copy for hardware bitmaps
Test: android.uirendering.cts.testclasses.HardwareBitmapTests#testBitmapConfig*
bug:30999911
Change-Id: I2e80dff914bfa0666290701072ac93d30d218e8d
2016-12-16 17:46:10 -08:00
Stan Iliev
b66b8bb4a0 Ensure root render node clip cannot expand beyond dirty area
Use new Skia API to enfore clip restriction for root render node.
This brings Skia pipeline in line with HWUI. Unit test is
updated to reflect the new behaviour.

Test: Built and ran angler-eng, ran HWUI unit tests.

Change-Id: Iffce70fd37b6aff45eb6a23c8b1a64f45b5f1463
2016-12-16 14:42:33 -05:00
TreeHugger Robot
6df179cd73 Merge "Revert "try to stop using exotic clipps"" 2016-12-16 19:28:49 +00:00
Chris Craik
66b9d4486a Revert "try to stop using exotic clipps"
This reverts commit 834653bcf80a3879c4d80004469053f205d45b69.

Change-Id: Ie8cb787490832a0be154ec1263313982157faa81
2016-12-16 17:49:48 +00: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
TreeHugger Robot
e59dc4124a Merge "try to stop using exotic clipps" 2016-12-16 15:49:47 +00:00
TreeHugger Robot
984c73ba73 Merge "Modify savelayer to save matrix and clip for Skia pipeline" 2016-12-16 00:01:06 +00:00
John Reck
4c80f87820 Merge "HWUI: prepare script for marlin & sailfish Test: this is a bench infrastucture" 2016-12-15 23:37:22 +00:00
TreeHugger Robot
711911bb95 Merge "Actually fix pixelcopy for 90/180/270 rotation" 2016-12-15 21:47:58 +00:00
Stan Iliev
68885e38b8 Modify savelayer to save matrix and clip for Skia pipeline
Modify SkiaCanvas::saveLayer to always save matrix and clip and
match HWUI behaviour. Also ensure android state tracking
behavior matches that of the Skia API (partial saves not
supported). This change is fixing SaveLayerAnimation
macrobench when buffer age is disabled.
Add a HWUI unit test that verifies clip and matrix are restored.

Test: built and ran angler-eng, ran hwui unit tests
bug:33429678
Change-Id: I62e429f9746518fef67663b0dd99ac499bf31af3
2016-12-15 16:47:34 -05:00
Mike Reed
834653bcf8 try to stop using exotic clipps
Change-Id: Id11d7744daa69c19fdc9b7723862b3d71ad21384
2016-12-15 16:01:42 -05: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
Stan Iliev
ed4d58cc33 Fix failing SkiaPipeline unit tests
Fix SkiaPipeline unit tests failure, caused by double deallocation
of SkCanvas in DeferLayer.

Test: build and ran angler-eng, ran HWUI unit tests.
Change-Id: I4a0a0113588e40a8ed32093d57efc6af3c0d7745
2016-12-15 09:52:15 -05:00
Colin Cross
0a2afc5061 Move hwui private headers to frameworks/base/libs/hwui/private am: 19def9943a am: 174d150673 am: 6b629b7f38
am: 904b4077ca

Change-Id: I2de0fa2990aab71b1afdc46bce63830c8b3ec904
2016-12-15 07:45:37 +00:00
Colin Cross
904b4077ca Move hwui private headers to frameworks/base/libs/hwui/private am: 19def9943a am: 174d150673
am: 6b629b7f38

Change-Id: Ic62fcf3d48ad58c1dec0fc6ddf3eaacc8140cc18
2016-12-15 07:30:25 +00:00
Colin Cross
6b629b7f38 Move hwui private headers to frameworks/base/libs/hwui/private am: 19def9943a
am: 174d150673

Change-Id: I0d97c3bc96c0beebc5988e4dca22ba4d5d1f982c
2016-12-15 07:16:31 +00:00
sergeyv
91d6354cde HWUI: fix support RGB_565 for hardware bitmaps
Test: hwuimacro hwBitmap565
bug:30999911
Change-Id: Ie4128aba95a92041b7388c46d0b2109feaae302a
2016-12-14 16:34:55 -08:00
Colin Cross
19def9943a Move hwui private headers to frameworks/base/libs/hwui/private
hwui already exports most of its headers, move its private headers
into its source directory.

Bug: 33630870
Test: m -j native
Change-Id: I4968d5aaaa68d9e92c826841d20f29cef349c9d8
2016-12-14 13:35:40 -08:00
TreeHugger Robot
94b5c92a35 Merge "SkClipOp is now an enum class" 2016-12-14 18:29:58 +00:00
John Reck
713d153146 Merge "Delete dead code" 2016-12-14 17:16:44 +00:00
Mike Reed
6c67f1d045 SkClipOp is now an enum class
Change-Id: If423dd013a264162ae0b7674a0eeef34bc2cdaae
2016-12-14 10:29:54 -05:00
Sergei Vasilinetc
68a9dd8c88 Merge "HWUI: set correct sampler for external texture in shaders" 2016-12-13 23:19:47 +00:00
sergeyv
9c97e48fbe HWUI: set correct sampler for external texture in shaders
Test: hwuimacro hwbitmapcompositeshader
bug:30999911
Change-Id: Ic63f7109a4a7069b62c0b21efae2d4ba7e6d64be
2016-12-13 12:59:12 -08:00
TreeHugger Robot
fb1bc8bc97 Merge "SkCanvas is no longer refcnted, use SkClipOps" 2016-12-13 20:49:05 +00:00
Romain Guy
a247df0426 Merge "Pre-multiply gradient colors the right way" 2016-12-13 18:24:36 +00:00
Mike Reed
d43eaa9090 SkCanvas is no longer refcnted, use SkClipOps
Change-Id: I57469f56187f1ca8624e7a63968124ee925b4c04
2016-12-13 12:32:37 -05:00
Leon Scroggins III
ee708facf1 Remove unnecessary dependency, and fix the chain
Test: No new tests. This should not affect behavior; only dependencies.

Font.h does not need to include SkGlyphCache.h, and doing so requires
a transitive dependency on external/skia/src/utils, which was not
intended. Forward declare it instead, and fix the build errors that
resulted.

Change-Id: Ifd09430bb848d51b139df0f0c06c63e7e48711eb
2016-12-13 08:27:19 -05:00
Romain Guy
a0ed6f03f6 Pre-multiply gradient colors the right way
Alpha pre-multiplication must be done after applying the
opto-electronic transfer function when linear blending is
disabled. The correct way would be to pre-multiply before
gamma encoding but this leads to improper blending which
cannot be corrected without using sRGB frame buffers and
texture sampling.

Bug: 33010587
Test: cts-tradefed run singleCommand cts-dev --module CtsUiRenderingTestCases --test android.uirendering.cts.testclasses.GradientTests
Change-Id: I5f04bda4cb9f63674537aef5931621c14d601884
2016-12-12 18:50:07 -08:00
TreeHugger Robot
7a7c921e18 Merge "Add more Skia pipeline unit tests." 2016-12-12 20:59:45 +00:00
Stan Iliev
52771272f4 Add more Skia pipeline unit tests.
Add more Skia pipeline unit tests and fix an issue
in backdrop/content bounds clip logic.

Test: built and run angler-eng and HWUI unit tests.
Change-Id: Ie41f80ff7ce9802a4d76e8b14f1695dbc9771a2b
2016-12-12 14:13:16 -05:00
TreeHugger Robot
8600928705 Merge "Make HWUI makefile include external/skia/src/utils" 2016-12-12 17:35:46 +00:00
Leon Scroggins III
82c581dac3 Make HWUI makefile include external/skia/src/utils
Test: none. No new code; this just makes it explicit that HWUI is
depending on headers in Skia's src/utils directory.

This is needed for SkTextureCompressor.h, which itself is pulled in
transitively through SkGlyphCache.h. Adding this here means that Skia
need not list src/utils as an exported include dir.

Change-Id: I3f2b022504486b7a640236fb98a497b599b42a6b
2016-12-12 16:15:49 +00:00
John Reck
03240107a5 Delete dead code
Test: none, it's unused code
Change-Id: If25f4f22d8f3a9819f673bacce9ad4c213dd73ed
2016-12-09 22:04:53 +00:00
John Reck
ce44045d85 Merge "Fix window copy for rotation = 90/270" 2016-12-09 22:04:36 +00:00
Greg Daniel
cd55852fcd Make buffer age work in Vulkan
Test: manual testing in skiavk mode

Change-Id: I5b9d8af7d9cecf2f022ef104ec33a5b7477e9e0c
2016-12-09 15:45:15 +00: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
Mike Reed
9a648a1c74 Merge "switch over clip calls to use SkClipOp instead of SkRegion::Op" 2016-12-07 20:54:59 +00:00