platform/upstream/libSkiaSharp.git
8 years agoMake yasm-android executable
msarett [Tue, 26 Jul 2016 20:46:15 +0000 (13:46 -0700)]
Make yasm-android executable

TBR=mtklein@google.com
NOTRY=true
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2188583002

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

8 years agoRename yasm binary and make it executable
msarett [Tue, 26 Jul 2016 20:33:46 +0000 (13:33 -0700)]
Rename yasm binary and make it executable

TBR=mtklein@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187663002

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

8 years agoUpdate iOS to new SkSurface interface
jvanverth [Tue, 26 Jul 2016 20:33:07 +0000 (13:33 -0700)]
Update iOS to new SkSurface interface

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

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

8 years agoStart measuring f16 and srgb speed.
mtklein [Tue, 26 Jul 2016 20:05:30 +0000 (13:05 -0700)]
Start measuring f16 and srgb speed.

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

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

8 years agoAdd sw support to viewer on Linux.
bsalomon [Tue, 26 Jul 2016 19:56:32 +0000 (12:56 -0700)]
Add sw support to viewer on Linux.

This doesn't yet do anything with srgb/colorspace.

Replaces the --vulkan flag with --backend which takes 'gl', 'vk', or 'sw'.

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

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

8 years agoMove SkJSONCPP.h to tools. It tool-only.
mtklein [Tue, 26 Jul 2016 19:41:27 +0000 (12:41 -0700)]
Move SkJSONCPP.h to tools.  It tool-only.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184483003
CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

TBR=reed@google.com

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

8 years agodon't specialize drawBitmapRect for minirecorder; no longer called by blink
reed [Tue, 26 Jul 2016 19:21:10 +0000 (12:21 -0700)]
don't specialize drawBitmapRect for minirecorder; no longer called by blink

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

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

8 years agoUse Windowing system-specific WindowContext factories.
bsalomon [Tue, 26 Jul 2016 19:02:50 +0000 (12:02 -0700)]
Use Windowing system-specific WindowContext factories.

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

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

8 years agoMove Skia recipes from build repo
borenet [Tue, 26 Jul 2016 18:52:17 +0000 (11:52 -0700)]
Move Skia recipes from build repo

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

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

8 years agoReduce usage of MakeRenderTargetDirect
robertphillips [Tue, 26 Jul 2016 18:38:17 +0000 (11:38 -0700)]
Reduce usage of MakeRenderTargetDirect

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

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

8 years agoRemove SkSurfaceProps gamma-correctness flag entirely.
brianosman [Tue, 26 Jul 2016 18:36:05 +0000 (11:36 -0700)]
Remove SkSurfaceProps gamma-correctness flag entirely.

This is no longer required - gamma-correctness is now just based on the
presence or absence of a color space.

Public API change is just removal of (unused) flag.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2188463002
TBR=bsalomon@google.com

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

8 years agoFix yasm for Android build
msarett [Tue, 26 Jul 2016 18:24:28 +0000 (11:24 -0700)]
Fix yasm for Android build

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

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

8 years agoFix docs for checking out Skia
borenet [Tue, 26 Jul 2016 18:11:50 +0000 (11:11 -0700)]
Fix docs for checking out Skia

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

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

8 years agoRemove all usage of SkSurfaceProps::isGammaCorrect()
brianosman [Tue, 26 Jul 2016 17:21:54 +0000 (10:21 -0700)]
Remove all usage of SkSurfaceProps::isGammaCorrect()

DrawContext's isGammaCorrect now just based on presence of color space.
Next change will remove the function and flag entirely, but I wanted to
land this separately. This alters a few GMs in srgb/f16 mode, generally
those that are creating off-screen surfaces in ways that were somewhat
lossy before. No unexplained changes.

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

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

8 years agoFix alignment problems in NEON Sk4b.
mtklein [Tue, 26 Jul 2016 17:07:34 +0000 (10:07 -0700)]
Fix alignment problems in NEON Sk4b.

As written at head, the compiler can assume these loads and stores are 4
byte aligned [1].  We want Sk4b to load from any 1-byte aligned address,
to prevent crashes like [2].

[1] https://llvm.org/bugs/show_bug.cgi?id=24421
[2] https://luci-milo.appspot.com/swarming/task/304079e125b1b910/steps/nanobench/0/stdout

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

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

8 years agofix fuzz bugs
caryclark [Tue, 26 Jul 2016 16:26:29 +0000 (09:26 -0700)]
fix fuzz bugs

Add ability for intersection template to detect that
the test contains bounded numbers so that extra
asserts can trigger.

Add some exit points for out of range numbers
in those templates.

TBR=reed@google.com
BUG=631383,631374,631360
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185703002

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

8 years agoDon't unnecessarily resize windows in sk_app on X
bsalomon [Tue, 26 Jul 2016 15:50:26 +0000 (08:50 -0700)]
Don't unnecessarily resize windows in sk_app on X
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2182163002

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

8 years agoUpdate bleed-downscale GM to use power of 2 texture
egdaniel [Tue, 26 Jul 2016 15:26:46 +0000 (08:26 -0700)]
Update bleed-downscale GM to use power of 2 texture

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

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

8 years agoAlways supply a color space (sRGB for now) with F16
brianosman [Tue, 26 Jul 2016 15:11:50 +0000 (08:11 -0700)]
Always supply a color space (sRGB for now) with F16

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

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

8 years agoAdd Sk4h_load4 for loading F16.
mtklein [Tue, 26 Jul 2016 15:01:19 +0000 (08:01 -0700)]
Add Sk4h_load4 for loading F16.

