History log of /frameworks/base/libs/hwui/tests/common/TestUtils.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4f901c8cec76780264021167210f90dcbe6f0d03 13-Apr-2018 Stan Iliev <stani@google.com> Invoke create_recording_canvas correctly in macro bench tests

create_recording_canvas expects as a last parameter a render node,
which is used to reuse deallocated display lists. Passing the
render node improved performance in several tests and it is
matching how HWUI is using that API too.

bug: 69131471
Test: tvappGlTex DrawFrame is 1ms faster
Change-Id: I93d8da694c178d3fb8d1aa52afa76dd8271e93cb
/frameworks/base/libs/hwui/tests/common/TestUtils.h
1bcacfdcab0eaa0cee92bd7f5a1b5e271dd68e52 03-Nov-2017 John Reck <jreck@google.com> Format the world (or just HWUI)

Test: No code changes, just ran through clang-format
Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
/frameworks/base/libs/hwui/tests/common/TestUtils.h
f8441e65526cd1721f1ad77dad21b1a1e2743d76 23-Oct-2017 John Reck <jreck@google.com> Switch to a fancy new queue

Test: unit tests & benchmarks pass/faster

Change-Id: I9521432172d6dd6039c5280b1265479a36a86247
/frameworks/base/libs/hwui/tests/common/TestUtils.h
f51a80d2b074d1971b11b19e890c936af5aa57a3 12-Jul-2017 Leon Scroggins III <scroggo@google.com> Remove more references to kIndex_8

Test: Covered by existing tests. No actual change in behavior, since
kIndex_8 is not being used anyway.

Bug: 62483967

Change-Id: I317e3a814dbd102925fe412d2e19111b0af3af38
/frameworks/base/libs/hwui/tests/common/TestUtils.h
422098960166fb654ea42a624e1996e4054b5d71 28-Apr-2017 Derek Sollenberger <djsollen@google.com> Merge "Disable Vulkan backend when running hwui_unit_tests." into oc-dev am: f9dc09f4ea
am: 1c9c7b867c

Change-Id: I9550af0105210cdf24483f8dfe219833ff7812c8
0f89539de6df6ebe991ae29510e55867317389c0 27-Apr-2017 Derek Sollenberger <djsollen@google.com> Disable Vulkan backend when running hwui_unit_tests.

The Vulkan backend fails to run on devices without vulkan drivers.
Until we can stub out the vulkan drivers for those devices we find
an acceptable solution.

Test: hwui_unit_tests on device w/out vulkan
Bug: 37422708
Change-Id: I3d7c21882053459f25ca1eb5648cdf5dfd4c333e
/frameworks/base/libs/hwui/tests/common/TestUtils.h
25912c78f5a5ab71a7c5f11426f34f505e6dbb0d 31-Mar-2017 Stan Iliev <stani@google.com> Fix error in RenderNode unit test with Skia pipeline

Fix failing RenderNode unit tests with Skia pipeline, caused by
TestUtils::syncHierarchyPropertiesAndDisplayList not walking past
root node.

Test: ran HWUI unit tests.
bug: 32507847
Change-Id: I7e64fb02fd8f4874eadacafcac7e9f1ae4e56365
/frameworks/base/libs/hwui/tests/common/TestUtils.h
3afd63778e401651a7a6fd721d6d795690916ab8 30-Jan-2017 John Reck <jreck@google.com> Switch how destroyHardwareResources works

destroyHardwareResources will now only force-destroy
the specific node it was called on, which are only
ever the root nodes. Rely on onRemovedFromTree()
to clean up resources for all other nodes.

Bug: 34736819

Test: RenderNode.multiTreeValidity passes, manually
verified fixes b/34736819

Change-Id: I1c275ad6a98b63bf50f265602f09bffe3e1f169b
/frameworks/base/libs/hwui/tests/common/TestUtils.h
2de950d5a8b47c7b4648ada1b1260ce4b7342798 25-Jan-2017 John Reck <jreck@google.com> Overhaul RenderNode's DisplayList management

