Also extend GN format presubmit check to .gni files.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3976
Change-Id: I292f3136437101e3e2c3271e260536ab7a24b192
Reviewed-on: https://skia-review.googlesource.com/3976
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This allows us to change the underlying pointer without rebuilding the pipeline, e.g. when moving the blitter from scanline to scanline.
The extra overhead when not needed is measurable but small, <2%. We can always add back direct stages later for cases where we know the context pointer will not change.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3943
Change-Id: I827d7e6e4e67d02dd2802610f898f98c5f36f8cb
Reviewed-on: https://skia-review.googlesource.com/3943
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3964
Change-Id: I782ef741838860bfeace13c335f9a82403047220
Reviewed-on: https://skia-review.googlesource.com/3964
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
This canaries the idea by converting gyp/pdf.gypi to gn/pdf.gni.
If this lands and rolls quietly, I'll flesh out the rest.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3972
Change-Id: Iecaf1ccce7891679904c585946272bfb25eea299
Reviewed-on: https://skia-review.googlesource.com/3972
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Most the calls to flushStencil were just trying to disable it. This
change cleans up that code so it can just call "disableStencil"
instead of having to muck with GrStencilSettings. It should also make
those calls slightly faster.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2453793002
Review-Url: https://codereview.chromium.org/2453793002
-Wrange-loop-analysis triggers when we use a new-style for loop in a way that appears to unintentionally call a copy constructor on each non-trivial loop element instead of operating on them by reference.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4000
Change-Id: If9e1b7fcc1f2789ae03c41c17abb17e60d564a8b
Reviewed-on: https://skia-review.googlesource.com/4000
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Pretty vanilla stuff here, mostly just making the gcc-like toolchain Windows friendly.
I was having trouble getting rm -r {{output}} && $ar rcs {{output}} @$rspfile to work without deleting my ar.exe, so I chickened out the usual way by adding gn/ar.py.
I've also updated bin/droid to work with Git Bash on Windows.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3751
Change-Id: I04c34ccc91e6a291c11ac4e7a7a0ffe41d879fe6
Reviewed-on: https://skia-review.googlesource.com/3751
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Many places that construct one are explicitly specifying opaque white or
transparent black, which we can assume (based on the semantics of the
operation) should remain (0,0,0,0) or (1,1,1,1), so that's simple.
In other cases, we convert our source color to destination space.
One wrinkle is tht SkColorFilter now needs to know the destination color
space, due to SkModeColorFilter.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3903
Change-Id: I4969c0260588f4021300733f601b47dc606adf79
Reviewed-on: https://skia-review.googlesource.com/3903
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This code was added with "Use a struct for client GL texture handles"
https://codereview.chromium.org/1429863009. This define no longer
appears to be set anywhere, so it and the code it guards can be removed.
Change-Id: I80bb2a77b1f076143851c1d112937221eff2111a
Reviewed-on: https://skia-review.googlesource.com/3902
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Speculative fix for skbug.com/5883
We are hitting an assert (which I have not been able to repro - still
need to get the skp that triggers it) because we are trying to read
beyond the end of the color table. We use 8-bit indices, so 256 should
be enough to prevent going beyond the end. There is only one case when
we use a smaller color table - when it is a dummy. Make the dummy full
size.
NOTREECHECKS=true
BUG=skia:5883
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2452673002
Review-Url: https://codereview.chromium.org/2452673002
I'm not yet caching these in the blitter, and speed is essentially unchanged in the bench where I am now building and compiling the pipeline only once. This may not be able to stay a simple std::function after I figure out caching, but for now it's a nice fit.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3911
Change-Id: I9545af589f73baf9f17cb4e6ace9a814c2478fe9
Reviewed-on: https://skia-review.googlesource.com/3911
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
The portable code now becomes entirely focused on enum+ptr descriptions, leaving the concrete implementation of the pipeline to SkOpts::run_pipeline().
As implemented, the concrete implementation is basically the same, with a little more type safety.
Speed is essentially unchanged on my laptop, and that's having run_pipeline() rebuild its concrete state every call. There's room for improvement there if we split this into a compile_pipeline() / run_pipeline() sort of thing, which is my next planned CL.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3920
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Change-Id: Ie4c554f51040426de7c5c144afa5d9d9d8938012
Reviewed-on: https://skia-review.googlesource.com/3920
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Change-Id: Ifb2a364df1a8817152a2c1e79748d14534a9e523
Reviewed-on: https://skia-review.googlesource.com/3904
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
Need to attach the sRGB color space to the surface to get past validation.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3905
Change-Id: Icce1c8cf35c31023c116cbcddf8848c4c92cd212
Reviewed-on: https://skia-review.googlesource.com/3905
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Allowing MSVS to choose to not inline color_xform_RGBA
will prevent the complexity from exploding.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3884
Change-Id: I31ab0754c6cc375d6d0e71ceb16afef1927bb4e3
Reviewed-on: https://skia-review.googlesource.com/3884
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
Prior to this CL, a kAnimated_Mode CodecSrc (which draws a strip of
all frames in an image) has the same name as a non-animated one. This
means that Gold compares the two. Someone triaging will see two very
different images (a strip versus a single image) and think one of them
is wrong.
With this change, the two will have different names so they will not
be compared with one another.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2446543003
Review-Url: https://codereview.chromium.org/2446543003
Now that we're declaring flags statically per-tool, we were only
setting the value on one of them (randomly) in the linked list.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3881
Change-Id: I448cb7f42ee01a16daa65986b14aee9f1a2a3588
Reviewed-on: https://skia-review.googlesource.com/3881
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
This also removes SK_HAS_GIF_LIBRARY since it does not appear in the
code.
Change-Id: I6e4d6ed560eb2877e6db61edf15f6be832166b44
Reviewed-on: https://skia-review.googlesource.com/3752
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Two reasons for this:
(1) We care about the performance of this code, and Windows isn't
very good at inlining. Let's make sure we isntruct the compiler
to inline.
(2) Since landing uses of this in Chrome, we're seeing flaky
LayoutTests that appear to be timing related. I'm (very
optimistically) hoping that this will help.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3744
Change-Id: Ibb6d9c4252c0b8ce62203fe65c7dd296248982c8
Reviewed-on: https://skia-review.googlesource.com/3744
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This is essential for representing non-lutAtoBType A2B tags such as
lut16Type, lut8Type, mpet. Parsing of A2B0 tags was also moved ahead
of the TRC/XYZ-matrix parsing, as profiles examined with both tags
either had the TRC/XYZ tags as a fall-back or were incorrectly displayed
if only the TRC/XYZ tags were used.
This was submitted alone to reduce CL size. Tests that will use these changes will be introduced in the subsequent CLs that add on lut8/16Type A2B0 parsing. We already have lut16Type test images and these have been tested locally, but require additional code not submitted yet for lut16Type ICC profile parsing and A2B colorspace xforms.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2444553002
Review-Url: https://codereview.chromium.org/2444553002
This doesn't print a backtrace, but it's better than nothing.
By preserving the original signal handler and calling into that, we keep the Android system stack trace, visible in logcat, the "dump log" step on bots.
Tested locally on Mac and Android by making an arbitrary GM segfault.
BUG=skia:5876
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3860
Change-Id: Ia7a962ca50e09d370423a6106033e34c47d7643d
Reviewed-on: https://skia-review.googlesource.com/3860
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
There appear to be no existing overriders of the refAs.. method outside
Skia.
Change-Id: Iab174e83023093b4d7fc0bd8907666b66ddb1eea
Reviewed-on: https://skia-review.googlesource.com/3746
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>