Should feel very similar to Sk4h_store4:
NEON uses its native instruction, SSE unpacks manually.

Since we'll have our F16s in 4 Sk4h by the time we're done here,
this also extracts an Sk4h->Sk4f routine from the old uint64_t->Sk4f one.

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

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

8 years agoMove prepareForExternalIO from GrRenderTarget to GrDrawContext
robertphillips [Tue, 26 Jul 2016 14:41:00 +0000 (07:41 -0700)]
Move prepareForExternalIO from GrRenderTarget to GrDrawContext

This is part of the push to remove GrRenderTarget from SkGpuDevice

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

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

8 years agoReuse sampler descriptor set allocations in Vulkan
egdaniel [Tue, 26 Jul 2016 14:19:47 +0000 (07:19 -0700)]
Reuse sampler descriptor set allocations in Vulkan

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

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

8 years agoAdd special Windows instructions for getting SKPs
brianosman [Tue, 26 Jul 2016 13:43:51 +0000 (06:43 -0700)]
Add special Windows instructions for getting SKPs

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

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

8 years agorespect kFast_SrcRectConstraint by allowing shader access to entire bitmap
reed [Tue, 26 Jul 2016 02:10:10 +0000 (19:10 -0700)]
respect kFast_SrcRectConstraint by allowing shader access to entire bitmap

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

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

8 years agoUse sk_srgb_to_linear_trunc in SkColorXform_opts
msarett [Tue, 26 Jul 2016 01:58:11 +0000 (18:58 -0700)]
Use sk_srgb_to_linear_trunc in SkColorXform_opts

This gives us a little more control over instruction order, allowing
us to pipeline the muls and get better performance.  Technically,
clang should be able to do this for us anyway...

Performance on HP z620 (201295.jpg):
toSRGB: 371us -> 356us

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

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

8 years agoDelete SkDefaultXform, handle edge cases in SkColorSpaceXform_Base
msarett [Tue, 26 Jul 2016 01:23:18 +0000 (18:23 -0700)]
Delete SkDefaultXform, handle edge cases in SkColorSpaceXform_Base

"Edge" cases include:
(1) Matrices with translation
(2) colorLUTs

Performance on HP z620:

201295.jpg
to2Dot2: 386us -> 414us
toSRGB:  346us -> 371us
toHalf:  282us -> 302us

strange0-translate.jpg
toSRGB:  1060us -> 244us

strange1-colorLUT.jpg
toSRGB:  2.74ms -> 2.00ms

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

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

8 years agoFix F16 raster text masks. We don't want fake gamma in that case.
brianosman [Tue, 26 Jul 2016 00:41:44 +0000 (17:41 -0700)]
Fix F16 raster text masks. We don't want fake gamma in that case.

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

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

8 years agoUpdate typeface serialization style.
bungeman [Mon, 25 Jul 2016 23:54:59 +0000 (16:54 -0700)]
Update typeface serialization style.

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

Committed: https://skia.googlesource.com/skia/+/7ae1c72e593823e6e300e4199558555765bcec17
Review-Url: https://codereview.chromium.org/2030683002

8 years agoDM: print which task caused the crash.
mtklein [Mon, 25 Jul 2016 22:27:29 +0000 (15:27 -0700)]
DM: print which task caused the crash.

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

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

8 years agoAdd test for typeface style round trip.
bungeman [Mon, 25 Jul 2016 22:11:49 +0000 (15:11 -0700)]
Add test for typeface style round trip.

This also fixes the CG and GDI ports so they pass the test.

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

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

8 years agoHave SkRasterPipelineBlitter take over for F16 when it can.
mtklein [Mon, 25 Jul 2016 21:35:31 +0000 (14:35 -0700)]
Have SkRasterPipelineBlitter take over for F16 when it can.

3 minor diffs to a couple GMs from fixed transfermodes (arithmetic and plus).

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

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

8 years agolock special-raster while the caller's bitmap is in-scope
reed [Mon, 25 Jul 2016 21:26:02 +0000 (14:26 -0700)]
lock special-raster while the caller's bitmap is in-scope

previous CL that removed the specialimage subclass that wrapped the original image: https://codereview.chromium.org/2164073004

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

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

8 years agoSkPDF: re-work SkPDFUtils::FloatToDecimal
halcanary [Mon, 25 Jul 2016 20:59:30 +0000 (13:59 -0700)]
SkPDF: re-work SkPDFUtils::FloatToDecimal

  * do a lot less floating-point math by converting to
    an integer as early as possible [faster].
  * round rather than truncate.
  * use 8 significant digits rather than 9 when possible.
  * remove trailing zeros in fractions.

before:
      0.12 !    PDFScalar   nonrendering
after:
      0.07 !    PDFScalar   nonrendering

Accuracy guaranteed by existing unit test.

Example diffs:

    -/Shading <</Function <</C0 [.321568638 .333333343 .321568638]
    +/Shading <</Function <</C0 [.32156864 .33333334 .32156864]

    -/C1 [.258823543 .270588248 .258823543]
    +/C1 [.25882354 .27058825 .25882354]

    -1 0 0 -1 20 120.394500 Tm
    +1 0 0 -1 20 120.394501 Tm

    -1 0 0 -1 20 184.789001 Tm
    +1 0 0 -1 20 184.789 Tm

    -291.503997 0 l
    +291.504 0 l

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

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

8 years agoGoogle3 <functional> has a global "using std::plus"...
mtklein [Mon, 25 Jul 2016 20:24:09 +0000 (13:24 -0700)]
Google3 <functional> has a global "using std::plus"...

