Several things are accomplished as part of this:
1. The canvas_state_lib build target is brought back so that we can
actually test the canvas state sharing across library boundaries.
2. The canvas state helper functions are updated to work with DLLs
(confirmed tests pass on Windows in cross library mode)
3. The tests now always run, and the cross-state define only changes
what version of the helper functions are used
4. Updated the dlopen code in the test to use the SkOSLibrary ports
instead of calling dlopen/dlclose directly.
5. Fix bugs in SkCanvasStateUtils that were uncovered as part of
always running these tests.
6. Switches the define away from SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
to SK_TEST_CANVAS_STATE_CROSS_LIBRARY, since these tests are not
strictly speaking testing the unclipped layer feature.
Change-Id: Id4ae41e4bc3fb8227367deac899878ecf9d7b98e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341003
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Current strategy: everything from the top
Things to look at first are the manual changes:
- added tools/rewrite_includes.py
- removed -Idirectives from BUILD.gn
- various compile.sh simplifications
- tweak tools/embed_resources.py
- update gn/find_headers.py to write paths from the top
- update gn/gn_to_bp.py SkUserConfig.h layout
so that #include "include/config/SkUserConfig.h" always
gets the header we want.
No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Refactor CanvasStateTest to pull out functions which can
either be called directly or from a shared library. Add a
command line flag to pass in the path to a library to open
to call those functions from.
Separate different CanvasTest tests into separate DEF_TEST
tests. This allows them to be run in parallel.
Move the ifdefs outside of function declarations to skip
running CanvasTest tests which do nothing.
Add the canvas_state_lib target. It is a shared library that
exports some functions to be called by another version of
Skia.
BUG=b/15693384
R=djsollen@google.com, reed@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/400043003