* Move mValid to native
* Have destroyHardwareResources destroy everything
* Remove flaky mParentCount checks in setStaging
* All tree updates have an internal observer to
ensure onRemovedFromTree() is a reliable signal
* onRemovedFromTree() immediately releases resources
to avoid displaylist "leaks"

Test: Unit tests for validity added & pass, manually
verified that b/34072929 doesn't repro

Bug: 34072929

Change-Id: I856534b4ed1b7f009fc4b7cd13209b97fa42a71c
/frameworks/base/libs/hwui/tests/common/TestUtils.h
98c78dad1969e2321cfee2085faa55d95bba7e29 04-Jan-2017 Greg Daniel <egdaniel@google.com> Update hwui_unit_tests to support running with Vulkan backend.

Added Macros for RENDERTHREAD_TESTS which run these tests using specific backends.
RENDERTHREAD_TESTS - Runs OpenGL, SkiaGL, and SkiaVulkan
RENDERTHREAD_SKIA_TESTS - Runs SkiaGL and SkiaVulkan
RENDERTHREAD_OPENGL_TESTS - Runs OpenGL

Test: manual running of hwui_unit_tests

Change-Id: Ia7420ee7a38803a15e2d58394d14b38cae8208d3
/frameworks/base/libs/hwui/tests/common/TestUtils.h
52771272f4f018f4fc6846224bf047497e784af1 17-Nov-2016 Stan Iliev <stani@google.com> 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
/frameworks/base/libs/hwui/tests/common/TestUtils.h
6e49c9f007c879f05b035c40c0ba543c00f9d0d0 02-Dec-2016 Mike Reed <reed@google.com> switch over clip calls to use SkClipOp instead of SkRegion::Op

Change-Id: I67d23c487b5249bc31d96e3b2393f693c0b2bcff
/frameworks/base/libs/hwui/tests/common/TestUtils.h
500a0c30d4dcd012218c3e44a62926a1c34a259f 26-Oct-2016 Stan Iliev <stani@google.com> Implement Skia pipelines for OpenGL and Vulkan.

Implement Skia pipelines for OpenGL and Vulkan:
base SkiaPipeline, SkiaOpenGLPipeline and SkiaVulkanPipeline.
Write unit tests for SkiaPipeline.

Test: Built and run manually on angler-eng.
Change-Id: Ie02583426cb3547541ad9bf91700602a6163ff58
/frameworks/base/libs/hwui/tests/common/TestUtils.h
021693b967a2c5556dddd183eb0247df4079e1ad 17-Oct-2016 Stan Iliev <stani@google.com> Implement SkiaRecordingCanvas, RenderNodeDrawable and other drawables.

Implement SkiaRecordingCanvas, RenderNodeDrawable, GLFunctorDrawable,
LayerDrawable, StartReorderBarrierDrawable, EndReorderBarrierDrawable.
Move AnimatedRoundRect and AnimatedCircle in a separate file.
All Skia pipeline files are moved in hwui/pipeline/skia folder.
Add unit tests for RenderNodeDrawable, StartReorderBarrierDrawable,
EndReorderBarrierDrawable and SkiaRecordingCanvas.

Test: I tested manually on 6P devices and did run the unit tests.
Change-Id: If2a347bd1fc4689953822294ce5bf98c7f3f57c7
/frameworks/base/libs/hwui/tests/common/TestUtils.h
835b3a69c345d2b58a0774daeb2e717a8a878059 28-Oct-2016 Derek Sollenberger <djsollen@google.com> Refactor mock Functors into a common TestUtils class.

Test: refactor. existing tests still pass
Change-Id: I55258487c371869a5b91dd2dcf6bf7bd47ac1a35
/frameworks/base/libs/hwui/tests/common/TestUtils.h
ec4a4b13eae2241d1613890c1c1c096bed891845 21-Oct-2016 sergeyv <sergeyv@google.com> Use Bitmap in DisplayList & RecordedOps instead of SkBitmap
Test: refactoring cl.
bug:32216791

Change-Id: I1d8a9a6e772e2176b6c2409409a910478b45f8db
/frameworks/base/libs/hwui/tests/common/TestUtils.h
fc9999505a36c66892d7ccce85187936105f4f36 17-Oct-2016 sergeyv <sergeyv@google.com> Pass Bitmap instead of SkBitmap for bitmap rect operation
Test: refactoring cl.
bug:32216791