... so we can't use the name plus().  -_-

TBR=tomhudson@google.com

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

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

8 years agoJust pass the draw context to paint conversion
brianosman [Mon, 25 Jul 2016 19:31:51 +0000 (12:31 -0700)]
Just pass the draw context to paint conversion

Concentrate on using draw context functionality to answer gamma and color
related queries in more places.

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

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

8 years agoFix debugger build by specifying nullptr for color space.
chrishtr [Mon, 25 Jul 2016 18:21:34 +0000 (11:21 -0700)]
Fix debugger build by specifying nullptr for color space.

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

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

8 years agostages for most xfermodes
mtklein [Mon, 25 Jul 2016 18:00:47 +0000 (11:00 -0700)]
stages for most xfermodes

also assumes the clamp from https://codereview.chromium.org/2178793002/ is present

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

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

8 years agoSkSL performance improvements (plus a couple of minor warning fixes)
ethannicholas [Mon, 25 Jul 2016 17:08:54 +0000 (10:08 -0700)]
SkSL performance improvements (plus a couple of minor warning fixes)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2131223002

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

8 years agoadd SK_SUPPORT_LEGACY_BITMAP_GETTEXTURE for out-of-date google3 callers
reed [Mon, 25 Jul 2016 16:41:58 +0000 (09:41 -0700)]
add SK_SUPPORT_LEGACY_BITMAP_GETTEXTURE for out-of-date google3 callers

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

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

8 years agoremove/deprecate SkBitmap::getTexture, as it now always returns false
reed [Mon, 25 Jul 2016 15:29:10 +0000 (08:29 -0700)]
remove/deprecate SkBitmap::getTexture, as it now always returns false

oh happy day

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

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

8 years agoadd gm to test bleed with downscale
reed [Mon, 25 Jul 2016 15:11:58 +0000 (08:11 -0700)]
add gm to test bleed with downscale

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

TBR=

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

8 years agoremove fClipStack and attach/deattach-from-canvas
reed [Mon, 25 Jul 2016 15:05:22 +0000 (08:05 -0700)]
remove fClipStack and attach/deattach-from-canvas

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

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

8 years agotypedef uint16_t SkGlyphID
halcanary [Mon, 25 Jul 2016 14:18:12 +0000 (07:18 -0700)]
typedef uint16_t SkGlyphID

This goes well with our existing `typedef int32_t SkUnichar`.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2095263003

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

8 years agoRemove long-running sk_linear_to_srgb test for ASAN in public.bzl.
benjaminwagner [Mon, 25 Jul 2016 13:32:13 +0000 (06:32 -0700)]
Remove long-running sk_linear_to_srgb test for ASAN in public.bzl.

This unit test takes >~5m and causes the ASAN test to time out.

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

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

8 years agoAdd a clamp stage to SkRasterPipelineBlitter.
mtklein [Mon, 25 Jul 2016 13:13:47 +0000 (06:13 -0700)]
Add a clamp stage to SkRasterPipelineBlitter.

This clamps to [0,1] premul just before every store to memory.

By making the clamp a stage itself, this design makes it easy to move the clamp
around, to replace it with a debug-only assert-we're-clamped stage for certain
formats, clamp in more places, programatically not clamp, etc. etc.

Before this change, clamping was a little haphazard: store_srgb clamped
R, G and B to [0,1], but not A, and didn't clamp the colors to A.  565
didn't clamp at all.

6 GMs draw subtly differently in sRGB, I think because we've started clamping
colors to alpha to enforce premultiplication better.  No changes for 565.

My hope is that now no other stage need ever concern itself with clamping.

So we don't double-clamp, I've added a _noclamp version of sk_linear_to_srgb()
that simply asserts a clamp isn't necessary.  This happens to expose the Sk4f
_needs_trunc version that might be useful for power users (*cough* Matt *cough*).

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

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

8 years agofix fuzz
caryclark [Mon, 25 Jul 2016 13:05:08 +0000 (06:05 -0700)]
fix fuzz

Extreme inputs trigger asserts intended for in range data.
Return an error without asserting unless the test signals
otherwise.

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

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

8 years agoArithmetic xfermode stage.
mtklein [Mon, 25 Jul 2016 12:56:16 +0000 (05:56 -0700)]
Arithmetic xfermode stage.

565 is identical, and as usual the old sRGB path was broken.  :)
It was unimplemented, so the default missing Sk4f implementation was mimicking Src.

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

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

8 years agowebpages_playback: Make --upload_to_partner_bucket work without --upload
borenet [Mon, 25 Jul 2016 12:18:15 +0000 (05:18 -0700)]
webpages_playback: Make --upload_to_partner_bucket work without --upload

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

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

8 years agoAdd destination color space to AsFPArgs. Eliminates last XFORMTODO.
brianosman [Mon, 25 Jul 2016 12:12:53 +0000 (05:12 -0700)]
Add destination color space to AsFPArgs. Eliminates last XFORMTODO.

This is going to be needed in many more places as I finish connecting the
dots. Even better - I'd like to switch to a world where SkColorSpace !=
nullptr is the only signal we use for gamma-correct rendering, so I can
eliminate SkSourceGammaTreatment and SkSurfaceProps::isGammaCorrect.

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

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

8 years agolockPixelsAreWritable is deprecated
reed [Sun, 24 Jul 2016 19:30:34 +0000 (12:30 -0700)]
lockPixelsAreWritable is deprecated

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

TBR=

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

