Commit Graph

23799 Commits

Author SHA1 Message Date
bsalomon
a395f7c7a5 Update GrShape test to allow more flexible shape creation.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2277483002

Review-Url: https://codereview.chromium.org/2277483002
2016-08-24 17:47:41 -07:00
mtklein
9b8583dd1f GN: misc
- Use options' template pattern for opts too.
  - Simplify opt's and options' configs... they should all be the same.
  - When building a static-library component in our GN environment (i.e. libskia.a),
    make it a complete static lib, fully containing its transitive deps.
  - It has not proved useful to override ar.

TBR=jcgregorio@google.com

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

Review-Url: https://codereview.chromium.org/2278673002
2016-08-24 17:32:30 -07:00
mtklein
f84960187a We can't infer the right type for voidp for old png_jmpbuf()
In libpng 1.2 it's just a macro that's ->jmpbuf,
so there's nothing forcing the conversion to png_structp.

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

Review-Url: https://codereview.chromium.org/2268953005
2016-08-24 14:46:35 -07:00
halcanary
e59cb1c1f1 SkPDF: set SK_SFNTLY_SUBSETTER uniformly
When Skia is built into the Android framework,
SK_SFNTLY_SUBSETTER="sample/chromium/font_subsetter.h".
This #includes the same value for GOOGLE3.

Once Chrome is also using this value, we can do away with
the `#ifdef GOOGLE3` line.

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

Review-Url: https://codereview.chromium.org/2272103002
2016-08-24 14:42:08 -07:00
caryclark
1682612871 mark fuzz test flaky since it may fail on some platforms
NOTRY=true
TBR=bungeman@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2277893004

Review-Url: https://codereview.chromium.org/2277893004
2016-08-24 13:00:42 -07:00
halcanary
e37aa89c5c gyp/sfntly: set SK_SFNTLY_SUBSETTER uniformly
When Skia is built into the Android framework,
SK_SFNTLY_SUBSETTER="sample/chromium/font_subsetter.h".
This sets the same value for Skia's test framework

I will eventually move away from the
   #include PREPROCESSOR_DEFINE
trick, which does not work everywhere.

No public API changes.
TBR=reed@google.com

Review-Url: https://codereview.chromium.org/2274223002
2016-08-24 12:28:38 -07:00
mtklein
c095df55e8 GN: guard tools (except fiddle) by skia_enable_tools.
Our tools use third-party libraries pretty freely, some of which may not
be available in other GN environments (e.g. Fuchsia).  Most can also not
function when Skia is built as a shared library.

fiddle stands alone as the exception to both those points: it depends on
only Skia, and works fine with both a shared or static library.

So guard everything but fiddle with this flag skia_enable_tools, disabled
when we're building for Fuchsia or when we're build a shared library.

This CL has a couple of little tweaks to Fiddle to keep it working:
  - divorce it from :tool_utils, instead just building SkForceLinking.cpp itself;
  - fix up a buggy rebase_path() that was accidentally working when we depended
    on :tool_utils;
  - drop test_only: it now only requires production-code dependencies.

The SkImageEncoder Create* methods need to be SK_API if we want SkForceLinking
to work across .so's.  Without this, SkForceLinking needs to be part of Skia; it
can't be part of the application using Skia.

The rest is mostly just a re-indent under if (skia_enable_tools),
courtesy of gn format.

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

No public API changes.
TBR=reed@google.com

Review-Url: https://codereview.chromium.org/2273823003
2016-08-24 12:23:52 -07:00
mtklein
6dc5b9a9b7 SkPngCodec: voidp instead of forward-declares for png.h types.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2277903002

Review-Url: https://codereview.chromium.org/2277903002
2016-08-24 12:22:32 -07:00
ajuma
8c99eabdd9 Fix leak in GrTextureStripAtlasTest
This is a followup to https://codereview.chromium.org/2262233002/,
adding a missing call to GrTextureStripAtlas::unlockRow.

BUG=chromium:637678
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2272953003

Review-Url: https://codereview.chromium.org/2272953003
2016-08-24 12:09:12 -07:00
bungeman
e55131c186 s/invertable/invertible
English orthography is often made difficult by poor phonology.

TBR=oxford-english-dictionary,mtklein