Change-Id: I66d19194c57b3aa2c400aa87acffc774a533776a
/frameworks/base/libs/hwui/tests/common/TestUtils.h
aed7f58fb05a25ce2112829e77c0eb5dd268e8a7 15-Oct-2016 sergeyv <sergeyv@google.com> Pass Bitmap instead of SkBitmap in canvas.drawBitmap(Bitmap, float,float,Paint)
Test: refactoring cl.
bug:32216791

Change-Id: If9f9fbc19e683b14cce6c3c268258bd832d495d2
/frameworks/base/libs/hwui/tests/common/TestUtils.h
c1c54062f8cc9d47bdea820ae5ab6aef260b4488 20-Oct-2016 sergeyv <sergeyv@google.com> Rename hwui/PixelRef to hwui/Bitmap
Test: refactoring cl.
bug:32216791

Change-Id: I26de43f71027bccb43a5011f84080ab4631b2883
/frameworks/base/libs/hwui/tests/common/TestUtils.h
c36bd6c16ddfc160732ff7e4518564714c8aa66e 12-Oct-2016 sergeyv <sergeyv@google.com> Move allocatePixelRef methods to hwui.
This patch also makes tests to use SkBitmap backed by hwui/PixelRef,
Test: refactoring cl.
bug:27762775

Change-Id: Ib936e81877790849118420f5e565fc8f4466c1be
/frameworks/base/libs/hwui/tests/common/TestUtils.h
253f2c213f6ecda63b6872aee77bd30d5ec07c82 29-Sep-2016 Romain Guy <romainguy@google.com> Linear blending, step 1

NOTE: Linear blending is currently disabled in this CL as the
feature is still a work in progress

Android currently performs all blending (any kind of linear math
on colors really) on gamma-encoded colors. Since Android assumes
that the default color space is sRGB, all bitmaps and colors
are encoded with the sRGB Opto-Electronic Conversion Function
(OECF, which can be approximated with a power function). Since
the power curve is not linear, our linear math is incorrect.
The result is that we generate colors that tend to be too dark;
this affects blending but also anti-aliasing, gradients, blurs,
etc.

The solution is to convert gamma-encoded colors back to linear
space before doing any math on them, using the sRGB Electo-Optical
Conversion Function (EOCF). This is achieved in different
ways in different parts of the pipeline:

- Using hardware conversions when sampling from OpenGL textures
or writing into OpenGL frame buffers
- Using software conversion functions, to translate app-supplied
colors to and from sRGB
- Using Skia's color spaces

Any type of processing on colors must roughly ollow these steps:

[sRGB input]->EOCF->[linear data]->[processing]->OECF->[sRGB output]

For the sRGB color space, the conversion functions are defined as
follows:

OECF(linear) :=
linear <= 0.0031308 ? linear * 12.92 : (pow(linear, 1/2.4) * 1.055) - 0.055

EOCF(srgb) :=
srgb <= 0.04045 ? srgb / 12.92 : pow((srgb + 0.055) / 1.055, 2.4)

The EOCF is simply the reciprocal of the OECF.
While it is highly recommended to use the exact sRGB conversion
functions everywhere possible, it is sometimes useful or beneficial
to rely on approximations:

- pow(x,2.2) and pow(x,1/2.2)
- x^2 and sqrt(x)

The latter is particularly useful in fragment shaders (for instance
to apply dithering in sRGB space), especially if the sqrt() can be
replaced with an inversesqrt().

Here is a fairly exhaustive list of modifications implemented
in this CL:

