platform/upstream/libSkiaSharp.git
8 years agoMerge building of program desc in Vulkan into one step
egdaniel [Wed, 7 Sep 2016 18:56:59 +0000 (11:56 -0700)]
Merge building of program desc in Vulkan into one step

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

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

8 years agoRevert of Add GM/slide to simulate Android-style reveal clip (patchset #6 id:100001...
robertphillips [Wed, 7 Sep 2016 18:34:05 +0000 (11:34 -0700)]
Revert of Add GM/slide to simulate Android-style reveal clip (patchset #6 id:100001 of https://codereview.chromium.org/2316593003/ )

Reason for revert:
Shader compilation failure

Original issue's description:
> Add GM/slide to simulate Android-style reveal clip
>
> Hopefully, this will let us play w/ geometric and shader-based solutions.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2316593003
>
> Committed: https://skia.googlesource.com/skia/+/ffac5c4aae18fc706e4077763c190a89c8507fb0

TBR=jvanverth@google.com,djsollen@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoAdd minimal support for readPixels in raster F16
brianosman [Wed, 7 Sep 2016 18:30:47 +0000 (11:30 -0700)]
Add minimal support for readPixels in raster F16

Still doesn't support doing premul <-> unpremul conversions, but handles
the simple cases (which would previously always fail). Fixes the new gamut
gm (partially) in f16 config.

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

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

8 years agoUse demux API in SkWebpCodec
msarett [Wed, 7 Sep 2016 18:23:28 +0000 (11:23 -0700)]
Use demux API in SkWebpCodec

* Necessary to read ICC profiles
* Will be necessary to implement animation
* Requires consolidated data with length

Doesn't affect decode performance (thought I believe
our performance tests only cover SkStreams with memory
bases).

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

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

8 years agoAdd GM/slide to simulate Android-style reveal clip
robertphillips [Wed, 7 Sep 2016 17:34:06 +0000 (10:34 -0700)]
Add GM/slide to simulate Android-style reveal clip

Hopefully, this will let us play w/ geometric and shader-based solutions.

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

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

8 years agoRestructure flushing relationship between GrContext, GrDrawingManager, and GrResource...
bsalomon [Wed, 7 Sep 2016 17:02:04 +0000 (10:02 -0700)]
Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.

Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.

Removes the unused and untested discard flush variation.

Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.

Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
flush that just occurred.

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

Committed: https://skia.googlesource.com/skia/+/1dbb207babecdae8f1f74ed9d9900c73064df744
Review-Url: https://codereview.chromium.org/2307053002

8 years agoSkPDF: remove unused fallback clipping code
halcanary [Wed, 7 Sep 2016 16:05:25 +0000 (09:05 -0700)]
SkPDF: remove unused fallback clipping code

This code is untested and unnecessary.

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

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

8 years agoRun install-sysroot script before 'gn gen' on PDFium bot
borenet [Wed, 7 Sep 2016 15:34:13 +0000 (08:34 -0700)]
Run install-sysroot script before 'gn gen' on PDFium bot

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

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

8 years agoRevert of Make AALinearizingConvexPathRenderer able to handle stroke and fill (patchs...
robertphillips [Wed, 7 Sep 2016 15:29:08 +0000 (08:29 -0700)]
Revert of Make AALinearizingConvexPathRenderer able to handle stroke and fill (patchset #7 id:120001 of https://codereview.chromium.org/2301353004/ )

Reason for revert:
Image quality issues on Android devices

Original issue's description:
> Make AALinearizingConvexPathRenderer able to handle stroke and fill
>
> This is intended to catch stroke-and-fill convex paths with potentially small stroke widths (e.g., .1).
>
> It does have the disconcerting side effect of changing bevel-joined stroke-and-filled degenerate-single-line-rects into plain rects (w/o triangular end-caps).
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2301353004
>
> Committed: https://skia.googlesource.com/skia/+/522bcd99fa65a8abd130880f59b500cf367d0845

TBR=ethannicholas@google.com,jvanverth@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agofix pathops fuzzers
caryclark [Wed, 7 Sep 2016 15:21:09 +0000 (08:21 -0700)]
fix pathops fuzzers

Extreme values trigger asserts that in range
values allow.

Disable asserts and other tests to prevent
extreme values from crashing.

TBR=reed@google.com
BUG=644684. 644680, 644640
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2316173002

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

8 years agoAdd color gamut xform helpers to GrGLSLShaderBuilder
brianosman [Wed, 7 Sep 2016 15:09:10 +0000 (08:09 -0700)]
Add color gamut xform helpers to GrGLSLShaderBuilder

New helper functions inject the necessary shader
function. Texture lookup functions can now insert
the gamut xform at the appropriate place, too.

As written, could be used to transform non-texture
colors (e.g. vertex colors) as well.

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

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

8 years agoGN: fontmgr_custom
mtklein [Wed, 7 Sep 2016 14:52:55 +0000 (07:52 -0700)]
GN: fontmgr_custom

This makes skia_use_fontconfig=false build on Linux.  Instead of using
fontconfig it looks in /usr/share/fonts.

That alone is a nice feature to have, but it's mostly relevant for MSAN,
where we can't link against any uninstrumented system libraries.

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

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

8 years agomade point light shadows
vjiaoblack [Wed, 7 Sep 2016 14:48:12 +0000 (07:48 -0700)]
made point light shadows

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

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

8 years agoMerge GrGLSLProgramDesc into GrProgramDesc
egdaniel [Wed, 7 Sep 2016 14:24:12 +0000 (07:24 -0700)]
Merge GrGLSLProgramDesc into GrProgramDesc

BUG=skia:

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

8 years agoAdd gammaIsLinear() API to SkColorSpace
msarett [Wed, 7 Sep 2016 14:13:27 +0000 (07:13 -0700)]
Add gammaIsLinear() API to SkColorSpace

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

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

8 years agoAdd 6p to other device mapping
kjlubick [Wed, 7 Sep 2016 14:08:52 +0000 (07:08 -0700)]
Add 6p to other device mapping

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

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

8 years agoNew gamut GM, to test gamut conversion in various code-paths
brianosman [Wed, 7 Sep 2016 14:04:44 +0000 (07:04 -0700)]
New gamut GM, to test gamut conversion in various code-paths

After several different strategies, this one appears to work
well. The basic test:

1) For a variety of drawing techniques, we render fixed size
   rectangles. (Solid colors via paint color, bitmap, etc...)
2) For each method in #1, we render to both an sRGB and
   WideGamutRGB offscreen surface. (AdobeRGB isn't wide enough
   to clearly demonstrate if things are working or not).
3) Use readPixels to fetch the raw (still in wide gamut) pixel
   data, then draw that directly to the final canvas.

So, for each pair of squares, they should look clearly
different. Currently, with the GPU backend, only the bicubic
bitmap paths have that behavior. Adding more test cases (and
fixing the ones that are already incorrect) will be the long
tail of gamut transformation.