Review-Url: https://codereview.chromium.org/2272083002
2016-08-24 12:01:31 -07:00
caryclark
531191fefe tiny line breaks gl render
This pie cut draws correctly
on raster but extends to the
right on Ganesh.

The path is not convex, and
has a tiny line that contributes
to the error.

TBR=robertphillips@google.com
BUG=640176
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2276083002

Review-Url: https://codereview.chromium.org/2276083002
2016-08-24 11:59:30 -07:00
fmalita
bf783b335c Fix SkTLazy(const T*) initialization
Splitting the fix from https://codereview.chromium.org/2271743002/.

R=bungeman@google.com,mtklein@google.com
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2278633002

Review-Url: https://codereview.chromium.org/2278633002
2016-08-24 11:03:24 -07:00
mtklein
2ff47c2390 GN: Fuchsia probably cannot link without this.
We removed this _none variant globally, thinking we'd put back platform
specific versions as we added support for those platforms.

We don't have anything for Fuchsia.

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

Review-Url: https://codereview.chromium.org/2271273002
2016-08-24 10:27:13 -07:00
halcanary
9df5a4c354 SkPDF: vector canvases can't hint!
BUG=637571
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2273073002

Review-Url: https://codereview.chromium.org/2273073002
2016-08-24 10:08:13 -07:00
mtklein
6321381d18 GN: more optional components: jpeg, pdf, png, xml
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2267343004

Review-Url: https://codereview.chromium.org/2267343004
2016-08-24 09:55:56 -07:00
caryclark
ef4f32ac85 remove point aliases
This removes the notion of keeping track of every different t value
that resolves to the same or a similar point. Other fixes make
this concept unnecessary, and removing it simplifies the code.

This removes an allocation, and speeds up paths with many
overlapping curves.

As a bonus, four fuzzer tests that failed before now succeed.

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

Review-Url: https://codereview.chromium.org/2275703003
2016-08-24 09:24:18 -07:00
halcanary
ea17dfe40b SkPDF: vertical writing: draw nothing
BUG=skia:5665
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2274153002

Review-Url: https://codereview.chromium.org/2274153002
2016-08-24 09:20:57 -07:00
bungeman
bea9748449 Add simple font fallback on Mac.
Implement SkFontMgr_Mac::onMatchFamilyStyleCharacter. This is a simple
implementation which provides basic fallback.

This also renames and refactors several static functions to reduce code
duplication.

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

Review-Url: https://codereview.chromium.org/2268663002
2016-08-24 08:29:50 -07:00
ajuma
95243ebb68 Make GrTextureStripAtlas flush pending IO on newly acquired texture
GrTextureStripAtlas uses its own lock counts to protect against
overwriting its own earlier writes, but that doesn't protect against
IO that was pending when a texture was first acquired.

BUG=chromium:637678
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2262233002

Review-Url: https://codereview.chromium.org/2262233002
2016-08-24 08:19:03 -07:00
msarett
9d15dab754 Parse ICC profiles from webps
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2269333002

Review-Url: https://codereview.chromium.org/2269333002
2016-08-24 07:36:06 -07:00
egdaniel
66933552f1 Add addtional resolve calls to vulkan backend
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2215363003

Review-Url: https://codereview.chromium.org/2215363003
2016-08-24 07:22:19 -07:00
msarett
3bf7509c3f Warn on bad rendering intents (instead of valid ones)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2274843002

Review-Url: https://codereview.chromium.org/2274843002
2016-08-24 06:22:41 -07:00
brianosman
8aeec39f1f New helper for creating a color space from another, with linear gamma
Going to need this in many places once we expliclty require F16 surfaces
to have linear gamma color spaces.

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

Review-Url: https://codereview.chromium.org/2270103002
2016-08-24 05:11:20 -07:00
rmistry
3f1c9c0a72 Apply gerrit ref if it is a Gerrit patch.
Also:
* Pass through a new property 'patch_storage' to DM/Nanobench/Coverage. This will be used by the different frameworks to figure out if it is Rietveld or Gerrit issue.
* Calculate issue and patchset for Gerrit patches similar to Rietveld.

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

Review-Url: https://codereview.chromium.org/2263323002
2016-08-24 05:07:06 -07:00
reed
6a88206b2e combine setRectFan and mapRect
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2276603002