- Set TARGET_ENABLE_LINEAR_BLENDING := false in BoardConfig.mk
to disable linear blending. This is only for GLES 2.0 GPUs
with no hardware sRGB support. This flag is currently assumed
to be false (see note above)
- sRGB writes are disabled when entering a functor (WebView).
This will need to be fixed at some point
- Skia bitmaps are created with the sRGB color space
- Bitmaps using a 565 config are expanded to 888
- Linear blending is disabled when entering a functor
- External textures are not properly sampled (see below)
- Gradients are interpolated in linear space
- Texture-based dithering was replaced with analytical dithering
- Dithering is done in the quantization color space, which is
why we must do EOCF(OECF(color)+dither)
- Text is now gamma corrected differently depending on the luminance
of the source pixel. The asumption is that a bright pixel will be
blended on a dark background and the other way around. The source
alpha is gamma corrected to thicken dark on bright and thin
bright on dark to match the intended design of fonts. This also
matches the behavior of popular design/drawing applications
- Removed the asset atlas. It did not contain anything useful and
could not be sampled in sRGB without a yet-to-be-defined GL
extension
- The last column of color matrices is converted to linear space
because its value are added to linear colors

Missing features:
- Resource qualifier?
- Regeneration of goldeng images for automated tests
- Handle alpha8/grey8 properly
- Disable sRGB write for layers with external textures

Test: Manual testing while work in progress
Bug: 29940137

Change-Id: I6a07b15ab49b554377cd33a36b6d9971a15e9a0b
/frameworks/base/libs/hwui/tests/common/TestUtils.h
25c9f6cede5705406294a5043363952c316facb2 01-Sep-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in libs/hwui." am: 7207562ff7 am: d7a69e04eb am: 842f1e48e7
am: 1f50f80aab

Change-Id: I713bd07fee150cc684e630045e02872b23062a5a
258e0e0f046803a638c4bf712d0ebec755897a4f 31-Aug-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix misc-macro-parentheses warnings in hwui/tests." am: e2732e5e38 am: e33f3472f3 am: 007c463e64
am: 4529b6300e

Change-Id: I8bd575002330360a3bb2fe06fc31d8d4e08e6e3e
a619ec70cf765d9166f0862e74653711b87307b3 29-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings in libs/hwui.

* Add explicit keyword to conversion constructors,
or add NOLINT for implicit converters.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Id8ca42433a4fc3652e4cb13787c4cb169f20d9a9
/frameworks/base/libs/hwui/tests/common/TestUtils.h
474081eee117025d343372f6cad99562914bc387 27-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix misc-macro-parentheses warnings in hwui/tests.

* Add parentheses around macro parameters.
Bug: 28705665

Test: build with WITH_TIDY=1
Change-Id: I04f6dd1a180ed1191bf68b685facf6fb9020b4b0
/frameworks/base/libs/hwui/tests/common/TestUtils.h
06152cdd06da50762716cd455dcf7ab0117f25b0 27-Jul-2016 Stan Iliev <stani@google.com> Use Canvas::create_recording_canvas instead of RecordingCanvas ctor

Modify HWUI tests to support different recording canvases. Delete
TestCanvas class and use base Canvas class instead. Use
Canvas::create_recording_canvas to create recording canvas instances
instead of RecordingCanvas constructor.

Change-Id: I651fb9bb4add0874d7110bac467a2eb1012357fc
/frameworks/base/libs/hwui/tests/common/TestUtils.h
5e00c7ce063116c11315639f0035aca8ad73e8cc 07-Jul-2016 Chris Craik <ccraik@google.com> Delete old rendering pipeline

fixes: 30002246

Change-Id: I45df0e924708526cee045b14c291bd23aa1a92db
/frameworks/base/libs/hwui/tests/common/TestUtils.h
37413289478a965336239c731ebfea37ac4dde28 13-May-2016 Chris Craik <ccraik@google.com> Fix hw layer overdraw/update visualization

Fixes: 28748255

Change-Id: I83b531cdf5e4407fd17edd72d96e6189924926fa
/frameworks/base/libs/hwui/tests/common/TestUtils.h
9cd1bbe5c9e14472e631d8cc10005613925f34af 15-Apr-2016 Chris Craik <ccraik@google.com> Improve multi-window render clipping logic

Fixes: 28125010

Restructures 'scene defer', to implement window backdrop overdraw
avoidance in new render pipeline, and disable clipping to content draw
bounds.

Also restructures FrameBuilder's constructors, to separate out into
multiple defer methods.

