platform/upstream/libSkiaSharp.git
7 years agoUse stroked rrects for Android shadow sample
jvanverth [Mon, 29 Aug 2016 14:17:47 +0000 (07:17 -0700)]
Use stroked rrects for Android shadow sample

Changes the Android shadow sample to use stroked roundrects when
we can (mainly if stroked geometry area < fill geometry area).

Also changes the setup for the overstroke geometry so that it computes
the correct distance to the outer edge.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2283003003

Review-Url: https://codereview.chromium.org/2283003003

7 years agoRoll GN
mtklein [Mon, 29 Aug 2016 14:14:28 +0000 (07:14 -0700)]
Roll GN

This picks up https://chromium.googlesource.com/chromium/src/tools/gn/+/efc976e5029419fde92111ce52f913c61fb9553c, which means we don't need to create a link_pool any more.  The default behavior is unlimited linking, what we were asking for explicitly.

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

Review-Url: https://codereview.chromium.org/2288253002

7 years agoMoved ambient lights out of SkLight's light array
vjiaoblack [Mon, 29 Aug 2016 14:08:52 +0000 (07:08 -0700)]
Moved ambient lights out of SkLight's light array

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

Review-Url: https://codereview.chromium.org/2287553002

7 years agochange readTypeface to return sk_sp
reed [Mon, 29 Aug 2016 13:57:28 +0000 (06:57 -0700)]
change readTypeface to return sk_sp

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

TBR=mtklein

Review-Url: https://codereview.chromium.org/2290653002

7 years agoRemove FP16 support from ANGLE. Previous workaround was incomplete.
brianosman [Mon, 29 Aug 2016 13:46:07 +0000 (06:46 -0700)]
Remove FP16 support from ANGLE. Previous workaround was incomplete.

ANGLE is using the wrong external type (GL_HALF_FLOAT) when querying for
ReadPixels format, but it validates parameters to TexImage2D against the
correct type (GL_HALF_FLOAT_OES). Rather than introduce a lot of
complexity to work around the inconsistency, I'm just going to remove
support for now.

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

Review-Url: https://codereview.chromium.org/2288233002

7 years ago[SVGDom] Don't truncate opacity scalars
fmalita [Mon, 29 Aug 2016 12:54:42 +0000 (05:54 -0700)]
[SVGDom] Don't truncate opacity scalars

Round instead, for more accurate values.

R=robertphillips@google.com,stephana@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2284123003

Review-Url: https://codereview.chromium.org/2284123003

