Commit Graph

23911 Commits

Author SHA1 Message Date
halcanary
c966ef9f07 SkMultiSKP: version 2
Measurable size improvement.

BUG=skia:5370

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255333003

Review-Url: https://codereview.chromium.org/2255333003
2016-08-23 09:15:04 -07:00
halcanary
afdc177e77 SkPDF: PDFDevice cleanup.
Remove unused fContentSize.

Combine SkPDFDevice::writeContent and SkPDFDevice::content.

Remove unused SkPDFDevice::initialTransform().

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2264113003

Review-Url: https://codereview.chromium.org/2264113003
2016-08-23 09:02:12 -07:00
mtklein
a2d2f38600 f16<->f32 ftz is an optional thing for speed.
The ARMv8 asm path actually does it right... that should be okay.

My Nexus 5x fails `dm -m _finite_ftz` before this and passes after it.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2276533002

TBR=msarett@google.com

Review-Url: https://codereview.chromium.org/2276533002
2016-08-23 08:58:12 -07:00
vjiaoblack
a97a1ab571 Moving SkBlurImageFilter into core
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003

Committed: https://skia.googlesource.com/skia/+/dd3259eb95c3b47e11eefa3b176365a112a32b48
Committed: https://skia.googlesource.com/skia/+/e426babe7552b1cb4e27cdf4e90826feabb9e3b0
Committed: https://skia.googlesource.com/skia/+/4d760175686df8f61a11b66946eb307d89dd2c75
Review-Url: https://codereview.chromium.org/2255803003
2016-08-23 07:50:52 -07:00
caryclark
bb51f4a3a7 fix pathops fuzz
Extreme cubics may split so that one half is a point.
Discard this rather than generating a degenerate line.

TBR=reed@google.com
BUG=640025
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2276503002

Review-Url: https://codereview.chromium.org/2276503002
2016-08-23 07:38:49 -07:00
mtklein
eb3c425f1b GN: make libwebp an optional dependency
This will be handy for folks who don't have libwebp, like Fuchsia.

I convinced myself that this is done right by:
  - building in all three modes (default and explicitly set both ways);
  - looking at verbose Ninja logs to see the presence/lack of SK_HAS_WEBP_LIBRARY;
  - running dm -m Codec, which passes with libwebp and segfault without it.

If this is viable, I intend to make all third-party dependencies optional
and follow this pattern.  :skia should link and degrade gracefully without
any of //third_party.  It's okay for tools to have hard third-party
dependencies; we just need them to get past the `gn gen` stage without them.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2270693004

Review-Url: https://codereview.chromium.org/2270693004
2016-08-23 07:38:09 -07:00
csmartdalton
7535f419e2 Reduce window rectangles cap to 8
Lowers the cap to 8 and adds a warning message if this value is ever
exceeded. The largest (only) implementation currently supports 8, so
there isn't yet reason to go higher.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2254013002

Committed: https://skia.googlesource.com/skia/+/52d721580ee22525c285e2d13cf3975a7a1b2843
Review-Url: https://codereview.chromium.org/2254013002
2016-08-23 06:51:00 -07:00
robertphillips
5eca3e187e Cleanup use of legacy SkSurface creation methods a bit
This CL cleans up some remaining uses of the old API

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2223023002

Committed: https://skia.googlesource.com/skia/+/f21cd16228c20927fa4e9b937d6951471cfaa37a
Review-Url: https://codereview.chromium.org/2223023002
2016-08-23 06:39:35 -07:00
robertphillips
08197b2265 Fix valgrind issue in CircleBatch__Test
TBR=bsalomon@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2271653002

Review-Url: https://codereview.chromium.org/2271653002
2016-08-23 06:19:15 -07:00
martina.kollarova
d01c7d09e9 Remove file samplecode/SampleDraw.cpp
The file is not used in any build target and seems dead, i.e. failed to compile when I added it to
the SampleApp target.

BUG=None
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2269583002

Review-Url: https://codereview.chromium.org/2269583002
2016-08-23 00:17:42 -07:00
robertphillips
6cfb106002 Fix Ganesh analytic blurred rect draws
This CL does two things:
 It fixes the SkBlurMaskFilterImpl::directFilterRRectMaskGPU draw path to explicitly handle rects
 It fixes the SkGpuDevice::drawTextureProducerImpl draw path to provide the correct (src & device space) inputs to directFilterRRectMaskGPU.

How this was working before was that GrRRectBlurEffect::Make would reject rect-rrects and the code would fallback to
GrBlurUtils::drawPathWithMaskFilter which mapped the rect-rrect into device space correctly (of course,
the rect-ness of the path was removed at that point so it was going through the slow path).

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2268583002

