History log of /frameworks/base/libs/hwui/utils/TestWindowContext.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a0a74d5f8ee1dbd04772ffb1775d045ce6b5934b 13-Mar-2017 Mike Reed <reed@google.com> use _deprecated suffix for deprecated clipops

Allows skia to remove legacy flag for older names
- SK_SUPPORT_EXOTIC_CLIPOPS
- SK_SUPPORT_LEGACY_CLIPOP_EXOTIC_NAMES

Test: CtsGraphicsTestCases

Change-Id: I78478d94d059641a9381579cae6d28f9f0685ad1
/frameworks/base/libs/hwui/utils/TestWindowContext.cpp
89ddb1f1644e0b47de060d2c9aaf6d5387c38f2f 10-Feb-2017 Matt Sarett <msarett@google.com> Update framework to use new SkColorSpace API

Test: This compiles with SK_USE_LEGACY_NAMED_COLOR_SPACE
turned off.

Change-Id: Ie573f59e0aa475bab06b38589db3c6158ad82c5a
/frameworks/base/libs/hwui/utils/TestWindowContext.cpp
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/utils/TestWindowContext.cpp
66b9d4486abb9e6d1edc624cd9ff522b12acece0 16-Dec-2016 Chris Craik <ccraik@google.com> Revert "try to stop using exotic clipps"

This reverts commit 834653bcf80a3879c4d80004469053f205d45b69.

Change-Id: Ie8cb787490832a0be154ec1263313982157faa81
/frameworks/base/libs/hwui/utils/TestWindowContext.cpp
834653bcf80a3879c4d80004469053f205d45b69 14-Dec-2016 Mike Reed <reed@google.com> try to stop using exotic clipps

Change-Id: Id11d7744daa69c19fdc9b7723862b3d71ad21384
/frameworks/base/libs/hwui/utils/TestWindowContext.cpp
6c67f1d04591f44bccb476d715a005ad5bbdf840 14-Dec-2016 Mike Reed <reed@google.com> SkClipOp is now an enum class

Change-Id: If423dd013a264162ae0b7674a0eeef34bc2cdaae
/frameworks/base/libs/hwui/utils/TestWindowContext.cpp
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/utils/TestWindowContext.cpp
ab12c1fe73734a18ac19a06b97f276528f6d027a 03-Nov-2016 Mike Reed <reed@google.com> update callers to newer Skia APIs

Test: refactoring CL. Existing unit tests still pass.

Change-Id: I47e73e00f14f78dd9d4c48a142ac9853e7e4cad7
/frameworks/base/libs/hwui/utils/TestWindowContext.cpp
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/utils/TestWindowContext.cpp
5e00c7ce063116c11315639f0035aca8ad73e8cc 07-Jul-2016 Chris Craik <ccraik@google.com> Delete old rendering pipeline

fixes: 30002246

Change-Id: I45df0e924708526cee045b14c291bd23aa1a92db
/frameworks/base/libs/hwui/utils/TestWindowContext.cpp
ab1080c4d075b008cebdd9a2031ebbd51f9c2729 22-Jun-2016 John Reck <jreck@google.com> Delete unused args

Bug: 21170575
Change-Id: Icc832f70f206342557f44667ad3498405d04db78
/frameworks/base/libs/hwui/utils/TestWindowContext.cpp
d53e3bed1ca4a14b2a86d53eaef6969bd043176e 03-May-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings.

Bug: 28341362
Change-Id: I080090d50f1a368a4e7c1a0732297bb6a295e34f
/frameworks/base/libs/hwui/utils/TestWindowContext.cpp
4e2838ead6405acb407c072bdf01bc7b77c67680 08-Apr-2016 John Reck <jreck@google.com> Merge "Fix some edge cases" into nyc-dev am: 4a62eff
am: c01a9b6

* commit 'c01a9b6a9ba2662fafa6f4152ca9986faacd2d66':
Fix some edge cases

Change-Id: I52d65ed7c5da33b33a4f98953800c1dedea2bf09
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/utils/TestWindowContext.cpp
ed87fa2a2d7afe9e04c49c931c862dd3c550424c 19-Feb-2016 Ben Wagner <bungeman@google.com> Use android_memset32 instead of sk_memset32.

Android code should use the Android version. Also, Skia is interested
in making sk_memset32 private.

BUG:27290333

Change-Id: Id5c8bc190cdd21673c8844eaa48e8b6a93e2e9df
/frameworks/base/libs/hwui/utils/TestWindowContext.cpp
a3f16d43770e6740dd27210875964d91985efbd2 25-Jan-2016 Derek Sollenberger <djsollen@google.com> Replace SkALWAYSBREAK with equivalent Android macros.

Change-Id: Icb7786c789915375d7d8754fc8536302c1020858
/frameworks/base/libs/hwui/utils/TestWindowContext.cpp
3d5278b63862b337b8c7ef82ed18f1825e4b5c6b 14-Jan-2016 Derek Sollenberger <djsollen@google.com> Update TestWindowContext to work with new HWUI ops.

This enables HWUI to be testing within Skia's infrastructure and
fixes skia bug 4775.

Change-Id: I242b9e4c5ed0f4523b6075d8825a2624235a01c7
/frameworks/base/libs/hwui/utils/TestWindowContext.cpp
58862c9f6f33a9aa3602ca4a7ce49ac2a1fdc7c6 10-Dec-2015 Tom Hudson <tomhudson@google.com> Fix leak of file descriptors in test code

skia_dm rendering through HWUI was hanging after roughly 300 tests.
logcat reports some process was unable to get any file descriptors.

When we migrated TestWindowContext into HWUI and started using PIMPL
I didn't clean up the implementation struct in the destructor. Doing
so solved the hang for me.

My guess was that BufferQueue was being leaked, and that gralloc is
backed by file descriptors, but some research suggests that Android
ought to be able to handle far more than 1k fds (ulimit -Hn returns
4096 on this device).

R=djsollen@google.com

Change-Id: I2cd9f8945cee9b22f838002e1ad687d5fe29cb97
/frameworks/base/libs/hwui/utils/TestWindowContext.cpp
b2f5bd2d6043132d8c1d0f3e2e7e454c2693f499 15-Oct-2015 Tom Hudson <tomhudson@google.com> Remove direct dependency of external/skia on frameworks/native

Moves all code that needs to link with libgui or libui into
frameworks/native/hwui/utils/TestWindowContext. This allows us to
run Skia automated tests against a HWUI backend to watch for
performance or correctness regressions on Android.

BUG=23556017
TEST=After this change, we can remove libui and frameworks/native/include
from external/skia/Android.mk
R=djsollen@google.com

Change-Id: I6f02a5ff98101e448606a1e892686e2c648b6c8a
/frameworks/base/libs/hwui/utils/TestWindowContext.cpp