(1) Draw triangles onto a D50 color gamut so they are
actually in the correct place.
(2) Add options to display canonical sRGB and Adobe RGB
gamuts.
(3) Label the R, G, and B points of the color gamut.
(4) Decode and reencode the input image without color
correction, so we can compare to the corrected version.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2017153002
Review-Url: https://codereview.chromium.org/2017153002
- remove dead code
- rewrite float -> int converters
The strategy for the new converters is:
- convert input to double
- floor/ceil/round in double space
- pin that double to [SK_MinS32, SK_MaxS32]
- truncate that double to int32_t
This simpler strategy does not work:
- floor/ceil/round in float space
- pin that float to [SK_MinS32, SK_MaxS32]
- truncate that float to int32_t
SK_MinS32 and SK_MaxS32 are not representable as floats:
they round to the nearest float, ±2^31, which makes the
pin insufficient for floats near SK_MinS32 (-2^31+1) or
SK_MaxS32 (+2^31-1).
float only has 24 bits of precision, and we need 31.
double can represent all integers up to 50-something bits.
An alternative is to pin in float to ±2147483520, the last
exactly representable float before SK_MaxS32 (127 too small).
Our tests test that we round as floor(x+0.5), which can
return different numbers than round(x) for negative x.
So this CL explicitly uses floor(x+0.5).
I've updated the tests with ±inf and ±NaN, and tried to
make them a little clearer, especially using SK_MinS32
instead of -SK_MaxS32.
I have not timed anything here. I have never seen any of these
methods in a profile.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2012333003
Review-Url: https://codereview.chromium.org/2012333003
In order for this code to run, the gDefaultProfileIsSRGB flag needs to be true.
min base min exp percent name
5601856 4689911 0.837207 top25desk_espn.skp_1
3491515 3202806 0.917311 top25desk_facebook.skp_1
5110247 4865740 0.952154 top25desk_weather_com.skp_1
605445 585520 0.96709 top25desk_techcrunch_com.skp_1
1007151 986193 0.979191 top25desk_wikipedia__1_tab_.skp_1
5951286 5889979 0.989699 top25desk_sports_yahoo_com_.skp_1
2825583 2804853 0.992663 top25desk_plus_google_com_11003.skp_1
8839265 8823249 0.998188 top25desk_twitter.skp_1
4169125 4168882 0.999942 top25desk_docs___1_open_documen.skp_1
6615327 6620663 1.00081 top25desk_youtube_com.skp_1
4613903 4647583 1.0073 top25desk_wordpress.skp_1
2532280 2554154 1.00864 top25desk_ebay_com.skp_1
4015689 4063584 1.01193 top25desk_google_com__hl_en_q_b.skp_1
9427478 9579203 1.01609 top25desk_answers_yahoo_com.skp_1
7403901 7542770 1.01876 top25desk_booking_com.skp_1
12249953 12528353 1.02273 top25desk_google_com_search_q_c.skp_1
1078648 1111050 1.03004 top25desk_games_yahoo_com.skp_1
7232627 7481555 1.03442 top25desk_pinterest.skp_1
2996819 3112091 1.03846 top25desk_google_com_calendar_.skp_1
2181531 2271677 1.04132 top25desk_amazon_com.skp_1
925245 987545 1.06733 top25desk_blogger.skp_1
4143359 4442607 1.07222 top25desk_linkedin.skp_1
4370962 4744580 1.08548 top25desk_news_yahoo_com.skp_1
4284025 4735094 1.10529 top25desk_mail_google_com_mail_.skp_1
[mtklein] We measured the noise here to be [-5%, +8%], so most of these changes fall within the noise. We manually confirmed the two above that noise window (yahoo and mail) are also noise... srcover_srgb_srgb() did not figure prominently in their profiles. The espn and facebook improvements look real.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1996683003
Review-Url: https://codereview.chromium.org/1996683003
This fix is a tradeoff. It changes intersection to
treat a case where one coincident run is intersected at one point
and the other edge is not as continuing to be a span.
The old code tried to treat this as a single point.
The old code is probably right, but this change alone
made the data structures inconsistent. Later, extending
the coincident runs would fail by incorrectly discarding
the single point intersection.
As a result, this fixes the security test and one other, but
makes a different test fail. Isolating the failure uncovered
a reduced case that fails with and without the change, so
there are more serious problems here. Those problems are
addressed in a separate CL.
Many of the test edits below remove ill-thought out debugging
messaging that fire off global state, which isn't usable
in a multi-threaded test environment.
In the end, with this fix, all existing tests (modulo one
new failure and one new non-failure) pass in debug and
in the extended release test suites.
TBR=reed@google.com
BUG=614248
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2018513003
Review-Url: https://codereview.chromium.org/2018513003
The reasoning here is that resources with a unique key are never selected from fScratchMap and just clog up the search for an available resource.
This knocks a 200x loop over the SVGbouncingrects case from 264ms down to 164ms.
BUG=603969
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2008083002
Review-Url: https://codereview.chromium.org/2008083002
This flips the default build mode to create a static libskia.
To create a shared libskia, pass -DBUILD_SHARED_LIBS=1 when running cmake.
BUG=skia:5341
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2009503002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
Review-Url: https://codereview.chromium.org/2009503002
Update SK_IMAGE_VERSION to 7. This removes the following files from
dm testing:
lg_g4_iso_800.dng
Fuji_X20.dng
These DNG images are very large, and cause us to use a lot of memory in
testing. Moreover, they do not test anything that is not covered by
HTC.dng
In addition, use the smaller version of HTC.dng (which is already in
use in dm) in nanobench.
BUG=skia:5307
BUG=skia:5283
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2007033002
Review-Url: https://codereview.chromium.org/2007033002
This will allow me to test and visualize some assumptions
on parsing and applying color profiles. Also, it should
help me find and fix bugs.
This is certainly not an optimized implementation, and, as
far as I know, it doesn't take any shortcuts to improve
performance. We'll probably want to do both of these
once we know where it fits in the pipeline.
Right now this test is only run on an arbitrary set of ~100
images from the top 10k skps. I'll continue to add more
"interesting" images and probably tweak the code as
necessary.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1995233003
Review-Url: https://codereview.chromium.org/1995233003