Review-Url: https://codereview.chromium.org/2276603002
2016-08-24 04:22:08 -07:00
msarett
9dc6cf6b88 Fix generic color space xform, ColorSpaceXformTest
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2275563002

Review-Url: https://codereview.chromium.org/2275563002
2016-08-23 17:53:06 -07:00
msarett
ae6377c08e Make singleton SkColorSpaces thread safe
SkColorSpaces may be once-ptrs, so we can reuse common color spaces.
This means that they must be thread safe.  SkMatrix44 is not
thread safe because it maintains a mutable type mask.

This CL ensures that we precompute the type mask so we
can use const SkMatrix44's safely.

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

Review-Url: https://codereview.chromium.org/2277463002
2016-08-23 14:36:20 -07:00
bsalomon
19fe41e85e Remove SkPixelRef::getTexture()
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2264293003

Review-Url: https://codereview.chromium.org/2264293003
2016-08-23 14:02:54 -07:00
mtklein
457b42a639 GN: extract optional() as a template and use for giflib-dependent code
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2270833003

Review-Url: https://codereview.chromium.org/2270833003
2016-08-23 13:56:37 -07:00
mtklein
09e61f7233 GN: Fix up Ganesh native interface hooks.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2269213002

Review-Url: https://codereview.chromium.org/2269213002
2016-08-23 13:35:28 -07:00
csmartdalton
5ecbbbef58 Skip non-AA intersect rects in GrReducedClip
Skips non-AA rects whose op is intersect or replace, and who do not
precede elements that grow the clip, by tightening fIBounds.

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

Review-Url: https://codereview.chromium.org/2271493002
2016-08-23 13:26:40 -07:00
bungeman
1f0e78ddf9 SkScalerContextRec::computeMatrices to return status.
When computing the matricies for a scaler context, there is a special
case when the matrix is determined to be singular. No port properly
handles zero sized text, so we detect this case and return a 'normal'
text size and a zero matrix for all computed transformations. This
CL causes computeMatricies to return 'false' in this case.

This is used in the constructor of SkScalerContext_Mac in order to
avoid calling CGAffineTransformInvert on non-invertible transformations.
CGAffineTransformInvert documents that if the transform is
non-invertible it will return the passed transform unchanged. It does
so, but then also prints a message to stdout. Since the information is
already available to avoid this chatty behavior, use it to keep things
quiet.

BUG=skia:3231,chromium:630169
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2276583003

Review-Url: https://codereview.chromium.org/2276583003
2016-08-23 13:19:01 -07:00
mtklein
da19f6f3b5 Assume all TURBO_HAS_* are true.
Should be everyone's on libjpeg-turbo >= 1.5.0.

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

Review-Url: https://codereview.chromium.org/2274643002
2016-08-23 11:49:29 -07:00
vjiaoblack
e1e5c74086 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
Committed: https://skia.googlesource.com/skia/+/a97a1ab5719d5c355f7900b7f17dec1e467cf57e
Review-Url: https://codereview.chromium.org/2255803003
2016-08-23 11:13:14 -07:00
mtklein
d805f20c8d CMake: require libjpeg-turbo, not libjpeg
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2273753002
CQ_INCLUDE_TRYBOTS=master.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/2273753002
2016-08-23 11:01:33 -07:00
halcanary
5eb8bffe42 experimental/tools/mskp_parser.py
TBR=
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2268403003

Review-Url: https://codereview.chromium.org/2268403003
2016-08-23 10:32:54 -07:00
bungeman
2a57f2fb2f Revert of Moving SkBlurImageFilter into core (patchset #9 id:160001 of https://codereview.chromium.org/2255803003/ )
Reason for revert:
Breaking internal roll. Still needs 'Create'.

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
> Committed: https://skia.googlesource.com/skia/+/a97a1ab5719d5c355f7900b7f17dec1e467cf57e

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/2274603003
2016-08-23 10:04:54 -07:00
caryclark
3cebe24682 fix conic path fuzz
The test conic has a very large weight, so it reduces to a pair
of lines. Detect this case rather than subdividing the conic
so much that the answers are meaningless.

R=herb@google.com, reed@google.com
BUG=638223
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2268073004

Review-Url: https://codereview.chromium.org/2268073004
2016-08-23 09:41:00 -07:00
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