Current output (with my other patchset, which fixes all
bitmap draws): https://screenshot.googleplex.com/wsL3x7eCtWE.png

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

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

8 years agodocs: Add instructions on how to download isolated intermediaries.
jcgregorio [Wed, 7 Sep 2016 13:23:44 +0000 (06:23 -0700)]
docs: Add instructions on how to download isolated intermediaries.

Screenshot:
  https://screenshot.googleplex.com/2cXAQMqypHv.png

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2316113002
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=2316113002

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

8 years agoMake AALinearizingConvexPathRenderer able to handle stroke and fill
robertphillips [Wed, 7 Sep 2016 13:03:48 +0000 (06:03 -0700)]
Make AALinearizingConvexPathRenderer able to handle stroke and fill

This is intended to catch stroke-and-fill convex paths with potentially small stroke widths (e.g., .1).

It does have the disconcerting side effect of changing bevel-joined stroke-and-filled degenerate-single-line-rects into plain rects (w/o triangular end-caps).

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

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

8 years agoGN: turn off ccache
mtklein [Wed, 7 Sep 2016 12:12:34 +0000 (05:12 -0700)]
GN: turn off ccache

I just burned 2 days debugging a confusing interaction between ccache
and the -fsanitize-blacklist argument to Clang.  Let's see if we can
live without ccache (swarming affinity + Ninja seems pretty decent).

As a point of reference, the Mac bots have been looking for ccache but
failing to find it.  They're proof this will be fine.

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

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

8 years agoreconfigure dont-clip-to-layer gm to not have transparent pixels in its final output
reed [Tue, 6 Sep 2016 21:57:00 +0000 (14:57 -0700)]
reconfigure dont-clip-to-layer gm to not have transparent pixels in its final output

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

TBR=

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