Change-Id: I53facb904c1a4a4acc493d8a489921a79a50494e
/frameworks/base/libs/hwui/tests/common/TestUtils.h
51f2d606dcbfba3cc5b03dfea37c1304b91c232f 06-Apr-2016 John Reck <jreck@google.com> Fix some edge cases

Bug: 27709981

This desperately needs a refactor, but to keep
the current (really needed & nice) behavior of
dispatching after sync finishes would be difficult
to handle cleanly without lots of ripping so... #yolo

Change-Id: I831a06c6ae7412a062720d68ecbe3085190f0258
/frameworks/base/libs/hwui/tests/common/TestUtils.h
44b49f070aafe8ad44efae87341121cce49ff11c 25-Mar-2016 John Reck <jreck@google.com> Add a callback for rendernode parentcount=0

Bug: 27709981
Fixes: 22565656

Change-Id: I1cb4461baf9069dc4e7ca6de10d5862578c107f4
/frameworks/base/libs/hwui/tests/common/TestUtils.h
243e85b2e443def1ef47a180e824b36f513c8db8 25-Mar-2016 Chris Craik <ccraik@google.com> Fix TextureLayer test

Fixes: 27823158

Change-Id: Ifed0d6119349662a23899935bfe5f3bacb361617
/frameworks/base/libs/hwui/tests/common/TestUtils.h
79abbf22d4f672208327546661e694d837f564a9 24-Mar-2016 Derek Sollenberger <djsollen@google.com> Update HWUI tests to use minikin to layout fonts.

This update is a precondition for landing additional tests
that depend on the minkin layout implementation.

bug: 27675371
Change-Id: I9bb98bae6b39462246e42cf8acb968b7df05292d
/frameworks/base/libs/hwui/tests/common/TestUtils.h
dccca44ffda4836b56a21da95a046c9708ffd49c 21-Mar-2016 sergeyv <sergeyv@google.com> Reland: Move text logic from jni to hwui level

Initial CL: https://googleplex-android-review.git.corp.google.com/#/c/886854/

Change-Id: I9dfd85fe1d2a2c44f4360c8a29fd58d80e6f31c8
/frameworks/base/libs/hwui/tests/common/TestUtils.h
afbd0f1fef46ef0ddf633dfde0de724db3da1405 21-Mar-2016 Sergei Vasilinetc <sergeyv@google.com> Revert "Move text logic from jni to hwui level"

This reverts commit a7f6bba1a3565c19715e878dfe7f0e01022944ff.

Change-Id: If4f36f87a85411b6128fd92d391313803ccaf9dd
/frameworks/base/libs/hwui/tests/common/TestUtils.h
a7f6bba1a3565c19715e878dfe7f0e01022944ff 16-Mar-2016 sergeyv <sergeyv@google.com> Move text logic from jni to hwui level

bug:25865834
Change-Id: I2d8c9c9544afcb5ce1784f732aed3e54e0eda372
/frameworks/base/libs/hwui/tests/common/TestUtils.h
dc87c52cd5645dd87380114462211574b63e6353 29-Feb-2016 John Reck <jreck@google.com> Add leak-checking to unit tests

Initial pass at leak-detection on the unit
tests. Due to quirks in jemalloc we need
to run the leak check on both the main thread
and the RT thread to get decent leak coverage.

Change-Id: I0dce754aef5593f1ef5c3bed86e1168437a34b74
/frameworks/base/libs/hwui/tests/common/TestUtils.h
e8c3c813b0e3ac98304b17a751ce6e436e252bd9 06-Feb-2016 Chris Craik <ccraik@google.com> Fix TextDropShadowCacheTests and glyph_t everywhere

Change-Id: I943eae4e9408c77bdfba6304ba7ee3e862351a41
/frameworks/base/libs/hwui/tests/common/TestUtils.h
7db5ffb7dbd30202468459e2ef4426e91d4fcbb3 15-Jan-2016 John Reck <jreck@google.com> Revert "Revert "Fix leak in unclipped save layer""

This reverts commit a6fc36d4cd7f27147fd304960acdd1d2f47fc1c6.