7 years agoUpdate SKP version
update-skps [Sun, 28 Aug 2016 08:53:34 +0000 (01:53 -0700)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2286143002

Review-Url: https://codereview.chromium.org/2286143002

7 years agocleanup dead nanomsg and build_overrides
mtklein [Sat, 27 Aug 2016 13:50:11 +0000 (06:50 -0700)]
cleanup dead nanomsg and build_overrides

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

Review-Url: https://codereview.chromium.org/2287013003

7 years agoif the winding of the top can't be computed, give up
caryclark [Fri, 26 Aug 2016 21:24:24 +0000 (14:24 -0700)]
if the winding of the top can't be computed, give up

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

Review-Url: https://codereview.chromium.org/2283993002

7 years agoGN: support compiler_prefix, use it for ccache on bots.
mtklein [Fri, 26 Aug 2016 20:43:19 +0000 (13:43 -0700)]
GN: support compiler_prefix, use it for ccache on bots.

This makes it considerably easier to use ccache with the Android NDK.
You can now just set
  compiler_prefix = "ccache"
  ndk = "/path/to/ndk"
and we'll use the NDK clang, wrapped with ccache.

The name compiler_prefix is stolen from / compatible with Chrome.

If you have ccache, you can just always leave compiler_prefix="ccache" enabled.
This should make it an unusual thing for humans to have to change cc or cxx.

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

Review-Url: https://codereview.chromium.org/2281163002

7 years agoSkPDF: Glyph validation change
halcanary [Fri, 26 Aug 2016 20:17:44 +0000 (13:17 -0700)]
SkPDF: Glyph validation change

Instead of mapping invaid glyphIDs to zero or maxGlyphID,
don't draw them at all.

Validate glyphs when glyph is written, not ahead of time.

Don't allocate array to copy user-provided glyphs.

Easy early exit from SkPDFDevice::internalDrawText()
    GlyphPositioner::flush() called ~GlyphPositioner()
    SkScopeExit class now exists.

Assume SkTypeface* pointers are now never null in more
places.

precalculate alignmentFactor to clean up code.

SkPDFDevice::updateFont must be called with validated
glyphID.  Skip bad glyphs to make this true.

SkPDFDevice::updateFont always succeeds.

SkPDFFont::GetFontResource always succeeds (preconditions are
asserted).  If GetMetrics fails, don't call GetFontResource.

SkPDFFont::glyphsToPDFFontEncodingCount() becomes
SkPDFFont::countStretch() and is inlined.

SkPDFFont::glyphsToPDFFontEncoding now works one Glyph at a
time and is inlined.

SkPDFFont::noteGlyphUsage() operates one glyph at a time.

Add SkScopeExit.h; also a unit test for it.

SkPostConfig: Fix SK_UNUSED for Win32.

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

BUG=625995

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

Review-Url: https://codereview.chromium.org/2278703002

7 years agodrawBitmapRect() should not touch the CTM when mask filters are present
fmalita [Fri, 26 Aug 2016 20:04:14 +0000 (13:04 -0700)]
drawBitmapRect() should not touch the CTM when mask filters are present

Blur sigma calculations are CTM dependent, so we cannot take the
drawBitmap() fast path in the presence of mask filters.

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

Review-Url: https://codereview.chromium.org/2286873002

7 years agoReduce CPU overhead on drawRegion()
msarett [Fri, 26 Aug 2016 19:49:27 +0000 (12:49 -0700)]
Reduce CPU overhead on drawRegion()

Only batch when the view matrices are the same.

This allows us to skip applying the matrix and uploading
local coords.

drawregion Bench on Nexus 6P:
Before 4.69ms
After  2.83ms

This puts SkiaGL nearly on par with OpenGL.

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

Review-Url: https://codereview.chromium.org/2282983003

7 years agoFix angle build on Ubuntu
brianosman [Fri, 26 Aug 2016 19:33:58 +0000 (12:33 -0700)]
Fix angle build on Ubuntu

Review-Url: https://codereview.chromium.org/2284753003

7 years agoExpat target exports includes instead of FreeType.
bungeman [Fri, 26 Aug 2016 19:15:54 +0000 (12:15 -0700)]
Expat target exports includes instead of FreeType.

Currently when building for Android framework the freetype target
exports the expat include directory, but the freetype target neither
uses nor logically provides this information. Instead, the expat target
itself should do this.

Review-Url: https://codereview.chromium.org/2283903003

7 years agoAdd Mac NDK asset, and fetch NDK on Android compile bots.
mtklein [Fri, 26 Aug 2016 18:22:54 +0000 (11:22 -0700)]
Add Mac NDK asset, and fetch NDK on Android compile bots.

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

Review-Url: https://codereview.chromium.org/2284813002

7 years agoDon't add the resolve attachment to vulkan render passes.
egdaniel [Fri, 26 Aug 2016 18:05:13 +0000 (11:05 -0700)]
Don't add the resolve attachment to vulkan render passes.

Also includes some other msaa bug fixes

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

Review-Url: https://codereview.chromium.org/2256843002

7 years agofixed 'corners' of paths in GrAAConvexTessellator
ethannicholas [Fri, 26 Aug 2016 18:03:32 +0000 (11:03 -0700)]
fixed 'corners' of paths in GrAAConvexTessellator

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

Review-Url: https://codereview.chromium.org/2280943003

7 years agoadd an asset for the Linux Android NDK.
mtklein [Fri, 26 Aug 2016 17:52:19 +0000 (10:52 -0700)]
add an asset for the Linux Android NDK.

I have run create_and_upload.py... cipd is uploading now.

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

Review-Url: https://codereview.chromium.org/2275093003

7 years agoConverts a drawPaint through a rrect clip to a drawRRect in GrDrawContext.
bsalomon [Fri, 26 Aug 2016 17:48:19 +0000 (10:48 -0700)]
Converts a drawPaint through a rrect clip to a drawRRect in GrDrawContext.

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

Review-Url: https://codereview.chromium.org/2271053004

7 years agoUpdate ANGLE to latest as of August 25, 2016
brianosman [Fri, 26 Aug 2016 17:37:57 +0000 (10:37 -0700)]
Update ANGLE to latest as of August 25, 2016

With this version, it's now exposing GL_EXT_color_buffer_half_float, but
it's (incorrectly) using GL_HALF_FLOAT rather than GL_HALF_FLOAT_OES.
In addition, release builds were crashing in EGLImageTest due to an
apparent disagreement about calling convention on function-pointer to
exported symbol. There is a proper typedef for that in one of their
headers, but I can't seem to include it without creating more problems,
so I just fixed the decoration on our local typedef.

With those changes, all tests pass, and (on my Windows machine), all
GMs and SKPs produce identical results vs. master in angle and angle-gl.

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

Review-Url: https://codereview.chromium.org/2282733003

7 years agoRemove SVG serialization suppressions
fmalita [Fri, 26 Aug 2016 17:23:43 +0000 (10:23 -0700)]
Remove SVG serialization suppressions

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

Review-Url: https://codereview.chromium.org/2282883002

7 years agoAdd imagemasksubset GM
fmalita [Fri, 26 Aug 2016 17:13:39 +0000 (10:13 -0700)]
Add imagemasksubset GM

(GM for non-N32 SkImage subsetting)

BUG=skia:5687
R=bsalomon@google.com,robertphillips@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2286733002

Review-Url: https://codereview.chromium.org/2286733002

7 years agoRestrict supported font formats in Chrome context
drott [Fri, 26 Aug 2016 17:08:45 +0000 (10:08 -0700)]
Restrict supported font formats in Chrome context

Chrome's complex text path uses HarfBuzz OpenType glyph lookup
functions. These do not support glyph lookup in Type 1 / Postscript
fonts and we do not wish to support those in Chrome any longer.

In order to avoid matching fonts against Type 1 fonts possible present
on Linux installations and exposed through fontconfig, this CL filters
those out in Skia's font matching code.

This change might not be desirable for all context in which Skia is
used, hence making it conditional on a Chrome context define.

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

Review-Url: https://codereview.chromium.org/2280053002

7 years agoMove work from ctor to onOnceBeforeDraw in ShowMipLevel GMs
robertphillips [Fri, 26 Aug 2016 17:04:26 +0000 (10:04 -0700)]
Move work from ctor to onOnceBeforeDraw in ShowMipLevel GMs

These were making debugging stroking more difficult than necessary

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

Review-Url: https://codereview.chromium.org/2285813002

7 years agoavoid generating degenerate conic from arc
caryclark [Fri, 26 Aug 2016 16:54:25 +0000 (09:54 -0700)]
avoid generating degenerate conic from arc

R=bsalomon@google.com
BUG=skia:5672
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2281953002

Review-Url: https://codereview.chromium.org/2281953002

7 years agoAdded distance attenuation and diffuse shading to PointLights
vjiaoblack [Fri, 26 Aug 2016 15:49:46 +0000 (08:49 -0700)]
Added distance attenuation and diffuse shading to PointLights

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

Review-Url: https://codereview.chromium.org/2246463004

7 years agoFix for fat stroked roundrects.
jvanverth [Fri, 26 Aug 2016 15:15:33 +0000 (08:15 -0700)]
Fix for fat stroked roundrects.

The original method did not correctly compute the distance value along
the inner edge, so the antialiasing was not quite correct. This fixes
that by adding additional vertices and setting a different outerRadius.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2275423002

Review-Url: https://codereview.chromium.org/2275423002

7 years agoGN: mac host and armv7 target
mtklein [Fri, 26 Aug 2016 15:13:04 +0000 (08:13 -0700)]
GN: mac host and armv7 target

Just when I thought it wouldn't be useful to override ar...

Tested by building 32- and 64-bit DM on my MBP and running it on my N5x.

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

Review-Url: https://codereview.chromium.org/2279703003

7 years agoSkOSFile instead of dirent in android font parser.
bungeman [Fri, 26 Aug 2016 14:15:50 +0000 (07:15 -0700)]
SkOSFile instead of dirent in android font parser.

This makes the parser more portable while making essentially the same
file system calls on Android.

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

Review-Url: https://codereview.chromium.org/2279033004

7 years agoFix bounds check in grshape test
bsalomon [Fri, 26 Aug 2016 13:45:06 +0000 (06:45 -0700)]
Fix bounds check in grshape test
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2274113004

Review-Url: https://codereview.chromium.org/2274113004

7 years agodrawRegion() cleanups
msarett [Fri, 26 Aug 2016 13:37:45 +0000 (06:37 -0700)]
drawRegion() cleanups

(1) Move implementation to the cpp.
(2) Check for the isRect() case.

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

Review-Url: https://codereview.chromium.org/2286693002

7 years agoIgnore fill when stroke & filling convex line-only paths
robertphillips [Fri, 26 Aug 2016 12:30:19 +0000 (05:30 -0700)]
Ignore fill when stroke & filling convex line-only paths

This seems to work well for miter and bevel joins with the resulting stroke and fill path remaining convex. There seems to be an issue with round joins where the outer generated shell is usually not convex. Without this CL the resulting stroke & filled paths are always concave.

Perf-wise (on Windows):

convex-lineonly-paths-stroke-and-fill bench

(in ms)   w/o   w/CL    %decrease

8888      2.88  2.01      30.2

gpu       4.4   1.38      68.6

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

Review-Url: https://codereview.chromium.org/2275243003

7 years agoGPU implementation of drawRegion()
msarett [Fri, 26 Aug 2016 01:07:18 +0000 (18:07 -0700)]
GPU implementation of drawRegion()

Nexus 6P drawregion Bench Performance
Before 48.0ms
After  3.57ms

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

Review-Url: https://codereview.chromium.org/2267273006

7 years agoGN: Android
mtklein [Thu, 25 Aug 2016 21:50:44 +0000 (14:50 -0700)]
GN: Android

Once you have downloaded an android NDK, you can set the ndk GN arg to use it.
E.g. my gn.args looks like:
  is_debug = false
  ndk = "/opt/android-ndk"

This should be enough to get you going for an arm64 build.  You ought to be able to tweak that to other architectures by changing target_cpu to "arm", "x86", "x86-64", etc.  That won't quite work until I follow this up a bit, but the skeleton is there.

This is enough to get me compiled, linked, and running to completion on my N5x.

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

Review-Url: https://codereview.chromium.org/2275983004

7 years agoAdd drawRegion() API to SkCanvas
msarett [Thu, 25 Aug 2016 20:54:30 +0000 (13:54 -0700)]
Add drawRegion() API to SkCanvas

This will allow us to optimize for the RectGrid macrobench.
Currently, SkiaGL is much slower than OpenGL.
SkiaGL  12 items/s
OpenGL 160 items/s

This contains everything except for the fast implementation on GPU.

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

Review-Url: https://codereview.chromium.org/2277053002

7 years agoAdd support for getting vulkan descriptor sets without a GrVkUniformHandler.
egdaniel [Thu, 25 Aug 2016 20:52:00 +0000 (13:52 -0700)]
Add support for getting vulkan descriptor sets without a GrVkUniformHandler.

This change allows us to use the current descriptor set system for doing
copies as draws. This is a step towards being able to track resources for draws
that don't go through out normal pipeline.

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

Review-Url: https://codereview.chromium.org/2275633002

7 years agoDo not spam the debugging information
liyuqian [Thu, 25 Aug 2016 20:14:54 +0000 (13:14 -0700)]
Do not spam the debugging information

Currently, whenever there's a frame being rendered, we log such an
invalidation event. This is very spammy for animations or frame rates
test.

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

Review-Url: https://codereview.chromium.org/2276303003

7 years agoRespecify SkCanvas::drawArc, consolidate conversion to SkPath, add GM for oddball...
bsalomon [Thu, 25 Aug 2016 19:29:23 +0000 (12:29 -0700)]
Respecify SkCanvas::drawArc, consolidate conversion to SkPath, add GM for oddball drawArcs

Allows the arc to wind more than 360 degrees when useCenter is true, specs that nothing draws
if the oval is empty or the sweep angle is 0.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2281653002

Review-Url: https://codereview.chromium.org/2281653002

7 years agopath ops stream-lining
caryclark [Thu, 25 Aug 2016 18:27:17 +0000 (11:27 -0700)]
path ops stream-lining

The addT() function is a workhorse of pathops.
Make it simpler, removing branches and parameters.

Separate addOpp() into const and modify parts.

Add more debugging that asserts if the function
fails and the data is not extreme (e.g., fuzzer
generated).

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

Review-Url: https://codereview.chromium.org/2273293004

7 years agoSkDrawCommand: hinting
halcanary [Thu, 25 Aug 2016 18:10:41 +0000 (11:10 -0700)]
SkDrawCommand: hinting

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

Review-Url: https://codereview.chromium.org/2274373003

7 years agoBUILD.gn: Fix fiddle raster.
jcgregorio [Thu, 25 Aug 2016 16:25:11 +0000 (09:25 -0700)]
BUILD.gn: Fix fiddle raster.

BUG=skia:

Review-Url: https://codereview.chromium.org/2269143007

7 years agoSkPDF: Stop `#include PREPROCESSOR_DEFINE` pattern
halcanary [Thu, 25 Aug 2016 16:07:02 +0000 (09:07 -0700)]
SkPDF: Stop `#include PREPROCESSOR_DEFINE` pattern

No more:
   #include SK_SFNTLY_SUBSETTER
   #include ZLIB_INCLUDE

Also, rename SK_SFNTLY_SUBSETTER to SK_PDF_USE_SFNTLY
to follow my pattern of prefixing SkPDF-specific defines
with 'SK_PDF_'.

The ZLIB_INCLUDE define is no longer is used by anyone.

TODO: rename Sfntly to something pronounceable.

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

Review-Url: https://codereview.chromium.org/2273343002

7 years agoRemove pixel config fallback - failing is a better option.
brianosman [Thu, 25 Aug 2016 15:55:24 +0000 (08:55 -0700)]
Remove pixel config fallback - failing is a better option.

This produces surprising results in some cases. For example: Attempt to
make an F16 SkSurface on ANGLE. We can't render to F16, but this succeeds
and gives you back an N32 surface instead. Ran all tests and GMs in DM on
ANGLE (where this is most likely to be an issue). No problems.

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

Review-Url: https://codereview.chromium.org/2272423004

7 years agoupdate Android auto-detection.
mtklein [Thu, 25 Aug 2016 15:44:49 +0000 (08:44 -0700)]
update Android auto-detection.

Clang defines __ANDROID__

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

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

Review-Url: https://codereview.chromium.org/2278483004

7 years agoReland: Experimental parsing expression grammar (PEG) template library
fmalita [Thu, 25 Aug 2016 15:44:35 +0000 (08:44 -0700)]
Reland: Experimental parsing expression grammar (PEG) template library

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

Committed: https://skia.googlesource.com/skia/+/9d08cbc8c6131ff61a1e71cc5c8cf27841d62b42
Review-Url: https://codereview.chromium.org/2271743002

7 years agoAdd Ganesh support for circular roundrects with strokes > 2*radii.
jvanverth [Thu, 25 Aug 2016 15:12:35 +0000 (08:12 -0700)]
Add Ganesh support for circular roundrects with strokes > 2*radii.

Overstroked rrects are supported by adding additional geometry to the
center of the nine patch, and setting constant offset vectors to fake
out the distance calculation.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2272703004

Review-Url: https://codereview.chromium.org/2272703004

7 years agoMake bleed GM produce consistent bitmaps on all platforms
bsalomon [Thu, 25 Aug 2016 13:45:29 +0000 (06:45 -0700)]
Make bleed GM produce consistent bitmaps on all platforms
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2264133003

Review-Url: https://codereview.chromium.org/2264133003

7 years agoMade shadows blurry (thru implementing variance mapping)
vjiaoblack [Thu, 25 Aug 2016 13:30:23 +0000 (06:30 -0700)]
Made shadows blurry (thru implementing variance mapping)

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

Review-Url: https://codereview.chromium.org/2224163005

7 years agoUpdate Skia milestone to 55
hcm [Thu, 25 Aug 2016 13:19:30 +0000 (06:19 -0700)]
Update Skia milestone to 55

TBR=reed@google.com

No API changes, just moving version fwd.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2281533002

Review-Url: https://codereview.chromium.org/2281533002

7 years agoAdd fat stroke test case to roundrects GM.
jvanverth [Thu, 25 Aug 2016 12:53:00 +0000 (05:53 -0700)]
Add fat stroke test case to roundrects GM.

Prep for supporting fat stroked roundrects in Ganesh.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2272703009

Review-Url: https://codereview.chromium.org/2272703009

7 years agoRevert of Experimental parsing expression grammar (PEG) template library (patchset...
fmalita [Thu, 25 Aug 2016 12:50:26 +0000 (05:50 -0700)]
Revert of Experimental parsing expression grammar (PEG) template library (patchset #8 id:140001 of https://codereview.chromium.org/2271743002/ )

Reason for revert:
G3 roll & Msan woes.

Original issue's description:
> Experimental parsing expression grammar (PEG) template library
>
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2271743002
>
> Committed: https://skia.googlesource.com/skia/+/9d08cbc8c6131ff61a1e71cc5c8cf27841d62b42

TBR=mtklein@google.com,bungeman@google.com,reed@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/2275943004

7 years agoadd pathops debugging
caryclark [Thu, 25 Aug 2016 12:21:14 +0000 (05:21 -0700)]
add pathops debugging

Pathops has many points of failure, most of which
are triggered by extreme data generated by fuzzers.
It's difficult to figure out which failure point
was triggered when the operation gives up.

Add instrumentation so that the failure can
be debugged when the data is well-behaved.

Also, add a check that looks for a sequence of
coincident points on multiple edges that are out
of order when compared to each other.

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

Review-Url: https://codereview.chromium.org/2274803003

7 years agoAdd neon and crc32 sources for aarch64
anmittal [Thu, 25 Aug 2016 11:55:19 +0000 (04:55 -0700)]
Add neon and crc32 sources for aarch64

This fixes the build for aarch64 arch

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

Review-Url: https://codereview.chromium.org/2272243003

7 years agoExperimental parsing expression grammar (PEG) template library
fmalita [Thu, 25 Aug 2016 01:23:24 +0000 (18:23 -0700)]
Experimental parsing expression grammar (PEG) template library

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

Review-Url: https://codereview.chromium.org/2271743002

7 years agoUpdate GrShape test to allow more flexible shape creation.
bsalomon [Thu, 25 Aug 2016 00:47:40 +0000 (17:47 -0700)]
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

7 years agoGN: misc
mtklein [Thu, 25 Aug 2016 00:32:30 +0000 (17:32 -0700)]
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

7 years agoWe can't infer the right type for voidp for old png_jmpbuf()
mtklein [Wed, 24 Aug 2016 21:46:35 +0000 (14:46 -0700)]
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

7 years agoSkPDF: set SK_SFNTLY_SUBSETTER uniformly
halcanary [Wed, 24 Aug 2016 21:42:08 +0000 (14:42 -0700)]
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

7 years agomark fuzz test flaky since it may fail on some platforms
caryclark [Wed, 24 Aug 2016 20:00:42 +0000 (13:00 -0700)]
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

7 years agogyp/sfntly: set SK_SFNTLY_SUBSETTER uniformly
halcanary [Wed, 24 Aug 2016 19:28:38 +0000 (12:28 -0700)]
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

7 years agoGN: guard tools (except fiddle) by skia_enable_tools.
mtklein [Wed, 24 Aug 2016 19:23:52 +0000 (12:23 -0700)]
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

7 years agoSkPngCodec: voidp instead of forward-declares for png.h types.
mtklein [Wed, 24 Aug 2016 19:22:32 +0000 (12:22 -0700)]
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

7 years agoFix leak in GrTextureStripAtlasTest
ajuma [Wed, 24 Aug 2016 19:09:12 +0000 (12:09 -0700)]
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

7 years agos/invertable/invertible
bungeman [Wed, 24 Aug 2016 19:01:31 +0000 (12:01 -0700)]
s/invertable/invertible

English orthography is often made difficult by poor phonology.

TBR=oxford-english-dictionary,mtklein

Review-Url: https://codereview.chromium.org/2272083002

7 years agotiny line breaks gl render
caryclark [Wed, 24 Aug 2016 18:59:30 +0000 (11:59 -0700)]
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

7 years agoFix SkTLazy(const T*) initialization
fmalita [Wed, 24 Aug 2016 18:03:24 +0000 (11:03 -0700)]
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

7 years agoGN: Fuchsia probably cannot link without this.
mtklein [Wed, 24 Aug 2016 17:27:13 +0000 (10:27 -0700)]
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

7 years agoSkPDF: vector canvases can't hint!
halcanary [Wed, 24 Aug 2016 17:08:13 +0000 (10:08 -0700)]
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

7 years agoGN: more optional components: jpeg, pdf, png, xml
mtklein [Wed, 24 Aug 2016 16:55:56 +0000 (09:55 -0700)]
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

7 years agoremove point aliases
caryclark [Wed, 24 Aug 2016 16:24:18 +0000 (09:24 -0700)]
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

7 years agoSkPDF: vertical writing: draw nothing
halcanary [Wed, 24 Aug 2016 16:20:57 +0000 (09:20 -0700)]
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

7 years agoAdd simple font fallback on Mac.
bungeman [Wed, 24 Aug 2016 15:29:50 +0000 (08:29 -0700)]
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

7 years agoMake GrTextureStripAtlas flush pending IO on newly acquired texture
ajuma [Wed, 24 Aug 2016 15:19:02 +0000 (08:19 -0700)]
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

7 years agoParse ICC profiles from webps
msarett [Wed, 24 Aug 2016 14:36:06 +0000 (07:36 -0700)]
Parse ICC profiles from webps

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

Review-Url: https://codereview.chromium.org/2269333002

7 years agoAdd addtional resolve calls to vulkan backend
egdaniel [Wed, 24 Aug 2016 14:22:19 +0000 (07:22 -0700)]
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

7 years agoWarn on bad rendering intents (instead of valid ones)
msarett [Wed, 24 Aug 2016 13:22:41 +0000 (06:22 -0700)]
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

7 years agoNew helper for creating a color space from another, with linear gamma
brianosman [Wed, 24 Aug 2016 12:11:20 +0000 (05:11 -0700)]
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

7 years agoApply gerrit ref if it is a Gerrit patch.
rmistry [Wed, 24 Aug 2016 12:07:06 +0000 (05:07 -0700)]
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

7 years agocombine setRectFan and mapRect
reed [Wed, 24 Aug 2016 11:22:08 +0000 (04:22 -0700)]
combine setRectFan and mapRect

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

Review-Url: https://codereview.chromium.org/2276603002

7 years agoFix generic color space xform, ColorSpaceXformTest
msarett [Wed, 24 Aug 2016 00:53:06 +0000 (17:53 -0700)]
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

7 years agoMake singleton SkColorSpaces thread safe
msarett [Tue, 23 Aug 2016 21:36:20 +0000 (14:36 -0700)]
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

7 years agoRemove SkPixelRef::getTexture()
bsalomon [Tue, 23 Aug 2016 21:02:54 +0000 (14:02 -0700)]
Remove SkPixelRef::getTexture()
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2264293003

Review-Url: https://codereview.chromium.org/2264293003

7 years agoGN: extract optional() as a template and use for giflib-dependent code
mtklein [Tue, 23 Aug 2016 20:56:37 +0000 (13:56 -0700)]
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

7 years agoGN: Fix up Ganesh native interface hooks.
mtklein [Tue, 23 Aug 2016 20:35:28 +0000 (13:35 -0700)]
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

7 years agoSkip non-AA intersect rects in GrReducedClip
csmartdalton [Tue, 23 Aug 2016 20:26:40 +0000 (13:26 -0700)]
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

7 years agoSkScalerContextRec::computeMatrices to return status.
bungeman [Tue, 23 Aug 2016 20:19:01 +0000 (13:19 -0700)]
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

7 years agoAssume all TURBO_HAS_* are true.
mtklein [Tue, 23 Aug 2016 18:49:29 +0000 (11:49 -0700)]
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

7 years agoMoving SkBlurImageFilter into core
vjiaoblack [Tue, 23 Aug 2016 18:13:14 +0000 (11:13 -0700)]
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

7 years agoCMake: require libjpeg-turbo, not libjpeg
mtklein [Tue, 23 Aug 2016 18:01:33 +0000 (11:01 -0700)]
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

7 years agoexperimental/tools/mskp_parser.py
halcanary [Tue, 23 Aug 2016 17:32:53 +0000 (10:32 -0700)]
experimental/tools/mskp_parser.py

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

Review-Url: https://codereview.chromium.org/2268403003

7 years agoRevert of Moving SkBlurImageFilter into core (patchset #9 id:160001 of https://codere...
bungeman [Tue, 23 Aug 2016 17:04:53 +0000 (10:04 -0700)]
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

7 years agofix conic path fuzz
caryclark [Tue, 23 Aug 2016 16:41:00 +0000 (09:41 -0700)]
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

7 years agoSkMultiSKP: version 2
halcanary [Tue, 23 Aug 2016 16:15:04 +0000 (09:15 -0700)]
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

7 years agoSkPDF: PDFDevice cleanup.
halcanary [Tue, 23 Aug 2016 16:02:12 +0000 (09:02 -0700)]
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

7 years agof16<->f32 ftz is an optional thing for speed.
mtklein [Tue, 23 Aug 2016 15:58:12 +0000 (08:58 -0700)]
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

7 years agoMoving SkBlurImageFilter into core
vjiaoblack [Tue, 23 Aug 2016 14:50:52 +0000 (07:50 -0700)]
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

7 years agofix pathops fuzz
caryclark [Tue, 23 Aug 2016 14:38:48 +0000 (07:38 -0700)]
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

7 years agoGN: make libwebp an optional dependency
mtklein [Tue, 23 Aug 2016 14:38:09 +0000 (07:38 -0700)]
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

7 years agoReduce window rectangles cap to 8
csmartdalton [Tue, 23 Aug 2016 13:51:00 +0000 (06:51 -0700)]
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