8 years agoRevert of More robust check for sRGB gamma tables (patchset #2 id:60001 of https...
msarett [Tue, 6 Sep 2016 21:41:42 +0000 (14:41 -0700)]
Revert of More robust check for sRGB gamma tables (patchset #2 id:60001 of https://codereview.chromium.org/2263233003/ )

Reason for revert:
From the previous commit message:
"This check is not fast.  If we find that it doesn't help
us recognize sRGB curves, we should delete it."

Turns out it doesn't help.  Looks to me like the tables are not sRGB.

Original issue's description:
> 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
>
> Committed: https://skia.googlesource.com/skia/+/4ff08df15a8042cdb4fc90a82e1044847d0de300

TBR=mtklein@google.com,brianosman@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:5656

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

8 years ago[SVGDevice] Observe even-odd path fills
fmalita [Tue, 6 Sep 2016 21:37:02 +0000 (14:37 -0700)]
[SVGDevice] Observe even-odd path fills

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

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

8 years agoAdd Vulkan docs
bsalomon [Tue, 6 Sep 2016 21:18:13 +0000 (14:18 -0700)]
Add Vulkan docs

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2318603002
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=2318603002

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

8 years agoRevert of Restructure flushing relationship between GrContext, GrDrawingManager,...
bsalomon [Tue, 6 Sep 2016 20:49:32 +0000 (13:49 -0700)]
Revert of Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache. (patchset #4 id:60001 of https://codereview.chromium.org/2307053002/ )

Reason for revert:
Causing assertions on bots

Original issue's description:
> Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.
>
> Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.
>
> Removes the unused and untested discard flush variation.
>
> Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.
>
> Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
> flush that just occurred.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002
>
> Committed: https://skia.googlesource.com/skia/+/1dbb207babecdae8f1f74ed9d9900c73064df744

TBR=robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agoRevert of fix uninit immediate mode member var in GrDrawingManager (patchset #1 id...
bsalomon [Tue, 6 Sep 2016 20:48:41 +0000 (13:48 -0700)]
Revert of fix uninit immediate mode member var in GrDrawingManager (patchset #1 id:1 of https://codereview.chromium.org/2312333002/ )

Reason for revert:
Reverting in order to revert earlier CL

Original issue's description:
> fix uninit immediate mode member var in GrDrawingManager
>
> TBR=robertphillips@google.com
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2312333002
>
> NOTRY=true
>
> Committed: https://skia.googlesource.com/skia/+/ce3b852529ad1f026aad3976f3213c8943554ba2

TBR=robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

8 years agofix uninit immediate mode member var in GrDrawingManager
bsalomon [Tue, 6 Sep 2016 20:20:19 +0000 (13:20 -0700)]
fix uninit immediate mode member var in GrDrawingManager

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

NOTRY=true

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

8 years agoadded radial lights to SkLights
vjiaoblack [Tue, 6 Sep 2016 20:03:30 +0000 (13:03 -0700)]
added radial lights to SkLights

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

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

8 years agoMove uils and sksl to a common sources GYP file.
brettw [Tue, 6 Sep 2016 19:43:55 +0000 (12:43 -0700)]
Move uils and sksl to a common sources GYP file.

This is for the coalescing of sources in one GYP file to improve GN runtime. If
this is successful, the other sources lists will also be merged into this one
file.

Inlines "../src" and "../include" for skia_source_dir and skia_include_dir. Evaluating these with GYP's variable expansion is annoying since I think another layer of nesting is required. Coding these explicitly is also more clear. This used to be required because Chromium would reference these .gypi files directly with a different path, but this no longer happens.

Removes the chromium defines gypi which is no longer referenced.

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

Committed: https://skia.googlesource.com/skia/+/39f7a10a04a914384944d8bf62621144ac4eeaa3
Review-Url: https://codereview.chromium.org/2302723005

8 years agoRestructure flushing relationship between GrContext, GrDrawingManager, and GrResource...
bsalomon [Tue, 6 Sep 2016 19:38:00 +0000 (12:38 -0700)]
Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.

Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.

Removes the unused and untested discard flush variation.

Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.

Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
flush that just occurred.

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

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

8 years agokNumWindows is only used in GPU builds
mtklein [Tue, 6 Sep 2016 18:45:31 +0000 (11:45 -0700)]
kNumWindows is only used in GPU builds

TBR=csmartdalton@google.com

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

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot

Committed: https://skia.googlesource.com/skia/+/af92a7f85a5fc774838910444a9f2cddc3e43a2c
Review-Url: https://codereview.chromium.org/2305923004

8 years agocheck for null-layer-paint after prev fix to savelayer ops
reed [Tue, 6 Sep 2016 17:16:47 +0000 (10:16 -0700)]
check for null-layer-paint after prev fix to savelayer ops

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

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

8 years agoDelete SkColorSpace::kUnknown_Named, remove fNamed field
msarett [Tue, 6 Sep 2016 17:01:48 +0000 (10:01 -0700)]
Delete SkColorSpace::kUnknown_Named, remove fNamed field

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

Committed: https://skia.googlesource.com/skia/+/54682e856cb66c653bc7e253981a421a2618398e
Review-Url: https://codereview.chromium.org/2302413002

8 years agoImprove usage of window rectangles
csmartdalton [Tue, 6 Sep 2016 17:01:06 +0000 (10:01 -0700)]
Improve usage of window rectangles

* Skips non-AA diff rect elements and replaces them with window
  rectangles.
* Places window rectangles in the interiors of antialiased diff rects.
* Arranges two overlapping window rectangles in a plus shape inside of
  diff rounded rects.
* Enables window rectangles when clearing and generating clip masks.

GTX 960 perf result (with vs. without window rectangles):

                              glinst4                msaa16                 gpu
keymobi_pinterest.skp         0.48 -> 0.17 [ 35%]    2.77 -> 1.49 [ 54%]    0.22 -> 0.16 [ 70%]
keymobi_digg_com.skp          0.42 -> 0.23 [ 55%]    2.34 -> 1.08 [ 46%]    0.25 -> 0.21 [ 83%]
desk_jsfiddlebigcar.skp       0.28 -> 0.16 [ 59%]    1.70 -> 0.96 [ 57%]    0.19 -> 0.14 [ 70%]
top25desk_wordpress.skp       0.45 -> 0.18 [ 40%]    2.78 -> 1.53 [ 55%]    0.21 -> 0.19 [ 94%]
top25desk_weather_com.skp     2.01 -> 1.93 [ 96%]    23.5 -> 2.54 [ 11%]    1.90 -> 1.68 [ 88%]
keymobi_blogger.skp           0.57 -> 0.37 [ 65%]    2.87 -> 1.54 [ 54%]    0.43 -> 0.33 [ 77%]
keymobi_linkedin.skp          0.32 -> 0.17 [ 51%]    1.93 -> 1.04 [ 54%]    0.17 -> 0.15 [ 91%]
keymobi_bing_com_search_...   0.29 -> 0.25 [ 83%]    1.85 -> 1.23 [ 66%]    0.50 -> 0.24 [ 48%]
keymobi_theverge_com_201...   1.00 -> 0.67 [ 68%]    9.46 -> 3.84 [ 41%]    0.72 -> 0.65 [ 90%]
keymobi_sfgate_com_.skp       1.56 -> 1.13 [ 72%]    4.49 -> 2.86 [ 64%]    1.54 -> 1.11 [ 72%]
...
GEOMEAN (All 79 blink skps)   1.04 -> 0.90 [ 86%]    4.22 -> 2.81 [ 67%]    0.95 -> 0.89 [ 94%]

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

Committed: https://skia.googlesource.com/skia/+/db42be9a326c747ff92ed1da8c3536c5b3e8e22b
Review-Url: https://codereview.chromium.org/2289363005

8 years agoWork around VS 2015 Update 3 optimizer internal compiler error
brucedawson [Tue, 6 Sep 2016 16:54:44 +0000 (09:54 -0700)]
Work around VS 2015 Update 3 optimizer internal compiler error

VS 2015 Update 3 comes with a fancy new optimizer and this optimizer
causes an internal compiler error on one skia function. This change
works around the bug by disabling optimize-for-time for that function.

Other options would be to add /d2SSAOptimizer- to the command-line for
the file or project but that would *require* Update 3 which is not yet
desirable.

VS bug report is here:
https://connect.microsoft.com/VisualStudio/feedback/details/3100520
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2308833002

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

8 years agoSkDocument: turn off SK_SUPPORT_LEGACY_DOCUMENT_API
halcanary [Tue, 6 Sep 2016 16:32:13 +0000 (09:32 -0700)]
SkDocument: turn off SK_SUPPORT_LEGACY_DOCUMENT_API

no one seems to be using it.

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

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

8 years agotest dont-clip-layer
reed [Tue, 6 Sep 2016 16:06:18 +0000 (09:06 -0700)]
test dont-clip-layer

depends on fix from https://codereview.chromium.org/2309623002/

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

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

8 years agoprovide safe exit for runaway intersections
caryclark [Tue, 6 Sep 2016 16:05:54 +0000 (09:05 -0700)]
provide safe exit for runaway intersections

Curve intersections with extreme numbers may
cause the intersection template code to loop
forever. Detect this by looking for
marking more spans gone than exist, and
return without any intersections found.

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

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

8 years agocompare degenerates with tolerance
caryclark [Tue, 6 Sep 2016 15:54:10 +0000 (08:54 -0700)]
compare degenerates with tolerance

Conics with very large w values can
be approximated with two straight lines.

This avoids iterating endlessly in an
attempt to create quadratics with unstable
numerics.

Check to see if the first chop generated
a pair of lines within the default
point comparison tolerance.

R=reed@google.com
BUG=643933, 643665
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2312923002

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

8 years agoUpdate Windows build to use VULKAN_SDK rather than VK_SDK_PATH
bsalomon [Tue, 6 Sep 2016 15:40:51 +0000 (08:40 -0700)]
Update Windows build to use VULKAN_SDK rather than VK_SDK_PATH

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

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

8 years agoAdd device mapping for Nexus 6p (angler)
kjlubick [Tue, 6 Sep 2016 14:39:30 +0000 (07:39 -0700)]
Add device mapping for Nexus 6p (angler)

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

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

8 years agoRevert of Improve usage of window rectangles (patchset #9 id:160001 of https://codere...
caryclark [Tue, 6 Sep 2016 14:09:53 +0000 (07:09 -0700)]
Revert of Improve usage of window rectangles (patchset #9 id:160001 of https://codereview.chromium.org/2289363005/ )

Reason for revert:
broke build. See

https://build.chromium.org/p/client.skia/builders/Perf-Win8-MSVC-ShuttleA-GPU-GTX960-x86_64-Debug/builds/186

Original issue's description:
> Improve usage of window rectangles
>
> * Skips non-AA diff rect elements and replaces them with window
>   rectangles.
> * Places window rectangles in the interiors of antialiased diff rects.
> * Arranges two overlapping window rectangles in a plus shape inside of
>   diff rounded rects.
> * Enables window rectangles when clearing and generating clip masks.
>
> GTX 960 perf result (with vs. without window rectangles):
>
>                               glinst4                msaa16                 gpu
> keymobi_pinterest.skp         0.48 -> 0.17 [ 35%]    2.77 -> 1.49 [ 54%]    0.22 -> 0.16 [ 70%]
> keymobi_digg_com.skp          0.42 -> 0.23 [ 55%]    2.34 -> 1.08 [ 46%]    0.25 -> 0.21 [ 83%]
> desk_jsfiddlebigcar.skp       0.28 -> 0.16 [ 59%]    1.70 -> 0.96 [ 57%]    0.19 -> 0.14 [ 70%]
> top25desk_wordpress.skp       0.45 -> 0.18 [ 40%]    2.78 -> 1.53 [ 55%]    0.21 -> 0.19 [ 94%]
> top25desk_weather_com.skp     2.01 -> 1.93 [ 96%]    23.5 -> 2.54 [ 11%]    1.90 -> 1.68 [ 88%]
> keymobi_blogger.skp           0.57 -> 0.37 [ 65%]    2.87 -> 1.54 [ 54%]    0.43 -> 0.33 [ 77%]
> keymobi_linkedin.skp          0.32 -> 0.17 [ 51%]    1.93 -> 1.04 [ 54%]    0.17 -> 0.15 [ 91%]
> keymobi_bing_com_search_...   0.29 -> 0.25 [ 83%]    1.85 -> 1.23 [ 66%]    0.50 -> 0.24 [ 48%]
> keymobi_theverge_com_201...   1.00 -> 0.67 [ 68%]    9.46 -> 3.84 [ 41%]    0.72 -> 0.65 [ 90%]
> keymobi_sfgate_com_.skp       1.56 -> 1.13 [ 72%]    4.49 -> 2.86 [ 64%]    1.54 -> 1.11 [ 72%]
> keymobi_ftw_usatoday_com...   0.59 -> 0.34 [ 57%]    2.80 -> 1.54 [ 55%]    1.21 -> 1.20 [ 99%]
> keymobi_shop_mobileweb_e...   0.46 -> 0.32 [ 70%]    2.60 -> 1.26 [ 48%]    0.35 -> 0.34 [ 97%]
> keymobi_cnn_com.skp           0.68 -> 0.42 [ 63%]    3.40 -> 2.10 [ 62%]    0.49 -> 0.45 [ 93%]
> keymobi_plus_google_com_...   0.77 -> 0.46 [ 60%]    4.83 -> 3.56 [ 74%]    0.52 -> 0.46 [ 89%]
> keymobi_wordpress.skp         0.50 -> 0.40 [ 81%]    2.60 -> 1.31 [ 50%]    0.40 -> 0.37 [ 91%]
> keymobi_androidpolice_co...   0.84 -> 0.73 [ 87%]    4.15 -> 2.05 [ 49%]    0.77 -> 0.67 [ 87%]
> keymobi_online_wsj_com_h...   0.55 -> 0.43 [ 78%]    2.91 -> 1.66 [ 57%]    0.45 -> 0.41 [ 90%]
> keymobi_iphone_capitolvo...   1.18 -> 0.96 [ 81%]    6.26 -> 4.96 [ 79%]    0.95 -> 0.92 [ 97%]
> keymobi_wikipedia__1_tab...   0.46 -> 0.41 [ 89%]    2.51 -> 1.24 [ 49%]    0.40 -> 0.38 [ 95%]
> keymobi_wikipedia__1_tab...   0.46 -> 0.42 [ 90%]    2.52 -> 1.25 [ 50%]    0.40 -> 0.38 [ 96%]
> keymobi_boingboing_net.skp    0.62 -> 0.56 [ 90%]    3.15 -> 1.80 [ 57%]    0.61 -> 0.56 [ 92%]
> keymobi_cnn_com_2012_10_...   0.86 -> 0.82 [ 95%]    2.81 -> 1.50 [ 53%]    0.91 -> 0.83 [ 91%]
> top25desk_techcrunch_com...   0.61 -> 0.56 [ 92%]    3.03 -> 1.76 [ 58%]    0.62 -> 0.56 [ 91%]
> top25desk_ebay_com.skp        1.18 -> 1.08 [ 92%]    2.23 -> 1.24 [ 56%]    1.14 -> 1.09 [ 96%]
> desk_css3gradients.skp        0.64 -> 0.61 [ 95%]    2.99 -> 1.54 [ 52%]    0.62 -> 0.61 [ 99%]
> top25desk_blogger.skp         0.61 -> 0.59 [ 96%]    2.50 -> 1.37 [ 55%]    0.60 -> 0.57 [ 95%]
> keymobi_nytimes_com_.skp      0.65 -> 0.64 [ 98%]    2.69 -> 1.42 [ 53%]    0.62 -> 0.59 [ 96%]
> keymobi_wowwiki_com_worl...   0.99 -> 0.92 [ 92%]    3.46 -> 2.06 [ 60%]    0.98 -> 0.95 [ 96%]
> keymobi_cuteoverload_com...   1.37 -> 1.26 [ 92%]    3.24 -> 2.45 [ 76%]    1.38 -> 1.35 [ 98%]
> keymobi_mobile_news_sand...   0.88 -> 0.81 [ 93%]    3.50 -> 2.07 [ 59%]    0.82 -> 0.81 [100%]
> top25desk_linkedin.skp        0.87 -> 0.87 [100%]    2.92 -> 1.73 [ 59%]    0.94 -> 0.86 [ 91%]
> top25desk_docs___1_open_...   1.43 -> 1.36 [ 95%]    1.87 -> 1.42 [ 76%]    0.73 -> 0.66 [ 91%]
> keymobi_reddit_com_r_pro...   0.68 -> 0.66 [ 96%]    2.49 -> 1.23 [ 49%]    0.65 -> 0.66 [102%]
> ...
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2289363005
>
> Committed: https://skia.googlesource.com/skia/+/db42be9a326c747ff92ed1da8c3536c5b3e8e22b

TBR=bsalomon@google.com,egdaniel@google.com,robertphillips@google.com,csmartdalton@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

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

8 years agoRevert of Move uils and sksl to a common sources GYP file. (patchset #1 id:1 of https...
caryclark [Tue, 6 Sep 2016 14:07:52 +0000 (07:07 -0700)]
Revert of Move uils and sksl to a common sources GYP file. (patchset #1 id:1 of https://codereview.chromium.org/2302723005/ )

Reason for revert:
The broke the PDFium build. See

https://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-x86_64-Release-PDFium/builds/2094

Original issue's description:
> Move uils and sksl to a common sources GYP file.
>
> This is for the coalescing of sources in one GYP file to improve GN runtime. If
> this is successful, the other sources lists will also be merged into this one
> file.
>
> Inlines "../src" and "../include" for skia_source_dir and skia_include_dir. Evaluating these with GYP's variable expansion is annoying since I think another layer of nesting is required. Coding these explicitly is also more clear. This used to be required because Chromium would reference these .gypi files directly with a different path, but this no longer happens.
>
> Removes the chromium defines gypi which is no longer referenced.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302723005
>
> Committed: https://skia.googlesource.com/skia/+/39f7a10a04a914384944d8bf62621144ac4eeaa3

TBR=mtklein@chromium.org,brettw@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

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

8 years agotest picture-ops for savelayer
reed [Tue, 6 Sep 2016 13:54:41 +0000 (06:54 -0700)]
test picture-ops for savelayer

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

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

8 years agointerpolation of coincidence must be local to a single span
caryclark [Tue, 6 Sep 2016 12:59:47 +0000 (05:59 -0700)]
interpolation of coincidence must be local to a single span

Pathops makes up intersections that it doesn't detect directly,
but do exist. For instance, if a is coincident with b, and
b is coincident with c, then for where they overlap
a is coincident with c.

The intersections are made up in different ways. In a few
places, the t values that are detected are interpolated to
guess the t values that represent invented intersections.

The interpolated t is not necessarily linear, but a linear
guess is good enough if the invented t lies between known
t values.

Additionally, improve debugging.

This passes the extended release test suite and additionally
passes the first 17 levels in the tiger test suite;
previously, path ops passed 7 levels.

The tiger suite is composed of 37 levels in increasing
complexity, described by about 300K tests.

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

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

8 years agoAdd a makeDrawContextWithFallback that handles config fallback
robertphillips [Tue, 6 Sep 2016 12:20:20 +0000 (05:20 -0700)]
Add a makeDrawContextWithFallback that handles config fallback

This fixes a bug in find_or_create_rrect_blur_mask where an A8-based drawContext was desired but creation was failing b.c. A8 wasn't renderable.

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

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

8 years agoDelete kInvalid_GammaNamed (part 2)
msarett [Mon, 5 Sep 2016 17:33:12 +0000 (10:33 -0700)]
Delete kInvalid_GammaNamed (part 2)

We are done using this for UMA.

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

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

8 years agoRevert of Delete SkColorSpace::kUnknown_Named, remove fNamed field (patchset #1 id...
mgiuca [Mon, 5 Sep 2016 11:58:55 +0000 (04:58 -0700)]
Revert of Delete SkColorSpace::kUnknown_Named, remove fNamed field (patchset #1 id:20001 of https://codereview.chromium.org/2302413002/ )

Reason for revert:
This CL introduced two static initializers (gAdobeRGB and gSRGB) which are causing a sizes regression on Chromium builders:

https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/24981

Original issue's description:
> Delete SkColorSpace::kUnknown_Named, remove fNamed field
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302413002
>
> Committed: https://skia.googlesource.com/skia/+/54682e856cb66c653bc7e253981a421a2618398e

TBR=reed@google.com,brianosman@google.com,msarett@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:5724

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

8 years agoUpdate SKP version
update-skps [Sun, 4 Sep 2016 09:15:51 +0000 (02:15 -0700)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

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

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

8 years agokNumWindows is only used in GPU builds
mtklein [Sat, 3 Sep 2016 13:17:13 +0000 (06:17 -0700)]
kNumWindows is only used in GPU builds

TBR=csmartdalton@google.com

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

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot

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

8 years agoDelete SkColorSpace::kUnknown_Named, remove fNamed field
msarett [Fri, 2 Sep 2016 21:25:06 +0000 (14:25 -0700)]
Delete SkColorSpace::kUnknown_Named, remove fNamed field

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

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

8 years agoMove uils and sksl to a common sources GYP file.
brettw [Fri, 2 Sep 2016 21:01:07 +0000 (14:01 -0700)]
Move uils and sksl to a common sources GYP file.

This is for the coalescing of sources in one GYP file to improve GN runtime. If
this is successful, the other sources lists will also be merged into this one
file.

Inlines "../src" and "../include" for skia_source_dir and skia_include_dir. Evaluating these with GYP's variable expansion is annoying since I think another layer of nesting is required. Coding these explicitly is also more clear. This used to be required because Chromium would reference these .gypi files directly with a different path, but this no longer happens.

Removes the chromium defines gypi which is no longer referenced.

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

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

8 years agopdfium: Fix the pdfium builder.
jcgregorio [Fri, 2 Sep 2016 19:36:05 +0000 (12:36 -0700)]
pdfium: Fix the pdfium builder.

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

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

8 years ago[task scheduler] Fix CIPD package versions
borenet [Fri, 2 Sep 2016 19:16:56 +0000 (12:16 -0700)]
[task scheduler] Fix CIPD package versions

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

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

8 years agoremove unused SkDevice::setMatrixClip
reed [Fri, 2 Sep 2016 19:10:07 +0000 (12:10 -0700)]
remove unused SkDevice::setMatrixClip

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

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

8 years agoImprove usage of window rectangles
csmartdalton [Fri, 2 Sep 2016 18:36:25 +0000 (11:36 -0700)]
Improve usage of window rectangles

* Skips non-AA diff rect elements and replaces them with window
  rectangles.
* Places window rectangles in the interiors of antialiased diff rects.
* Arranges two overlapping window rectangles in a plus shape inside of
  diff rounded rects.
* Enables window rectangles when clearing and generating clip masks.

GTX 960 perf result (with vs. without window rectangles):

                              glinst4                msaa16                 gpu
keymobi_pinterest.skp         0.48 -> 0.17 [ 35%]    2.77 -> 1.49 [ 54%]    0.22 -> 0.16 [ 70%]
keymobi_digg_com.skp          0.42 -> 0.23 [ 55%]    2.34 -> 1.08 [ 46%]    0.25 -> 0.21 [ 83%]
desk_jsfiddlebigcar.skp       0.28 -> 0.16 [ 59%]    1.70 -> 0.96 [ 57%]    0.19 -> 0.14 [ 70%]
top25desk_wordpress.skp       0.45 -> 0.18 [ 40%]    2.78 -> 1.53 [ 55%]    0.21 -> 0.19 [ 94%]
top25desk_weather_com.skp     2.01 -> 1.93 [ 96%]    23.5 -> 2.54 [ 11%]    1.90 -> 1.68 [ 88%]
keymobi_blogger.skp           0.57 -> 0.37 [ 65%]    2.87 -> 1.54 [ 54%]    0.43 -> 0.33 [ 77%]
keymobi_linkedin.skp          0.32 -> 0.17 [ 51%]    1.93 -> 1.04 [ 54%]    0.17 -> 0.15 [ 91%]
keymobi_bing_com_search_...   0.29 -> 0.25 [ 83%]    1.85 -> 1.23 [ 66%]    0.50 -> 0.24 [ 48%]
keymobi_theverge_com_201...   1.00 -> 0.67 [ 68%]    9.46 -> 3.84 [ 41%]    0.72 -> 0.65 [ 90%]
keymobi_sfgate_com_.skp       1.56 -> 1.13 [ 72%]    4.49 -> 2.86 [ 64%]    1.54 -> 1.11 [ 72%]
keymobi_ftw_usatoday_com...   0.59 -> 0.34 [ 57%]    2.80 -> 1.54 [ 55%]    1.21 -> 1.20 [ 99%]
keymobi_shop_mobileweb_e...   0.46 -> 0.32 [ 70%]    2.60 -> 1.26 [ 48%]    0.35 -> 0.34 [ 97%]
keymobi_cnn_com.skp           0.68 -> 0.42 [ 63%]    3.40 -> 2.10 [ 62%]    0.49 -> 0.45 [ 93%]
keymobi_plus_google_com_...   0.77 -> 0.46 [ 60%]    4.83 -> 3.56 [ 74%]    0.52 -> 0.46 [ 89%]
keymobi_wordpress.skp         0.50 -> 0.40 [ 81%]    2.60 -> 1.31 [ 50%]    0.40 -> 0.37 [ 91%]
keymobi_androidpolice_co...   0.84 -> 0.73 [ 87%]    4.15 -> 2.05 [ 49%]    0.77 -> 0.67 [ 87%]
keymobi_online_wsj_com_h...   0.55 -> 0.43 [ 78%]    2.91 -> 1.66 [ 57%]    0.45 -> 0.41 [ 90%]
keymobi_iphone_capitolvo...   1.18 -> 0.96 [ 81%]    6.26 -> 4.96 [ 79%]    0.95 -> 0.92 [ 97%]
keymobi_wikipedia__1_tab...   0.46 -> 0.41 [ 89%]    2.51 -> 1.24 [ 49%]    0.40 -> 0.38 [ 95%]
keymobi_wikipedia__1_tab...   0.46 -> 0.42 [ 90%]    2.52 -> 1.25 [ 50%]    0.40 -> 0.38 [ 96%]
keymobi_boingboing_net.skp    0.62 -> 0.56 [ 90%]    3.15 -> 1.80 [ 57%]    0.61 -> 0.56 [ 92%]
keymobi_cnn_com_2012_10_...   0.86 -> 0.82 [ 95%]    2.81 -> 1.50 [ 53%]    0.91 -> 0.83 [ 91%]
top25desk_techcrunch_com...   0.61 -> 0.56 [ 92%]    3.03 -> 1.76 [ 58%]    0.62 -> 0.56 [ 91%]
top25desk_ebay_com.skp        1.18 -> 1.08 [ 92%]    2.23 -> 1.24 [ 56%]    1.14 -> 1.09 [ 96%]
desk_css3gradients.skp        0.64 -> 0.61 [ 95%]    2.99 -> 1.54 [ 52%]    0.62 -> 0.61 [ 99%]
top25desk_blogger.skp         0.61 -> 0.59 [ 96%]    2.50 -> 1.37 [ 55%]    0.60 -> 0.57 [ 95%]
keymobi_nytimes_com_.skp      0.65 -> 0.64 [ 98%]    2.69 -> 1.42 [ 53%]    0.62 -> 0.59 [ 96%]
keymobi_wowwiki_com_worl...   0.99 -> 0.92 [ 92%]    3.46 -> 2.06 [ 60%]    0.98 -> 0.95 [ 96%]
keymobi_cuteoverload_com...   1.37 -> 1.26 [ 92%]    3.24 -> 2.45 [ 76%]    1.38 -> 1.35 [ 98%]
keymobi_mobile_news_sand...   0.88 -> 0.81 [ 93%]    3.50 -> 2.07 [ 59%]    0.82 -> 0.81 [100%]
top25desk_linkedin.skp        0.87 -> 0.87 [100%]    2.92 -> 1.73 [ 59%]    0.94 -> 0.86 [ 91%]
top25desk_docs___1_open_...   1.43 -> 1.36 [ 95%]    1.87 -> 1.42 [ 76%]    0.73 -> 0.66 [ 91%]
keymobi_reddit_com_r_pro...   0.68 -> 0.66 [ 96%]    2.49 -> 1.23 [ 49%]    0.65 -> 0.66 [102%]
...

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

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

8 years agoSkMakeUnique.h defines skstd::make_unique<T>(Args...)
halcanary [Fri, 2 Sep 2016 18:29:46 +0000 (11:29 -0700)]
SkMakeUnique.h defines skstd::make_unique<T>(Args...)

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

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

8 years agoInclude $extra_ldflags in link descriptions.
mtklein [Fri, 2 Sep 2016 18:24:50 +0000 (11:24 -0700)]
Include $extra_ldflags in link descriptions.

I overlooked this this morning.  Not hugely important, but nice to see.

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

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

8 years agoAdd option to skip rects to drawImageLattice()
msarett [Fri, 2 Sep 2016 18:24:30 +0000 (11:24 -0700)]
Add option to skip rects to drawImageLattice()

HWUI skips transparent rects when drawing.

When skia draws using bilerp, we will blend
transparent rects with neighboring rects and might
draw a bit of a smudge.

This CL adds the option to skip rects, allowing us
to have compatible behavior with the framework.

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

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

8 years agoBUG=skia:5602
hcm [Fri, 2 Sep 2016 18:19:34 +0000 (11:19 -0700)]
BUG=skia:5602
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302913002

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

8 years agoSmall perf optimizations preparing sampled images in vulkan
egdaniel [Fri, 2 Sep 2016 18:19:13 +0000 (11:19 -0700)]
Small perf optimizations preparing sampled images in vulkan

In our current setup, there is no need for storing the sampled images in an
array and then putting in barriers for them later. If we ever change the
system to building up these secondary command buffers early, we will need
to go back to storing the sampled images.

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

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

8 years ago[task scheduler] Add extra_args in tasks.json
borenet [Fri, 2 Sep 2016 15:58:37 +0000 (08:58 -0700)]
[task scheduler] Add extra_args in tasks.json

NOTREECHECKS=true
BUG=skia:5626
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2301313002

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

8 years agoRevert of Force SkPath::getConvexity() cache for thread safety. (patchset #1 id:1...
mtklein [Fri, 2 Sep 2016 13:51:57 +0000 (06:51 -0700)]
Revert of Force SkPath::getConvexity() cache for thread safety. (patchset #1 id:1 of https://codereview.chromium.org/2300003003/ )

Reason for revert:
I don't see anything else in the roll that could have caused the diff.

Original issue's description:
> Force SkPath::getConvexity() cache for thread safety.
>
> I happened to stumble on this in a run of TSAN:
>     https://luci-milo.appspot.com/swarming/task/30fffe9497dc6310/steps/dm/0/stdout
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300003003
>
> Committed: https://skia.googlesource.com/skia/+/d0634eeb565d706df2e148a33f137c6edf42bf2e

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

8 years agoAdd some required packages to tools/install_dependencies.sh
tikuta [Fri, 2 Sep 2016 12:21:40 +0000 (05:21 -0700)]
Add some required packages to tools/install_dependencies.sh

https://skia.org/user/quick/linux

I added following to build skia library.
* freeglut3-dev
* libglu1-mesa-dev
* libosmesa6-dev

Minor:
* fix indent
* sort package list in alphabetical order

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

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

8 years agorecord drawfilters
reed [Fri, 2 Sep 2016 11:56:53 +0000 (04:56 -0700)]
record drawfilters

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

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

8 years agoMake swizzler optional for SkPngCodec, refactor xforms
msarett [Fri, 2 Sep 2016 01:32:52 +0000 (18:32 -0700)]
Make swizzler optional for SkPngCodec, refactor xforms

I think is a good redesign that will allow us to handle more png
xforms more efficiently.  And I also think it reduces a bit of
complexity.

PNGs can be RGBA, RGB, Gray, GrayAlpha, Index8.

The swizzler handles all of those input formats and all Skia
output formats.  Swizzler also provides sampling/subsetting.

Color xforms currently only handles RGBA.  So we use the
swizzler to convert to RGBA first.  I've started thinking
about adding RGB, Gray, etc. support for color xforms.
In this case (and the RGBA case), we should skip the
swizzling step.

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

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

8 years agoRequest legacy mode behavior from SkCodec in BitmapRegionDecoder
msarett [Fri, 2 Sep 2016 00:47:46 +0000 (17:47 -0700)]
Request legacy mode behavior from SkCodec in BitmapRegionDecoder

Png assets look funny when we perform a correct, linear
premultiply.

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

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

8 years agoGN: Build and link with LLD when using our Clang toolchain.
mtklein [Thu, 1 Sep 2016 22:51:03 +0000 (15:51 -0700)]
GN: Build and link with LLD when using our Clang toolchain.

I am hoping this makes it easier to get *SAN bots going.
Today we're generating a libcompiler_rt.a that's using a
relocation type that the ld on the bots doesn't know about.
This lld is will know about anything our Clang generates.

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

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

8 years agoThe *SAN bots are now all Clang bots.
mtklein [Thu, 1 Sep 2016 22:49:44 +0000 (15:49 -0700)]
The *SAN bots are now all Clang bots.

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

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

8 years agoRemove tsan.supp.
mtklein [Thu, 1 Sep 2016 21:57:35 +0000 (14:57 -0700)]
Remove tsan.supp.

The remaining suppression (libwebp) is already covered by the
compile-time blacklist, tools/xsan.blacklist.

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

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-TSAN-Trybot,Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Release-TSAN-Trybot

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

8 years agoMove Skia GN sources to a separate .gni file.
brettw [Thu, 1 Sep 2016 21:24:39 +0000 (14:24 -0700)]
Move Skia GN sources to a separate .gni file.

This file will be imported by Chrome to access the sources lists.

Once Chrome is updated to use this file, changes to the skia .gypi layout can
be done entirely within the skia repository as long as the resulting lists
produced by the new .gni file have the same name.

Marks skia_for_chromium_defines as obsolete and moves the definition into the new .gni file. We can remove the .gypi file when Chrome is updated.

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

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

8 years agoSkPDF: revert changes to CMapName/Registry/Ordering in 3d01c62
halcanary [Thu, 1 Sep 2016 21:10:00 +0000 (14:10 -0700)]
SkPDF: revert changes to CMapName/Registry/Ordering in 3d01c62

BUG=skia:5606
TBR=bungeman@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2305803002

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

8 years agoForce SkPath::getConvexity() cache for thread safety.
mtklein [Thu, 1 Sep 2016 20:49:13 +0000 (13:49 -0700)]
Force SkPath::getConvexity() cache for thread safety.

I happened to stumble on this in a run of TSAN:
    https://luci-milo.appspot.com/swarming/task/30fffe9497dc6310/steps/dm/0/stdout

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

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

8 years agoFix PostUploadHook for Gerrit issues
rmistry [Thu, 1 Sep 2016 20:36:31 +0000 (13:36 -0700)]
Fix PostUploadHook for Gerrit issues

A gerrit change must contain the "Change-Id" at the end. This CL strips
out the changeId from the description and adds it back in at the end.

BUG=skia:5676
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2299303002
NOTRY=true

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

8 years agoTry removing Ganesh suppression.
mtklein [Thu, 1 Sep 2016 20:25:25 +0000 (13:25 -0700)]
Try removing Ganesh suppression.

Seems ok: https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Release-TSAN-Trybot/builds/2

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

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

8 years agoGN: expunge all environment variables that have no effect on GN
mtklein [Thu, 1 Sep 2016 20:19:20 +0000 (13:19 -0700)]
GN: expunge all environment variables that have no effect on GN

This should have no practical effect.  I just want to make sure no
environment variables beyond $PATH have any effect on GN builds.

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

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

8 years agoAdd infra/bots/tasks.json
borenet [Thu, 1 Sep 2016 19:32:23 +0000 (12:32 -0700)]
Add infra/bots/tasks.json

This is an initial version which adds a trio of buildbot-less bots. I
expect these to be totally broken while I work out the issues.

In the future, we'll have a script to generate tasks.json.

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

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

8 years agoLift SkString TSAN suppression, to see what yells.
mtklein [Thu, 1 Sep 2016 19:04:22 +0000 (12:04 -0700)]
Lift SkString TSAN suppression, to see what yells.

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

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

8 years agoReplace a lot of 'static const' with 'constexpr' or 'const'.
mtklein [Thu, 1 Sep 2016 18:24:54 +0000 (11:24 -0700)]
Replace a lot of 'static const' with 'constexpr' or 'const'.

'static const' means, there must be at most one of these, and initialize it at
compile time if possible or runtime if necessary.  This leads to unexpected
code execution, and TSAN* will complain about races on the guard variables.

Generally 'constexpr' or 'const' are better choices.  Neither can cause races:
they're either intialized at compile time (constexpr) or intialized each time
independently (const).

This CL prefers constexpr where possible, and uses const where not.  It even
prefers constexpr over const where they don't make a difference... I want to have
lots of examples of constexpr for people to see and mimic.

The scoped-to-class static has nothing to do with any of this, and is not changed.

* Not yet on the bots, which use an older TSAN.

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

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

8 years agoDisable MSAAPathRender for Android Framework builds
robertphillips [Thu, 1 Sep 2016 17:13:04 +0000 (10:13 -0700)]
Disable MSAAPathRender for Android Framework builds
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2298613005

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

8 years agoEnable Gerrit support in Skia's PostUploadHook
rmistry [Thu, 1 Sep 2016 16:54:01 +0000 (09:54 -0700)]
Enable Gerrit support in Skia's PostUploadHook

BUG=skia:5676
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2299203002
NOTRY=true

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

8 years agoUse methods from depot_tool's Changelist object instead of Rietveld RPC
rmistry [Thu, 1 Sep 2016 16:52:32 +0000 (09:52 -0700)]
Use methods from depot_tool's Changelist object instead of Rietveld RPC

This will make support for both Gerrit and Rietveld easier.

BUG=skia:5676
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307593002
NOTRY=true

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

8 years agoGN: add extra_ldflags
mtklein [Thu, 1 Sep 2016 16:15:44 +0000 (09:15 -0700)]
GN: add extra_ldflags

This is mostly just handy for hacking around while building out other GN features.

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

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

8 years agoSkFontMgr_FontConfigInterface create typeface from FontParameters.
bungeman [Thu, 1 Sep 2016 15:52:29 +0000 (08:52 -0700)]
SkFontMgr_FontConfigInterface create typeface from FontParameters.

This implements
SkFontMgr_FontConfigInterface::onCreateFromStream(SkStreamAsset*, const FontParameters&)
and makes the changes needed to support it. This will allow Chromium to
create variation fonts from data.

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

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

8 years agoRemove some useless declarations
sylvestre.ledru [Thu, 1 Sep 2016 15:47:44 +0000 (08:47 -0700)]
Remove some useless declarations

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

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

8 years agopreserve GN_Android in compile -> test mapper
mtklein [Thu, 1 Sep 2016 15:47:25 +0000 (08:47 -0700)]
preserve GN_Android in compile -> test mapper

doesn't seem anything tests this?

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

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

8 years agoEnable the screenspace AA tessellating path renderer.
senorblanco [Thu, 1 Sep 2016 15:22:58 +0000 (08:22 -0700)]
Enable the screenspace AA tessellating path renderer.

This will enable the new path renderer in Skia. It is still disabled
in Chrome, to protect layout test results.

Note: this will cause minor pixel diffs in a number of GMs' GPU results,
including drawregionmodes, dstreadshuffle, smallarc, path-reverse,
bug339297, parsedpaths, zero_control_stroke, strokedlines, smallpaths,
circular_arcs_stroke_round, concavepaths, circular_arcs_stroke_square,
clipcubic, arcto, persp_shaders_aa, complexclip3_complex,
circular_arcs_stroke_and_fill_butt, complexclip_aa,
complexclip_aa_layer, complexclip_aa_invert, complexclip3_simple,
complexclip_aa_layer_invert, shadertext, shadertext2,
convex-lineonly-paths-stroke-and-fill, poly2poly, glyph_pos_h_b,
glyph_pos_h_f, glyph_pos_n_f, and glyph_pos_n_s.

Note: it also "fixes" crbug_640176, or more accurately, hides the
failure, since the default path renderer likely still has the bug.

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

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

8 years agoRemove a duplicate declaration
sylvestre.ledru [Thu, 1 Sep 2016 15:17:02 +0000 (08:17 -0700)]
Remove a duplicate declaration

Merge branch 'master' of github.com:google/skia

Remove a useless declaration

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

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

8 years agoRemove empty {lsan,ubsan}.supp files.
mtklein [Thu, 1 Sep 2016 15:08:03 +0000 (08:08 -0700)]
Remove empty {lsan,ubsan}.supp files.

We never used ubsan.supp,
and LSAN suppressions are now built into the test binaries.

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

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot

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

8 years agominor SkSL changes to avoid compiler errors in Chromium
ethannicholas [Thu, 1 Sep 2016 14:59:02 +0000 (07:59 -0700)]
minor SkSL changes to avoid compiler errors in Chromium

* fixed a couple of spots where using { } instead of an explicit constructor call resulted in errors
* Type::Field had a deleted copy constructor and therefore was not working inside std::vector; had to remove const from fields and change fType from a reference to a pointer

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

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

8 years agoAdd contributor to Skia AUTHORS file
hcm [Thu, 1 Sep 2016 14:55:43 +0000 (07:55 -0700)]
Add contributor to Skia AUTHORS file

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

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

8 years agoFix ASAN int overflow error in GLProgramsTest
bsalomon [Thu, 1 Sep 2016 14:20:29 +0000 (07:20 -0700)]
Fix ASAN int overflow error in GLProgramsTest

TBR=senorblanco@chromium.org
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2289143006

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

8 years agoBuild LSAN suppressions into the test binaries.
mtklein [Thu, 1 Sep 2016 14:06:54 +0000 (07:06 -0700)]
Build LSAN suppressions into the test binaries.

This way you don't need to set LSAN_SUPPRESSIONS in your environment...
sort of foolproof this way.

I _think_ the strdup() business from skia:2916 is actually rooted in
libfontconfig, so one suppression should cover both old ones.

I'll leave the file empty until I clean up mention of it in bot recipes.

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

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot

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

8 years agoBlame this for GTX960 diffs.
benjaminwagner [Thu, 1 Sep 2016 12:38:54 +0000 (05:38 -0700)]
Blame this for GTX960 diffs.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300983002
NOTREECHECKS=true
NOTRY=true
TBR=csmartdalton@google.com

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

8 years agoFlush some non-substantive Ganesh changes
robertphillips [Wed, 31 Aug 2016 22:06:24 +0000 (15:06 -0700)]
Flush some non-substantive Ganesh changes

Split out of: https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus))

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

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

8 years agoAdd read/write-Pixels to GrDrawContext
robertphillips [Wed, 31 Aug 2016 21:54:15 +0000 (14:54 -0700)]
Add read/write-Pixels to GrDrawContext

Although not absolutely required this does remove another case where the drawContext's backing store is accessed.

Broken out of: https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus))

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

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

8 years agopathops coincident work
caryclark [Wed, 31 Aug 2016 21:36:29 +0000 (14:36 -0700)]
pathops coincident work

This is working towards fixing all bugs around simplifying the tiger.

This installment simplifies the point-t intersection list as it is built rather than doing the analysis once the intersections are complete. This avoids getting the list in an inconsistent state and makes coincident checks faster and more stable.

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

TBR=reed@google.com
BUG=skia:5131

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

8 years agoHave GrSurfaceProxys and GrGpuResources draw from the same pool of unique ids
robertphillips [Wed, 31 Aug 2016 21:04:06 +0000 (14:04 -0700)]
Have GrSurfaceProxys and GrGpuResources draw from the same pool of unique ids

The idea here is that, for wrapped Proxy objects, we want the uniqueID to reflect that of the wrapped object. For this to work the IDs for the non-wrapped versions can't conflict with GrGpuResource's pool of IDs.

Split off of: https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus))

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

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

8 years agoMove clip mask generation into GrReducedClip
csmartdalton [Wed, 31 Aug 2016 19:54:46 +0000 (12:54 -0700)]
Move clip mask generation into GrReducedClip

This is a temporary solution to facilitate window rectangles and make
clip mask generation more accessible for testing. The eventual goal is
to simplify clips and merge GrReducedClip into GrClipStackClip.

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

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

8 years agoSkPDF: Fix Type3 ToUnicode table.
halcanary [Wed, 31 Aug 2016 19:52:35 +0000 (12:52 -0700)]
SkPDF: Fix Type3 ToUnicode table.

This seems to fix text extraction on Adobe Reader

  - Registry/Ordering is now set to Skia/SkiaOrdering.
  - Type3 fonts now get a FontDescriptor (force symbolic font).
  - CMapName is now Skia-Identity-SkiaOrdering
  - CMap behaves correctly for single-byte fonts.

Also:
  - SkTestTypeface returns tounicode map for testing.
  - Unit test updated

All PDFs render the same

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

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