Change-Id: I6b96afe4a32dc894d5b17cfb870b45063257aed2
/frameworks/base/libs/hwui/tests/common/TestUtils.h
a6fc36d4cd7f27147fd304960acdd1d2f47fc1c6 15-Jan-2016 Daniel Chapin <chapin@google.com> Revert "Fix leak in unclipped save layer"

This reverts commit 8e068d5fd38dd103a122215fb6d185135182edf3.

Change-Id: Icd8ad5a2450db34aacecf748d6103df9faaa4c81
/frameworks/base/libs/hwui/tests/common/TestUtils.h
8e068d5fd38dd103a122215fb6d185135182edf3 15-Jan-2016 John Reck <jreck@google.com> Fix leak in unclipped save layer

Change-Id: I31f146af2cb6f5cb8dd19bb0feff0ae35b864eba
/frameworks/base/libs/hwui/tests/common/TestUtils.h
cbc5bd57f0f528743fce5ec02b0739dc6368311f 14-Jan-2016 John Reck <jreck@google.com> Merge "Track texture memory globally"
e5da4ef971258193cd1e89737a12b95b6ac244bb 14-Jan-2016 John Reck <jreck@google.com> Trap SIGABRT in RenderThread for unit tests

Change-Id: Icc1039543d975497808a8062e9d909537c4a29c9
/frameworks/base/libs/hwui/tests/common/TestUtils.h
38e0c32852e3b9d8ca4a9d3791577f52536419cb 10-Nov-2015 John Reck <jreck@google.com> Track texture memory globally

Also mostly consolidates texture creation

Change-Id: Ifea01303afda531dcec99b8fe2a0f64cf2f24420
/frameworks/base/libs/hwui/tests/common/TestUtils.h
7435eb148e72382126e9073183e881357bb38a8b 08-Jan-2016 Chris Craik <ccraik@google.com> Unclipped savelayer support in new renderer

bug:22480459

Change-Id: I89dd5de8d7d008a1e298d227d767aabff5c96e27
/frameworks/base/libs/hwui/tests/common/TestUtils.h
a2a70723b8cbda4354d23f901f995623e819012c 17-Dec-2015 Chris Craik <ccraik@google.com> Simplify ClipArea to prefer Rect args

Change-Id: I8af83d01dc5dd8009a0cd235dd8b59dab61d8560
/frameworks/base/libs/hwui/tests/common/TestUtils.h
d2dfd8f128b632ed99418ab2b32949c939a9a369 16-Dec-2015 Chris Craik <ccraik@google.com> Add TextureView support to new renderer/reorderer

bug:22480459

Change-Id: I2e4c0bc6b904706132f3f5087ededc9cac9b40fb
/frameworks/base/libs/hwui/tests/common/TestUtils.h
d7448e65e243754f31890baef29dff187dc2e5e5 15-Dec-2015 Chris Craik <ccraik@google.com> Add TextOnPath support to new reorderer/renderer

bug:22480459

Change-Id: I302048ec09901420c15003e21e44a551cc59c7ad
/frameworks/base/libs/hwui/tests/common/TestUtils.h
15c3f19a445b8df575911a16e8a6dba755a084b5 03-Dec-2015 Chris Craik <ccraik@google.com> Merged op dispatch in OpReorderer

bug:22480459

Also switches std::functions to function pointers on OpReorderer, and
switches AssetAtlas' entry getter methods to using pixelRef pointers,
so it's clear they're the keys.

Change-Id: I3040ce5ff4e178a8364e0fd7ab0876ada7d4de05
/frameworks/base/libs/hwui/tests/common/TestUtils.h
8160f20b0aca8c6595d4b385d673f59b6bcd16a4 02-Dec-2015 Chris Craik <ccraik@google.com> Reorganize hwui test directories

Now test-only common files reside in tests/common, and each test
executable type (macrobench, microbench, and unit) has a subdir there.

This change means the shared lib no longer has test code in it, and
sets up a means for scenes to be shared between tests.

Change-Id: I37b081f6977300e03fdd961b8e6439fde730605e
/frameworks/base/libs/hwui/tests/common/TestUtils.h