Review-Url: https://codereview.chromium.org/2268583002
2016-08-22 16:13:48 -07:00
bsalomon
0515593064 Fix GLSL int to float error in arc code in GrOvalRenderer.
BUG=skia:
TBR=robertphillips@google.com
NOTRY=true
NOTREECHECKS=true

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2263213004

Review-Url: https://codereview.chromium.org/2263213004
2016-08-22 15:17:48 -07:00
msarett
4ff08df15a More robust check for sRGB gamma tables
This is in response to a UMA showing that 5% dst gammas are
unidentified tables.  We want to see if some of these tables
should be marked as sRGB.
https://uma.googleplex.com/p/chrome/histograms?endDate=latest&dayCount=1&histograms=Blink.ColorSpace.Destination&fixupData=true&showMax=true&filters=isofficial%2Ceq%2CTrue&implicitFilters=isofficial

This check is not fast.  If we find that it doesn't help
us recognize sRGB curves, we should delete it.

BUG=skia:5656
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2263233003

Review-Url: https://codereview.chromium.org/2263233003
2016-08-22 14:58:56 -07:00
bsalomon
dcb406c29d Remove virtual from overrides in SkGpuDevice.h
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2265323002

Review-Url: https://codereview.chromium.org/2265323002
2016-08-22 14:48:36 -07:00
bsalomon
cadf75a8a4 Fix CircleBatch::TestCreate to always use a legal matrix
TBR=robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2267953002

NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2267953002
2016-08-22 14:24:24 -07:00
bsalomon
bdc335f9b9 Mark temporary paths created by SkCanvas for clipping as volatile
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2268723002

Review-Url: https://codereview.chromium.org/2268723002
2016-08-22 13:42:17 -07:00
liyuqian
236e272380 Remove vulkan from most build variants
Since many devices don't support vulkan, we have to remove it for most
build variants and only turn it on manually by selecting arm64vulkan
build variant.

BUG=skia:5516
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255973003

Review-Url: https://codereview.chromium.org/2255973003
2016-08-22 13:36:57 -07:00
mtklein
8ae991e433 Flush denorm half floats to zero.
I think we convinced ourselves that denorms, while a good chunk of half floats,
cover a rather small fraction of the representable range, which is always
close enough to zero to flush.

This makes both paths of the conversion to or from float considerably simpler.

These functions now work for zero-or-normal half floats (excluding infinite, NaN).
I'm not aware of a term for this class so I've called them "ordinary".

A handful of GMs and SKPs draw differently in --config f16, but all imperceptibly.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2256023002

Review-Url: https://codereview.chromium.org/2256023002
2016-08-22 13:20:18 -07:00
bsalomon
4f3a0ca85d GPU implementation of drawArc.
This adds analytic shaders for filled arcs and butt-cap stroked arcs where the center point is not used.

BUG=skia:5227
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2259323003

Review-Url: https://codereview.chromium.org/2259323003
2016-08-22 13:14:26 -07:00
bsalomon
4c261d0c1e Add cap type variations to circular arcs GMs
BUG=skia:5227
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2269723002

Review-Url: https://codereview.chromium.org/2269723002
2016-08-22 13:10:46 -07:00
reed
4d2cce442d check for wide-open inside quickContains
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2263373002

Review-Url: https://codereview.chromium.org/2263373002
2016-08-22 13:03:47 -07:00
msarett
d331742d27 Fix MSAN - mark temporary memory as kNo_ZeroInitialized
TBR=mtklein@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2261173004

Review-Url: https://codereview.chromium.org/2261173004
2016-08-22 13:00:05 -07:00
rmistry
674b925227 Add trooper documentation for CT bots and for iOS "the service is invalid"
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2263103003
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=2263103003

Review-Url: https://codereview.chromium.org/2263103003
2016-08-22 12:54:54 -07:00
msarett
d9015a43cf Fix Equals and serialization for rare pngs
PNGs may contain a gAMA chunk that specifies gamma
values as floats.  If so, we will use these floats
to create an SkColorSpace.

This CL fixes Equals(), serialize(), and
Deserialize() to correctly handle SkColorSpaces
with strange gammas, where we are unable to fall
back on the profile data.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221983002

