platform/upstream/libSkiaSharp.git
8 years agoRevert of Silence -Wclobbered in each file that needs it. (patchset #2 id:20001 of...
mtklein [Thu, 28 Jul 2016 20:59:59 +0000 (13:59 -0700)]
Revert of Silence -Wclobbered in each file that needs it. (patchset #2 id:20001 of https://codereview.chromium.org/2184823009/ )

Reason for revert:
Jpeg strategy seems to be leading to crashes.  Gonna go back to warning squelch.

Original issue's description:
> Silence -Wclobbered in each file that needs it.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184823009
>
> Committed: https://skia.googlesource.com/skia/+/03f704a343d7a82974f977eda8789a8c721c93e5

TBR=msarett@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/2188313003

8 years agoSerialize SkColorSpace into DeferredTextureImage
bsalomon [Thu, 28 Jul 2016 20:37:31 +0000 (13:37 -0700)]
Serialize SkColorSpace into DeferredTextureImage

This fixes a memory leak that occurs when DeferredTextureImage is deallocated without being destroyed. It is intended to be stored in discarable memory and thus this has to be safe.

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

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

8 years agoSilence -Wclobbered in each file that needs it.
mtklein [Thu, 28 Jul 2016 18:57:30 +0000 (11:57 -0700)]
Silence -Wclobbered in each file that needs it.

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

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

8 years agoFix expectations for GN bot.
jcgregorio [Thu, 28 Jul 2016 18:55:51 +0000 (11:55 -0700)]
Fix expectations for GN bot.

BUG=skia:

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

8 years agoRemove unused render target members from GL and VK sk_app::WindowContext classes
bsalomon [Thu, 28 Jul 2016 18:49:12 +0000 (11:49 -0700)]
Remove unused render target members from GL and VK sk_app::WindowContext classes
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2191673002

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

8 years agoInclude NVPR configs in dm runs on TegraX1
csmartdalton [Thu, 28 Jul 2016 18:48:13 +0000 (11:48 -0700)]
Include NVPR configs in dm runs on TegraX1

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

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

8 years agoGN: add abbreviated versions of the command line as descriptions.
mtklein [Thu, 28 Jul 2016 18:42:34 +0000 (11:42 -0700)]
GN: add abbreviated versions of the command line as descriptions.

This should help make the bot logs a little easier to read.  (On the console
this wasn't much of a big deal, as Ninja auto-abbreviates when printing to an
interactive console.)

As usual, Ninja will print the full command when a task fails.

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

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

8 years agoAdd HardStopGradientBench_ScaleNumHardStops.cpp
fmenozzi [Thu, 28 Jul 2016 17:59:49 +0000 (10:59 -0700)]
Add HardStopGradientBench_ScaleNumHardStops.cpp

Rename HardStopGradientBench.cpp to HardStopGradientBench_ScaleNumColors.cpp

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

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

8 years agoAdd swarmbucket_wrapper recipe
borenet [Thu, 28 Jul 2016 17:50:54 +0000 (10:50 -0700)]
Add swarmbucket_wrapper recipe

BUG=skia:5581
NOTRY=true
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185203003

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

8 years agoAdd writeToMemory() API to SkColorSpace
msarett [Thu, 28 Jul 2016 17:47:50 +0000 (10:47 -0700)]
Add writeToMemory() API to SkColorSpace

New API mirrors the form of similar APIs in SkRegion,
SkMatrix, etc.

This also fixes a bug:
SkImageInfo appears in a object that Chrome stores in
discardable memory. So when sk_sp<SkColorSpace> was added
to SkImageInfo a leak was introduced. We'll use this new
method and deserialize to store the SkColorSpace in the
discardable object.

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

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

8 years agoGN: fix mac build again
mtklein [Thu, 28 Jul 2016 16:58:44 +0000 (09:58 -0700)]
GN: fix mac build again

Hoping to land these using the other GN bots as trybots.

Don't know what magic was letting us get to webp's headers yesterday on Linux.  Might have been using /usr/include's ?

The other change is the difference between some setups using #define SK_BUILD_FOR_MAC and others #define SK_BUILD_FOR_MAC 1.  We want either to mean "we're Mac".

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

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

8 years agoSkPaint intercept API for SkTextBlob and horizontal text
fmalita [Thu, 28 Jul 2016 16:47:24 +0000 (09:47 -0700)]
SkPaint intercept API for SkTextBlob and horizontal text

Add getPosTextHIntercepts(), getTextBlobIntercepts().

Consolidate the implementation in GetTextIntercepts<> template.

BUG=chormium:581456
R=caryclark@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2186663004

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

8 years agoMake both SK_API definition points identical and order independent.
mtklein [Thu, 28 Jul 2016 16:45:14 +0000 (09:45 -0700)]
Make both SK_API definition points identical and order independent.

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

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

8 years agorecipes: Add a GN flavor.
jcgregorio [Thu, 28 Jul 2016 16:38:59 +0000 (09:38 -0700)]
recipes: Add a GN flavor.

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

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

8 years agoAdd SkGammaColorFilter
robertphillips [Thu, 28 Jul 2016 16:20:33 +0000 (09:20 -0700)]
Add SkGammaColorFilter

WDYT about this as a means of replacing GrContext::applyGamma with a normal SkCanvas::drawImage?

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

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

8 years agoFixes for SwarmBucket bot
borenet [Thu, 28 Jul 2016 15:58:38 +0000 (08:58 -0700)]
Fixes for SwarmBucket bot

- Print all build properties for debugging purposes.
- Use correct path root for swarmbucket.
- Write a dummy .gclient file if missing.

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

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

8 years agoAdded API for Bevel NormalSource.
dvonbeck [Thu, 28 Jul 2016 15:58:19 +0000 (08:58 -0700)]
Added API for Bevel NormalSource.

This CL adds an API  for Bevel normal source and a dummy implementation that returns a normal (0, 0, 1) every time.

This CL's base is the CL for accepting nullptrs: https://codereview.chromium.org/2132113002

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

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

8 years agoRemove unused sk_app::WindowContext::presentRenderSurface
bsalomon [Thu, 28 Jul 2016 15:53:13 +0000 (08:53 -0700)]
Remove unused sk_app::WindowContext::presentRenderSurface
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184273002

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

8 years agoDon't call finish on GrDrawTarget if we drew no batches
egdaniel [Thu, 28 Jul 2016 15:53:07 +0000 (08:53 -0700)]
Don't call finish on GrDrawTarget if we drew no batches

This might give us some minor perf gains in vulkan since we won't be submitting
command buffers that we've added to batch draws to. Running nanobench this does
seem to happen pretty often.

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

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

8 years agoRevert of align cap hairline first point (patchset #2 id:20001 of https://codereview...
tomhudson [Thu, 28 Jul 2016 14:36:28 +0000 (07:36 -0700)]
Revert of align cap hairline first point (patchset #2 id:20001 of https://codereview.chromium.org/2189583003/ )

Reason for revert:
Speculative revert in case this is blocking our roll.

Original issue's description:
> align cap hairline first point
>
> Hairlines with square caps move the endpoints out by 1/2 pixel.
> The last point needs to be the first adjusted point, instead
> of the point supplied to move to.
>
> R=fmalita@chromium.org
> TBR=reed@google.com
> BUG=617658
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2189583003
>
> Committed: https://skia.googlesource.com/skia/+/52f85d4d09b815fce6bfe296a1dd2cbf8d792f05

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

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

8 years agoTurn on flags to enforce SK_API.
mtklein [Wed, 27 Jul 2016 21:59:08 +0000 (14:59 -0700)]
Turn on flags to enforce SK_API.

These flags hide symbols that are not marked with SK_API when linked into a
shared library.  There's nominally no effect on static linking, but I'm
pretty sure the Mac linker takes some advantage of this too to run faster.

This makes component-build DM no longer link: it uses many non SK_API APIs.
Fiddle in contrast is just fine with our public APIs, so no need to restrict that.

It'll be fun finding out which of our other tools go which ways.

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

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

8 years agoSkPdf: SkPDFFormXObject de-class-ified.
halcanary [Wed, 27 Jul 2016 21:49:46 +0000 (14:49 -0700)]
SkPdf: SkPDFFormXObject de-class-ified.

We don't need an object, just a few standard fields on the
base class; the change lets us get rid of a bunch of
boilerplate code.

I think this also reduces the cognitive load of the SkPDF
internals.

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

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

8 years agoupload_bench_results - fix GS upload path.
jcgregorio [Wed, 27 Jul 2016 21:34:06 +0000 (14:34 -0700)]
upload_bench_results - fix GS upload path.

_UploadJSONResults does '/'.join() so the trailing / is unnecessary.

BUG=skia:
R=borenet
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187903003

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

8 years agoEnable backend switching for Windows Viewer
jvanverth [Wed, 27 Jul 2016 21:29:18 +0000 (14:29 -0700)]
Enable backend switching for Windows Viewer

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

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

8 years agoSkPDF: refactor font subset: fewer copies
halcanary [Wed, 27 Jul 2016 21:14:04 +0000 (14:14 -0700)]
SkPDF: refactor font subset: fewer copies

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

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

8 years agoFix silently-failing compile
borenet [Wed, 27 Jul 2016 21:05:54 +0000 (14:05 -0700)]
Fix silently-failing compile

Ouch...

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

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

8 years agoGN: dm
mtklein [Wed, 27 Jul 2016 20:55:26 +0000 (13:55 -0700)]
GN: dm

This builds, links, and runs on Linux.  Have not tried Mac.

I've tested is_debug={true,false} and is_component_build.
It's neat that the component build DM works, but it's also an indication I've missed an essential flag or two... it shouldn't work. :)

The GPU backend isn't working yet, but all the software configurations I've tried look good.

This fleshes out all the other parts of SkCodec too... I noticed we weren't able to decode gifs or webp.

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

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

8 years agoExpose more gamma info for UMA statistics
msarett [Wed, 27 Jul 2016 20:51:46 +0000 (13:51 -0700)]
Expose more gamma info for UMA statistics

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

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

8 years agoFix GrDrawContextPriv::stencilRect
csmartdalton [Wed, 27 Jul 2016 20:22:27 +0000 (13:22 -0700)]
Fix GrDrawContextPriv::stencilRect

Updates stencilRect to call drawNonAAFilledRect instead of
drawFilledRect. drawFilledRect can use coverage AA, which isn't
appropriate for stencil draws. Also modifies drawNonAAFilledRect to
take a "useHWAA" argument instead of trying to deduce whether it
should be used.

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

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

8 years agoAdd Vulkan runtime dll
kjlubick [Wed, 27 Jul 2016 19:59:12 +0000 (12:59 -0700)]
Add Vulkan runtime dll

This gets copied into the out/ dir on compile and allows dm.exe to run anywhere, even if the Vulkan SDK is not installed.

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

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

8 years agoalign cap hairline first point
caryclark [Wed, 27 Jul 2016 19:50:09 +0000 (12:50 -0700)]
align cap hairline first point

Hairlines with square caps move the endpoints out by 1/2 pixel.
The last point needs to be the first adjusted point, instead
of the point supplied to move to.

R=fmalita@chromium.org
TBR=reed@google.com
BUG=617658
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2189583003

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

8 years agoMake the experimental SwarmBucket bot use the SkiaTriggers pool
borenet [Wed, 27 Jul 2016 19:45:35 +0000 (12:45 -0700)]
Make the experimental SwarmBucket bot use the SkiaTriggers pool

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

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

8 years agoDEPS: sfntly 468cad5 → b18b09b
halcanary [Wed, 27 Jul 2016 19:28:55 +0000 (12:28 -0700)]
DEPS: sfntly 468cad5 → b18b09b

SfntlyWrapper::SubsetFont now takes TTC index, needed for SkPDF.

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

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

8 years agoRename GrContext's newDrawContext & drawContext to makeDrawContext
robertphillips [Wed, 27 Jul 2016 19:13:51 +0000 (12:13 -0700)]
Rename GrContext's newDrawContext & drawContext to makeDrawContext

These both return sk_sp.

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

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

8 years agoMake the yasm copy target be type 'none' rather than type 'executable'
bsalomon [Wed, 27 Jul 2016 19:07:43 +0000 (12:07 -0700)]
Make the yasm copy target be type 'none' rather than type 'executable'
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2182873005

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

8 years agorequire semi at the end of SkASSERT and friends
caryclark [Wed, 27 Jul 2016 19:02:07 +0000 (12:02 -0700)]
require semi at the end of SkASSERT and friends

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

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

8 years agoGN: fixes for Mac
mtklein [Wed, 27 Jul 2016 18:17:18 +0000 (11:17 -0700)]
GN: fixes for Mac

 - Make fiddle build on Mac (skipping GL).
 - Now that we're building in SkCodec, we depend on libpng and libjpeg-turbo unconditionally, not just on Linux.
 - Re-arrange third_party a bit so that our targets are Fuchsia/Chrome compatible.

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

NOTREECHECKS=true
This doesn't affect Chrome/Blink, so landing through the closed tree.

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

8 years agoSkPDF: SkPDFStream takes a unique_ptr
halcanary [Wed, 27 Jul 2016 18:12:23 +0000 (11:12 -0700)]
SkPDF: SkPDFStream takes a unique_ptr

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

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

8 years agoRename textual includes as *.inc.
benjaminwagner [Wed, 27 Jul 2016 18:12:12 +0000 (11:12 -0700)]
Rename textual includes as *.inc.

This makes it easier to distinguish source files that can stand on their own vs files meant to be #included into other source files.

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

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

8 years agoDEPS: ICU c291cde → ec9c113
halcanary [Wed, 27 Jul 2016 17:13:25 +0000 (10:13 -0700)]
DEPS: ICU c291cde → ec9c113

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

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

8 years agoDEPS: harfbuzz 1.2.7 → 1.3.0
halcanary [Wed, 27 Jul 2016 17:08:39 +0000 (10:08 -0700)]
DEPS:  harfbuzz 1.2.7 → 1.3.0

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

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

8 years agoDEPS: sfntly 130f832 → 468cad5
halcanary [Wed, 27 Jul 2016 17:08:18 +0000 (10:08 -0700)]
DEPS:  sfntly 130f832 → 468cad5

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

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

8 years agoInclude "revision" tag for all Swarming tasks
borenet [Wed, 27 Jul 2016 16:36:17 +0000 (09:36 -0700)]
Include "revision" tag for all Swarming tasks

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

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

8 years agoFix ParseConfigs_ViaParsing test when skia_angle=1
brianosman [Wed, 27 Jul 2016 16:21:51 +0000 (09:21 -0700)]
Fix ParseConfigs_ViaParsing test when skia_angle=1

The handling of angle-gl changes with SK_ANGLE. We don't have any bots
that test this particular combination, but I see it all the time while
running DM for other things.

Previously considered changing things so that the config parsing results
are consistent, regardless of GYP_DEFINES, but this is much simpler (and
more consistent with the other code we already have for testing config
parsing).

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

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

8 years agoFix leak of srgb/adobesrgb colorspace objects
bsalomon [Wed, 27 Jul 2016 15:58:31 +0000 (08:58 -0700)]
Fix leak of srgb/adobesrgb colorspace objects

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

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

8 years agoFix Perf data upload
borenet [Wed, 27 Jul 2016 15:51:55 +0000 (08:51 -0700)]
Fix Perf data upload

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

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

8 years agoSW backend for viewer on Windows
bsalomon [Wed, 27 Jul 2016 15:50:12 +0000 (08:50 -0700)]
SW backend for viewer on Windows
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2182273002

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

8 years agofuzz wednesday
caryclark [Wed, 27 Jul 2016 15:46:10 +0000 (08:46 -0700)]
fuzz wednesday

Add debug 'skip assert' access to SkCoincidentSpans.
That permits suppressing asserts to make it easier
to detect when this fuzz data generates unparsable
data.

TBR=reed@google.com
BUG=631564, 631992
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2186973002

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

8 years agoClean up some unused atomic routines.
mtklein [Wed, 27 Jul 2016 15:40:45 +0000 (08:40 -0700)]
Clean up some unused atomic routines.

AtomicTest was the only use of sk_atomic_add().
AtomicInc64 bench was the only use of sk_atomic_inc(int64_t*).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2183473005
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN-Trybot,Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Release-TSAN-Trybot

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

8 years agoAdd gyp define to enable vulkan debug layers
egdaniel [Wed, 27 Jul 2016 15:03:57 +0000 (08:03 -0700)]
Add gyp define to enable vulkan debug layers

On Debug vulkan bots, running with the debug layers on seems to be adding
more than an hour to the total running time. Since we suppress any output
on the bots anyways the debug layers are serving no purpose. Thus I am
adding a gyp define to disable the layers on the bot.

With this change, by default when running vulkan in Debug, the debug_layers
will be enabled. The bots should disable the layers. Android framework
should also have them disabled by default.

TBR=djsollen@google.com

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

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

8 years agoTweaks for the experimental SwarmBucket bot
borenet [Wed, 27 Jul 2016 14:02:08 +0000 (07:02 -0700)]
Tweaks for the experimental SwarmBucket bot

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

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

8 years agoExtend __mulodi4() hack to 32-bit x86.
mtklein [Wed, 27 Jul 2016 12:35:28 +0000 (05:35 -0700)]
Extend __mulodi4() hack to 32-bit x86.

This gets the Android-Clang-x86 perf bot from failing on __mulodi4() to failing on the next problem...

See https://luci-milo.appspot.com/swarming/task/3042e5f68636f810/steps/nanobench/0/stdout

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

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

8 years agoSimplify color space xform storage and usage (float[] vs. SkMatrix44)
brianosman [Wed, 27 Jul 2016 12:25:26 +0000 (05:25 -0700)]
Simplify color space xform storage and usage (float[] vs. SkMatrix44)

Public API is really just internal.

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

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

8 years agoFix Housekeeper-PerCommit
borenet [Wed, 27 Jul 2016 12:21:45 +0000 (05:21 -0700)]
Fix Housekeeper-PerCommit

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

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

8 years agoOnly run recipe simulation tests if infra/ changes.
mtklein [Wed, 27 Jul 2016 11:14:07 +0000 (04:14 -0700)]
Only run recipe simulation tests if infra/ changes.

This should lessen the need for mortals to have coverage.py,
and saves 1.8s (of 3.6s) on my desktop for this non-infra change.

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

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

8 years agoadd unittests for roundtripping premul
reed [Wed, 27 Jul 2016 02:42:04 +0000 (19:42 -0700)]
add unittests for roundtripping premul

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

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

8 years agoInitial SVG model
fmalita [Wed, 27 Jul 2016 01:46:34 +0000 (18:46 -0700)]
Initial SVG model

A minimal subset needed to render tiger.svg: <svg>, <g>, <path>, 'd', 'fill'/'stroke' (color-only), 'transform'.

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

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

8 years agoImplement coverage AA for skewed rects with local coords
csmartdalton [Wed, 27 Jul 2016 00:05:47 +0000 (17:05 -0700)]
Implement coverage AA for skewed rects with local coords

Adds a path fallback for rects with local coords that can't be drawn
with an analytic shader. This is accomplished by modifying the view
matrix and then drawing the local rect/quad.

BUG=skia:5500, 7508
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2183223002

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

8 years agoAvoid warnings on GCC 4.8.4
jcgregorio [Tue, 26 Jul 2016 21:10:17 +0000 (14:10 -0700)]
Avoid warnings on GCC 4.8.4

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

[mtklein adds...]
TBR=reed@google.com
No public API changes.

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

8 years agoStart on fiddle.
mtklein [Tue, 26 Jul 2016 20:55:45 +0000 (13:55 -0700)]
Start on fiddle.

Mostly stolen from Joe.

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

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

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