8 years agoFix misdetection of rectangles in SkPath::IsSimpleClosedRect.
bsalomon [Sun, 24 Jul 2016 12:37:26 +0000 (05:37 -0700)]
Fix misdetection of rectangles in SkPath::IsSimpleClosedRect.

BUG=chromium:630369
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2175923002

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

8 years agoUpdate SKP version
update-skps [Sun, 24 Jul 2016 08:30:17 +0000 (01:30 -0700)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

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

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

8 years agoRemove asserts on scissor size in Vulkan
egdaniel [Fri, 22 Jul 2016 21:41:30 +0000 (14:41 -0700)]
Remove asserts on scissor size in Vulkan

These are asserts are firing from a recent change to our scissor code.
Since these asserts were added, the Vulkan spec has been updated to no
longer require the scissor is insides the bounds of the image, just that
x + width does not overflow.

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

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

8 years agoHave SkRasterPipelineBlitter take over for 565 when it can.
mtklein [Fri, 22 Jul 2016 21:20:27 +0000 (14:20 -0700)]
Have SkRasterPipelineBlitter take over for 565 when it can.

This is an experiment / demo to have our 565 backend fold into
SkRasterPipelineBlitter as it grows more powerful.  I plan to follow up with
the same for the other 8888 format.

Blur mask filters look significantly different (better) after this change.
We keep the full 13-14-13 bits of precision for mask blits, where the old code
uses 11-11-10 bit intermediates.

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

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

8 years agoConvert XYZ values from PNGs to D50
msarett [Fri, 22 Jul 2016 21:07:23 +0000 (14:07 -0700)]
Convert XYZ values from PNGs to D50

Previously, we were storing whatever values we got out of the file
and pretending they were D50.  Brian has demonstrated that this
doesn't really work.

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

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

8 years agoIn the current code, tiling and bilerp sampling are strongly tied together. They...
herb [Fri, 22 Jul 2016 21:06:27 +0000 (14:06 -0700)]
In the current code, tiling and bilerp sampling are strongly tied together. They can be separated by taking advantage of observation that translating a sample point into filter points in the bilerp stage the filter points will be at most 0.5 outside the tile. This allows simplified repositioning for the various tiling modes; clamp and mirror use min and max while repeat has max -> 0 and 0-> max. This allows bilerp to simply treat the filter points that fall off the tile. This allows tiling and bilerp sampling to be totally separate.

This CL has several parts that are intertwined:
* move pin/wrap functionality into BilerpSampler.
* remove the nearest neighbor and bilerp tilers
* create a simplified general tiler
* remove the pipeline virtual calls bilerpEdge and bilerpSpan because everything works of sample points now.
* redo all the bilerp sampling to use the new local to methods to wrap/pin.
* introduce a new medium rate sample that handles spans with 1 < |dx| < 2.

This change improves the performance as displayed below:
Most of top 25 desktop improves or are the same. A few are worse, but close to the noise floor. In addition, this change has about 3% smaller code.

old time     new time   new/old
13274693  8414645  0.633886  top25desk_google_com_search_q_c.skp_1
4946466   3258018  0.658656  top25desk_wordpress.skp_1
6977187   5737584  0.822335  top25desk_youtube_com.skp_1
3770021   3296831  0.874486  top25desk_google_com__hl_en_q_b.skp_1
8890813   8600143  0.967307  top25desk_answers_yahoo_com.skp_1
3178974   3094300  0.973364  top25desk_facebook.skp_1
8871835   8711260  0.981901  top25desk_twitter.skp_1
838509    829290   0.989005  top25desk_blogger.skp_1
2821870   2801111  0.992644  top25desk_plus_google_com_11003.skp_1
511978    509530   0.995219  top25desk_techcrunch_com.skp_1
2408588   2397435  0.995369  top25desk_ebay_com.skp_1
4446919   4448004  1.00024   top25desk_espn.skp_1
2863241   2875696  1.00435   top25desk_google_com_calendar_.skp_1
7170086   7208447  1.00535   top25desk_booking_com.skp_1
7356109   7417776  1.00838   top25desk_pinterest.skp_1
5265591   5340392  1.01421   top25desk_weather_com.skp_1
5675244   5774144  1.01743   top25desk_sports_yahoo_com_.skp_1
1048531   1067663  1.01825   top25desk_games_yahoo_com.skp_1
2075501   2115131  1.01909   top25desk_amazon_com.skp_1
4262170   4370441  1.0254    top25desk_news_yahoo_com.skp_1
3789319   3897996  1.02868   top25desk_docs___1_open_documen.skp_1
919336    949979   1.03333   top25desk_wikipedia__1_tab_.skp_1
4274454   4489369  1.05028   top25desk_mail_google_com_mail_.skp_1
4149326   4376556  1.05476   top25desk_linkedin.skp_1

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

Committed: https://skia.googlesource.com/skia/+/8602ede5fdfa721dcad4dcb11db028c1c24265f1
Review-Url: https://codereview.chromium.org/2134893002

8 years agoAlways init SkPathRef variables.
senorblanco [Fri, 22 Jul 2016 20:51:42 +0000 (13:51 -0700)]
Always init SkPathRef variables.

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

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

8 years agoDM: don't redirect stderr to verbose.log
mtklein [Fri, 22 Jul 2016 19:23:46 +0000 (12:23 -0700)]
DM: don't redirect stderr to verbose.log

verbose.log is currently tricky to get to, so it's hurting more than it
helps to direct stderr there.

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

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

8 years agoCorrect advances for 'monospace' fonts in PDF.
bungeman [Fri, 22 Jul 2016 18:19:24 +0000 (11:19 -0700)]
Correct advances for 'monospace' fonts in PDF.

FT_IS_FIXED_WIDTH, kCTFontMonoSpaceTrait, and TMPF_FIXED_PITCH
are style bits, they do not imply that all advances are the same.

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

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

8 years agoAdd SkRasterPipeline blitter.
mtklein [Fri, 22 Jul 2016 18:05:04 +0000 (11:05 -0700)]
Add SkRasterPipeline blitter.

This is now pixel-exact with the existing sRGB SW impl as far as I've tested.

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

Committed: https://skia.googlesource.com/skia/+/3011e337693a9786f62d8de9ac4b239ad6dbdaca
Review-Url: https://codereview.chromium.org/2146413002

8 years agoBundle SkShader::asFragmentProcessor arguments in a struct
brianosman [Fri, 22 Jul 2016 18:04:53 +0000 (11:04 -0700)]
Bundle SkShader::asFragmentProcessor arguments in a struct

The signature of this thing keeps changing (and is about to change again).
This just makes maintenance much easier.

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

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

8 years agolimit number of searched roots
caryclark [Fri, 22 Jul 2016 17:56:26 +0000 (10:56 -0700)]
limit number of searched roots

Extreme numbers can generate more than
three found cubic roots when the roots
are found through a binary search.

Fail in this case.

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

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

8 years agoRecycle small uniform buffers.
jvanverth [Fri, 22 Jul 2016 17:34:52 +0000 (10:34 -0700)]
Recycle small uniform buffers.

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

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

8 years agoConnect dst color space in a few places (removing TODOs)
brianosman [Fri, 22 Jul 2016 17:33:07 +0000 (10:33 -0700)]
Connect dst color space in a few places (removing TODOs)

There is one more XFORMTODO left, but it requires more plumbing.
With this change, certain drawing paths do gamut conversion with
no special hacking required.

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

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

8 years agoRevert of Add SkRasterPipeline blitter. (patchset #18 id:340001 of https://codereview...
mtklein [Fri, 22 Jul 2016 17:20:52 +0000 (10:20 -0700)]
Revert of Add SkRasterPipeline blitter. (patchset #18 id:340001 of https://codereview.chromium.org/2146413002/ )

Reason for revert:
Leaking the blitter

https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN/builds/7908/steps/test_skia%20on%20Ubuntu/logs/stdio

Original issue's description:
> Add SkRasterPipeline blitter.
>
> This is now pixel-exact with the existing sRGB SW impl as far as I've tested.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146413002
> CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/3011e337693a9786f62d8de9ac4b239ad6dbdaca

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/2178523002

8 years agoCreating framework for drawShadowedPicture
vjiaoblack [Fri, 22 Jul 2016 17:04:15 +0000 (10:04 -0700)]
Creating framework for drawShadowedPicture
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146073003

Committed: https://skia.googlesource.com/skia/+/0ae097d116f4332be02a135ffc99c162473dee6a
Committed: https://skia.googlesource.com/skia/+/95302da19d8b0a3bcd9d9be0e79f486760787f09
Review-Url: https://codereview.chromium.org/2146073003

8 years agoAllow GrReducedClip to take non-integer query bounds
csmartdalton [Fri, 22 Jul 2016 15:59:08 +0000 (08:59 -0700)]
Allow GrReducedClip to take non-integer query bounds

Fixes places where AA bloat was being conflated with geometric
boundaries and updates GrReducedClip to work with non-integer query
bounds. This allows for better clip reduction with AA shared edges.

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

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

8 years agoAdd SkRasterPipeline blitter.
mtklein [Fri, 22 Jul 2016 15:53:26 +0000 (08:53 -0700)]
Add SkRasterPipeline blitter.

This is now pixel-exact with the existing sRGB SW impl as far as I've tested.

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

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

8 years agoFix SkClipStack bug with inverse-filled difference elements
csmartdalton [Fri, 22 Jul 2016 15:39:06 +0000 (08:39 -0700)]
Fix SkClipStack bug with inverse-filled difference elements

Previously, SkClipStack would call "setEmpty" on itself when an
inverse-filled difference element made the stack empty. This was
a problem because setEmpty would forget the element had an inverse
fill, yet leave the op as "difference". This change modifies it to
manually update the clip bounds and set the gen-ID to kEmptyGenID,
rather than calling setEmpty.

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

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

8 years agoDon't ask GLX for EGL procs.
mtklein [Fri, 22 Jul 2016 15:35:27 +0000 (08:35 -0700)]
Don't ask GLX for EGL procs.

Seems to fix my woes.

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

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

8 years agoChange SKPs to new asset management format
borenet [Fri, 22 Jul 2016 15:31:07 +0000 (08:31 -0700)]
Change SKPs to new asset management format

BUG=skia:5427
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2169653003
DOCS_PREVIEW= https://skia.org/?cl=2169653003

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

8 years agoFix SW sRGB dst + LCD coverage bug.
mtklein [Fri, 22 Jul 2016 14:35:08 +0000 (07:35 -0700)]
Fix SW sRGB dst + LCD coverage bug.

We're using the linear procs for sRGB destintations
and the sRGB procs for linear destinations.  Fix that.

C.f. State32::getLCDProc(), which flags |= kDstIsSRGB_LCDFlag.
kDistIsSRGB is (1<<2) == 4, so the sRGB procs must be 4-7, not 0-3.

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

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

8 years agoUpdate SkImage_NewFromTexture test, to just test release
brianosman [Fri, 22 Jul 2016 14:22:04 +0000 (07:22 -0700)]
Update SkImage_NewFromTexture test, to just test release
procs of SkImage::MakeFromTexture.

Previous code included an old pattern, and may be
responsible for intermittent Mac bot failure

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

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

8 years agoRevert of Retract PipelineBuilder some more (patchset #9 id:160001 of https://coderev...
bsalomon [Fri, 22 Jul 2016 14:10:19 +0000 (07:10 -0700)]
Revert of Retract PipelineBuilder some more (patchset #9 id:160001 of https://codereview.chromium.org/2092893003/ )

Reason for revert:
skbug.com/5559

Original issue's description:
> Retract PipelineBuilder some more
>
> The main part of this CL is widening SkDrawContext::drawBatch's API to accept the userStencilSettings & drawFace
>
> There is some ancillary spookiness related to expanding the should_apply_coverage_aa & mustUseHWAA methods to encompass mixedSamples
>
> Calved off:
> https://codereview.chromium.org/2165283002/ (Remove DrawFace enum from GrPipelineBuilder)
> https://codereview.chromium.org/2167183002/ (Minor change to Ganesh path renderers)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2092893003
>
> Committed: https://skia.googlesource.com/skia/+/2895eeb11a9f0d9c0018d49dd4bc45f6c6fc062c

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/2175573004

8 years agoCleanup of code that converts from GPU-backed resources to SkImageInfo
brianosman [Fri, 22 Jul 2016 13:26:11 +0000 (06:26 -0700)]
Cleanup of code that converts from GPU-backed resources to SkImageInfo

Functions like GrMakeInfoFromTexture encouraged incorrect code to be
written. Similarly, the ability to construct an info from any GrSurface
was never going to be correct. Luckily, the only client of that had all
of the correct parameters much higher on the stack (and dictated or
replaced most of the properties of the returned info anyway).

With this, I can finally remove the color space as an output of the
pixel config -> color type conversion, which was never going to be
correct.

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

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

8 years agoAdd clamp to sk_linear_to_srgb, reorder instructions
msarett [Fri, 22 Jul 2016 13:23:00 +0000 (06:23 -0700)]
Add clamp to sk_linear_to_srgb, reorder instructions

Improves performance for xforms toSRGB and to2Dot2.  Seems
more optimal to save clamping until the end.  That way we
don't stall the mul pipeline with a min/max.
toSRGB:  371us -> 346us
to2Dot2: 404us -> 387us

FWIW, it probably makes sense to clamp inside
sk_linear_to_srgb anyway.  If not, we should potentially
provide two versions (one that clamps and one that
doesn't).

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

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

8 years agoAdd SK_SUPPORT_LEGACY_ACCESSBITMAP to public.bzl.
benjaminwagner [Fri, 22 Jul 2016 13:19:21 +0000 (06:19 -0700)]
Add SK_SUPPORT_LEGACY_ACCESSBITMAP to public.bzl.

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

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

8 years agoRevert of Redo Tiling (patchset #14 id:260001 of https://codereview.chromium.org...
jcgregorio [Fri, 22 Jul 2016 12:40:58 +0000 (05:40 -0700)]
Revert of Redo Tiling (patchset #14 id:260001 of https://codereview.chromium.org/2134893002/ )

Reason for revert:
Crashing on Win with:

Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION, was running:
unit test  GrShape
srgb gm  shadertext2
srgb gm  shallow_gradient_conical
srgb gm  shallow_gradient_sweep
srgb gm  shallow_gradient_linear_nodither
step returned non-zero exit code: -1073741819

https://status.skia.org/?commit_label=author&filter=search&search_value=Test-Win-MSVC-GCE-CPU-AVX2-x86-Release

Original issue's description:
> In the current code, tiling and bilerp sampling are strongly tied together. They can be separated by taking advantage of observation that translating a sample point into filter points in the bilerp stage the filter points will be at most 0.5 outside the tile. This allows simplified repositioning for the various tiling modes; clamp and mirror use min and max while repeat has max -> 0 and 0-> max. This allows bilerp to simply treat the filter points that fall off the tile. This allows tiling and bilerp sampling to be totally separate.
>
> This CL has several parts that are intertwined:
> * move pin/wrap functionality into BilerpSampler.
> * remove the nearest neighbor and bilerp tilers
> * create a simplified general tiler
> * remove the pipeline virtual calls bilerpEdge and bilerpSpan because everything works of sample points now.
> * redo all the bilerp sampling to use the new local to methods to wrap/pin.
> * introduce a new medium rate sample that handles spans with 1 < |dx| < 2.
>
> This change improves the performance as displayed below:
> Most of top 25 desktop improves or are the same. A few are worse, but close to the noise floor. In addition, this change has about 3% smaller code.
>
> old time     new time   new/old
13274693  8414645  0.633886  top25desk_google_com_search_q_c.skp_1
> 4946466   3258018  0.658656  top25desk_wordpress.skp_1
> 6977187   5737584  0.822335  top25desk_youtube_com.skp_1
> 3770021   3296831  0.874486  top25desk_google_com__hl_en_q_b.skp_1
> 8890813   8600143  0.967307  top25desk_answers_yahoo_com.skp_1
> 3178974   3094300  0.973364  top25desk_facebook.skp_1
> 8871835   8711260  0.981901  top25desk_twitter.skp_1
> 838509    829290   0.989005  top25desk_blogger.skp_1
> 2821870   2801111  0.992644  top25desk_plus_google_com_11003.skp_1
> 511978    509530   0.995219  top25desk_techcrunch_com.skp_1
> 2408588   2397435  0.995369  top25desk_ebay_com.skp_1
> 4446919   4448004  1.00024   top25desk_espn.skp_1
> 2863241   2875696  1.00435   top25desk_google_com_calendar_.skp_1
> 7170086   7208447  1.00535   top25desk_booking_com.skp_1
> 7356109   7417776  1.00838   top25desk_pinterest.skp_1
> 5265591   5340392  1.01421   top25desk_weather_com.skp_1
> 5675244   5774144  1.01743   top25desk_sports_yahoo_com_.skp_1
> 1048531   1067663  1.01825   top25desk_games_yahoo_com.skp_1
> 2075501   2115131  1.01909   top25desk_amazon_com.skp_1
> 4262170   4370441  1.0254    top25desk_news_yahoo_com.skp_1
> 3789319   3897996  1.02868   top25desk_docs___1_open_documen.skp_1
> 919336    949979   1.03333   top25desk_wikipedia__1_tab_.skp_1
> 4274454   4489369  1.05028   top25desk_mail_google_com_mail_.skp_1
> 4149326   4376556  1.05476   top25desk_linkedin.skp_1
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2134893002
> CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/8602ede5fdfa721dcad4dcb11db028c1c24265f1

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

8 years agoDisable CopySurface test on Nexus 10 for flakiness
bsalomon [Fri, 22 Jul 2016 11:09:47 +0000 (04:09 -0700)]
Disable CopySurface test on Nexus 10 for flakiness

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

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

8 years agoGN: restore gn.py partly as fetch-gn
mtklein [Fri, 22 Jul 2016 10:34:25 +0000 (03:34 -0700)]
GN: restore gn.py partly as fetch-gn

Same as before, except it explicitly only fetches GN instead of acting
like a proxy for it.  I found myself always typing 'gn' anyway.

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

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

8 years agoconic fuzz fix
caryclark [Fri, 22 Jul 2016 10:34:19 +0000 (03:34 -0700)]
conic fuzz fix

If no closest section is found in conic intersection
(which can happen if the numbers are out of range)
abort the intersection.

Also suppress assert fired in this case so it only
checks intersections with in-range values.

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

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

8 years agoGN: remove hooks again
mtklein [Thu, 21 Jul 2016 20:54:39 +0000 (13:54 -0700)]
GN: remove hooks again

NOTRY=true

TBR=jcgregorio@google.com

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

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

8 years agoNo symlink. The bots are not running hooks anyway.
mtklein [Thu, 21 Jul 2016 20:43:48 +0000 (13:43 -0700)]
No symlink.  The bots are not running hooks anyway.

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

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

8 years agoFix SkScalerContext_FreeType::generateFontMetrics.
bungeman [Thu, 21 Jul 2016 20:32:09 +0000 (13:32 -0700)]
Fix SkScalerContext_FreeType::generateFontMetrics.

SkScalerContext::generateFontMetrics implementations should not attempt
to take into account skew. This implementation should correctly handle
bitmap fonts as well.

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

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

8 years agoAdd SkColorSpace to GrDrawContext
brianosman [Thu, 21 Jul 2016 20:28:36 +0000 (13:28 -0700)]
Add SkColorSpace to GrDrawContext

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

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

8 years agoIn the current code, tiling and bilerp sampling are strongly tied together. They...
herb [Thu, 21 Jul 2016 20:22:04 +0000 (13:22 -0700)]
In the current code, tiling and bilerp sampling are strongly tied together. They can be separated by taking advantage of observation that translating a sample point into filter points in the bilerp stage the filter points will be at most 0.5 outside the tile. This allows simplified repositioning for the various tiling modes; clamp and mirror use min and max while repeat has max -> 0 and 0-> max. This allows bilerp to simply treat the filter points that fall off the tile. This allows tiling and bilerp sampling to be totally separate.

This CL has several parts that are intertwined:
* move pin/wrap functionality into BilerpSampler.
* remove the nearest neighbor and bilerp tilers
* create a simplified general tiler
* remove the pipeline virtual calls bilerpEdge and bilerpSpan because everything works of sample points now.
* redo all the bilerp sampling to use the new local to methods to wrap/pin.
* introduce a new medium rate sample that handles spans with 1 < |dx| < 2.

This change improves the performance as displayed below:
Most of top 25 desktop improves or are the same. A few are worse, but close to the noise floor. In addition, this change has about 3% smaller code.

old time     new time   new/old
13274693  8414645  0.633886  top25desk_google_com_search_q_c.skp_1
4946466   3258018  0.658656  top25desk_wordpress.skp_1
6977187   5737584  0.822335  top25desk_youtube_com.skp_1
3770021   3296831  0.874486  top25desk_google_com__hl_en_q_b.skp_1
8890813   8600143  0.967307  top25desk_answers_yahoo_com.skp_1
3178974   3094300  0.973364  top25desk_facebook.skp_1
8871835   8711260  0.981901  top25desk_twitter.skp_1
838509    829290   0.989005  top25desk_blogger.skp_1
2821870   2801111  0.992644  top25desk_plus_google_com_11003.skp_1
511978    509530   0.995219  top25desk_techcrunch_com.skp_1
2408588   2397435  0.995369  top25desk_ebay_com.skp_1
4446919   4448004  1.00024   top25desk_espn.skp_1
2863241   2875696  1.00435   top25desk_google_com_calendar_.skp_1
7170086   7208447  1.00535   top25desk_booking_com.skp_1
7356109   7417776  1.00838   top25desk_pinterest.skp_1
5265591   5340392  1.01421   top25desk_weather_com.skp_1
5675244   5774144  1.01743   top25desk_sports_yahoo_com_.skp_1
1048531   1067663  1.01825   top25desk_games_yahoo_com.skp_1
2075501   2115131  1.01909   top25desk_amazon_com.skp_1
4262170   4370441  1.0254    top25desk_news_yahoo_com.skp_1
3789319   3897996  1.02868   top25desk_docs___1_open_documen.skp_1
919336    949979   1.03333   top25desk_wikipedia__1_tab_.skp_1
4274454   4489369  1.05028   top25desk_mail_google_com_mail_.skp_1
4149326   4376556  1.05476   top25desk_linkedin.skp_1

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

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

8 years agoMiscellaneous color space refactors
msarett [Thu, 21 Jul 2016 20:19:03 +0000 (13:19 -0700)]
Miscellaneous color space refactors

(1) Use float matrix[16] everywhere (enables future code
    sharing).
(2) SkColorLookUpTable refactors
    *** Store in a single allocation (like SkGammas)
    *** Eliminate fOutputChannels (we always require 3,
        and probably always will)
(3) Change names of read_big_endian_* helpers

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

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

8 years agoGN: add missing .exe
mtklein [Thu, 21 Jul 2016 20:01:08 +0000 (13:01 -0700)]
GN: add missing .exe

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

NOTRY=true

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

8 years agoReenable support for CHROMIUM_set_uniform_location
bsalomon [Thu, 21 Jul 2016 19:49:30 +0000 (12:49 -0700)]
Reenable support for CHROMIUM_set_uniform_location

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

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

8 years agolet line/cubic intersect at four spots
caryclark [Thu, 21 Jul 2016 19:28:04 +0000 (12:28 -0700)]
let line/cubic intersect at four spots

With this, let's update the fuzzer.

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

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

8 years agoBasic standalone GN configs.
mtklein [Thu, 21 Jul 2016 19:25:45 +0000 (12:25 -0700)]
Basic standalone GN configs.

This sketches out what a world without Chrome's GN configs would look like.

Instead of DEPSing in build/, we now host our own gypi_to_gn.py.

The symlink from skia/ to . lets us run gclient hooks when the .gclient file is in the directory above skia/ or inside skia/.  That means we don't need gn.py anymore.

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

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

8 years agoFixed GM:lightingshader2 size
dvonbeck [Thu, 21 Jul 2016 19:19:54 +0000 (12:19 -0700)]
Fixed GM:lightingshader2 size

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

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

8 years agoRetract PipelineBuilder some more
robertphillips [Thu, 21 Jul 2016 19:04:08 +0000 (12:04 -0700)]
Retract PipelineBuilder some more

The main part of this CL is widening SkDrawContext::drawBatch's API to accept the userStencilSettings & drawFace

There is some ancillary spookiness related to expanding the should_apply_coverage_aa & mustUseHWAA methods to encompass mixedSamples

Calved off:
https://codereview.chromium.org/2165283002/ (Remove DrawFace enum from GrPipelineBuilder)
https://codereview.chromium.org/2167183002/ (Minor change to Ganesh path renderers)

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

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

8 years agoDrop support for libjpeg-turbo < 1.2 in SkJpegCodec
msarett [Thu, 21 Jul 2016 19:00:24 +0000 (12:00 -0700)]
Drop support for libjpeg-turbo < 1.2 in SkJpegCodec

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

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

8 years agoRemove unnecessary getColorSpace() API from SkCodec
msarett [Thu, 21 Jul 2016 18:57:49 +0000 (11:57 -0700)]
Remove unnecessary getColorSpace() API from SkCodec

Not needed since now we can get it from the SkImageInfo.

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

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

8 years agoSetup system in Vulkan to reuse VkDescriptorSet allocations.
egdaniel [Thu, 21 Jul 2016 18:50:37 +0000 (11:50 -0700)]
Setup system in Vulkan to reuse VkDescriptorSet allocations.

This CL uses the new system for uniform buffers. In a follow up CL I will
add support for samplers.

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

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

8 years agoallow curves on side of lines to be very small
caryclark [Thu, 21 Jul 2016 17:44:07 +0000 (10:44 -0700)]
allow curves on side of lines to be very small

Increase the precision of the 'all on one side' pathops
angle test to reduce the number of unorderable segments
found by the cubics_d3 test.

This allows pathsops_unittest release build with -v -V -x
to run without error.

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

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

8 years agoAdd "skp" asset
borenet [Thu, 21 Jul 2016 17:27:00 +0000 (10:27 -0700)]
Add "skp" asset

Don't get rid of SKP_VERSION and associated stuff just yet.

BUG=skia:5427
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2167763002
DOCS_PREVIEW= https://skia.org/?cl=2167763002

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

8 years agoCreating framework for drawShadowedPicture
vjiaoblack [Thu, 21 Jul 2016 17:25:54 +0000 (10:25 -0700)]
Creating framework for drawShadowedPicture
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146073003

Committed: https://skia.googlesource.com/skia/+/0ae097d116f4332be02a135ffc99c162473dee6a
Review-Url: https://codereview.chromium.org/2146073003

8 years agoadd pathops debugging to fuzz
caryclark [Thu, 21 Jul 2016 16:41:13 +0000 (09:41 -0700)]
add pathops debugging to fuzz

Add optional debugging routines for use in gdb.

R=kjlubick
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2171773002

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