Review-Url: https://codereview.chromium.org/2221983002
2016-08-22 12:29:32 -07:00
vjiaoblack
a90dcf791b Revert of Moving SkBlurImageFilter into core (patchset #8 id:140001 of https://codereview.chromium.org/2255803003/ )
Reason for revert:
Misnamed function.

Original issue's description:
> Moving SkBlurImageFilter into core
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003
>
> Committed: https://skia.googlesource.com/skia/+/dd3259eb95c3b47e11eefa3b176365a112a32b48
> Committed: https://skia.googlesource.com/skia/+/e426babe7552b1cb4e27cdf4e90826feabb9e3b0
> Committed: https://skia.googlesource.com/skia/+/4d760175686df8f61a11b66946eb307d89dd2c75

TBR=reed@google.com,fmalita@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2265263002
2016-08-22 12:04:41 -07:00
vjiaoblack
4d76017568 Moving SkBlurImageFilter into core
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003

Committed: https://skia.googlesource.com/skia/+/dd3259eb95c3b47e11eefa3b176365a112a32b48
Committed: https://skia.googlesource.com/skia/+/e426babe7552b1cb4e27cdf4e90826feabb9e3b0
Review-Url: https://codereview.chromium.org/2255803003
2016-08-22 12:00:25 -07:00
robertphillips
3a0c3696f0 Remove quantization of device-space dest rect for Ganesh analytic rrect blurs
At least on Windows, this fixes a lot of the horrible banded blurs. AFAICT there is no good reason to quantize the device space rect passed to the GrRectBlurEffect.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2262263002

Review-Url: https://codereview.chromium.org/2262263002
2016-08-22 11:48:44 -07:00
bsalomon
6bf233176f Mark temp paths in SkBaseDevice::drawArc and ::drawDRRect as volatile
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2261123004

Review-Url: https://codereview.chromium.org/2261123004
2016-08-22 11:46:35 -07:00
liyuqian
23d24587ee Fix touch event parameter order
The issue is so obvious... However, all newer Android devices (e.g.,
Nexus 6P, 5X, 9) are immune to this bug. So I didn't notice this until I
tested Viewer app on Nexus 7 yesterday...

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2254223002

Review-Url: https://codereview.chromium.org/2254223002
2016-08-22 11:31:09 -07:00
vjiaoblack
7b145120f2 Revert of Moving SkBlurImageFilter into core (patchset #8 id:140001 of https://codereview.chromium.org/2255803003/ )
Reason for revert:
Fixed it wrong, needs to revert to re-discuss and re-land.

Original issue's description:
> Moving SkBlurImageFilter into core
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003
>
> Committed: https://skia.googlesource.com/skia/+/dd3259eb95c3b47e11eefa3b176365a112a32b48
> Committed: https://skia.googlesource.com/skia/+/e426babe7552b1cb4e27cdf4e90826feabb9e3b0

TBR=reed@google.com,fmalita@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2266063002
2016-08-22 11:30:40 -07:00
vjiaoblack
e426babe75 Moving SkBlurImageFilter into core
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003

Committed: https://skia.googlesource.com/skia/+/dd3259eb95c3b47e11eefa3b176365a112a32b48
Review-Url: https://codereview.chromium.org/2255803003
2016-08-22 10:51:27 -07:00
bsalomon
ac1d0abfd8 Add stroke-and-fill circular arc test, test near 180deg arc in all circular_arc_tests
BUG=skia:5227
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2261233002

Review-Url: https://codereview.chromium.org/2261233002
2016-08-22 10:00:14 -07:00
msarett
0f0c4f0902 Detect all named gammas
Our DstColorSpace UMA is showing some named gammas that are
not appropriately detected and placed in named categories.
https://uma.googleplex.com/p/chrome/histograms?endDate=latest&dayCount=1&histograms=Blink.ColorSpace.Destination&fixupData=true&showMax=true&filters=isofficial%2Ceq%2CTrue&implicitFilters=isofficial

This CL should fix that.

I'm not sure (yet) how I feel about this landing permanently.
Seems a little messy.

But it will be interesting to see how this affects the UMA.
My best guess is that we are hitting this case when all
three gammas are "invalid" in different ways.  I'm expecting
to see some profiles end up in the "invalid" category now.

It's also possible that we'll see these cases being absorbed
into sRGB or somewhere else.

BUG=skia:5656
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2261213002

Review-Url: https://codereview.chromium.org/2261213002
2016-08-22 09:44:35 -07:00
mtklein
a61b6d4f9e compress_r11eac_blocks() required more alignment than dst has.
This shouldn't change any behavior except that the stores to dst
will no longer require 8-byte alignment.

Empirically it seems like we can use 4-byte alignment here,
but u8 (i.e. 1-byte alignment) is always safe.

BUG=skia:5637
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2264103002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2264103002
2016-08-22 09:30:54 -07:00
mtklein
2ec417257b Revert of Moving SkBlurImageFilter into core (patchset #6 id:100001 of https://codereview.chromium.org/2255803003/ )
Reason for revert:
It looks like this breaks our roll into Google3:
https://test.corp.google.com/ui#id=OCL:130943857:BASE:130944046:1471881622765:61dbdd3

Original issue's description:
> Moving SkBlurImageFilter into core
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003
>
> Committed: https://skia.googlesource.com/skia/+/dd3259eb95c3b47e11eefa3b176365a112a32b48

TBR=reed@google.com,fmalita@chromium.org,vjiaoblack@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2263283002
2016-08-22 09:25:59 -07:00
mtklein
78559a78f9 Use ARMv8 CRC32 instructions for SkOpts::hash().
For large inputs, this runs ~11x faster than Murmur3.
My bench drops from 1µs to 88ns.

Like x86-64, this runs fastest if we work in 24 byte chunks.  16 byte chunks
run at about 0.75x this speed, 8 byte chunks at about 0.4x (which would still
be about 5x faster than Murmur3).

This'll require plumbing support for opts_crc32 into Chrome first before it can roll.

perf.skia.org charts we want to watch: https://perf.skia.org/#5490

Seach for compute_hash in these logs to see the difference:
baseline: https://luci-milo.appspot.com/swarming/task/30ba22f3dfe30e10/steps/nanobench/0/stdout
trybot: https://luci-milo.appspot.com/swarming/task/30bbc406cbf62d10/steps/nanobench/0/stdout

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2260823002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2260823002
2016-08-22 08:53:45 -07:00
vjiaoblack
dd3259eb95 Moving SkBlurImageFilter into core
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003

Review-Url: https://codereview.chromium.org/2255803003
2016-08-22 08:50:20 -07:00
msarett
dcd5e65340 Support color xforms for kIndex8 pngs
This change started as: "Always use color xforms to
premultiply".  We need to be in a linear space to
premultiply correctly.

It became clear that we also need to support kIndex8
color xforms in order to make this change.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246143002

Review-Url: https://codereview.chromium.org/2246143002
2016-08-22 08:48:40 -07:00
reed
c0c6e1c5d1 'g' key toggles showgrid for PerlinPatch
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2269673002

TBR=

Review-Url: https://codereview.chromium.org/2269673002
2016-08-22 08:45:16 -07:00
brianosman
7fd64e7e67 Supply a color space in sRGB/F16 mode of SampleApp
Ganesh now uses this to decide if it should perform gamma-correct
rendering, so the color space is necessary to get correct results in
S32/F16.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2266763004

Review-Url: https://codereview.chromium.org/2266763004
2016-08-22 08:23:09 -07:00
rmistry
88bba1618c Roll recipe DEPS
BUG=skia:5627
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2266933002

Review-Url: https://codereview.chromium.org/2266933002
2016-08-22 08:01:28 -07:00
reed
ccebcec4ac 'F' will toggle filtering for the --picture sample
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2263203002

TBR=

Review-Url: https://codereview.chromium.org/2263203002
2016-08-22 07:41:46 -07:00
msarett
35bb74b444 Fix color xform width bug when scaling/subsetting
This was not caught by the bots because we don't test
color correct modes with our many image decoding tests
(takes too long).

Adding a unit test.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2247743002

Review-Url: https://codereview.chromium.org/2247743002
2016-08-22 07:41:28 -07:00
borenet
a629166d6e Build command buffer with is_component_build=false
BUG=skia:5630
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2265913002

Review-Url: https://codereview.chromium.org/2265913002
2016-08-22 07:31:43 -07:00
bsalomon
36da771226 Adjust angles in circular arcs GMs to test smaller arcs
BUG=skia:5227
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2267713002

Review-Url: https://codereview.chromium.org/2267713002
2016-08-22 07:26:08 -07:00
reed
a39667c848 add SkMatrixPriv for specialized helpers
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2268443002

Review-Url: https://codereview.chromium.org/2268443002
2016-08-22 06:39:49 -07:00
mtklein
0a8efd7355 GN: _turbo -> -turbo to match Fuchsia
We might as well match the folks who are using our GN files now.

We've got plenty of strategies in our pocket for when we try to move Chrome
onto our GN files (and who knows, there may be even a new better way by then):
  * Same sort of rename in Chrome's third_party
  * Aliased targets via //build/secondary in Chrome.
  * Indirection via build_overrides

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2265503002

Review-Url: https://codereview.chromium.org/2265503002
2016-08-22 06:32:39 -07:00
fmalita
582a6564f3 Simplify the gradient color stop optimizer
We're just discarding the leftmost/rightmost stops -- this can be
achieved by simply adjusting the start offset and count.

R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2265803002

Review-Url: https://codereview.chromium.org/2265803002
2016-08-22 06:28:57 -07:00
fmalita
5122967e60 Add a gradient edge optimization test
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2267593002

Review-Url: https://codereview.chromium.org/2267593002
2016-08-22 06:22:28 -07:00
reed
5755cd98a7 make zoomer text clearer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2267623002

TBR=

Review-Url: https://codereview.chromium.org/2267623002
2016-08-21 19:30:13 -07:00