platform/upstream/libSkiaSharp.git
7 years agoTurn on concave analytic AA
Yuqian Li [Tue, 17 Jan 2017 21:15:06 +0000 (16:15 -0500)]
Turn on concave analytic AA

This will allow Skia trybots to exercise analytic AA. But there's still
a guard flag in Chromium that prevents layout tests failure.

Additionally, we
1. fixed nagative shift problem
2. relax the ASSERT when slope is too large: If slope is large, the accuracy of the slope is limited due
to conversion to SkFDot6 and division. Hence we have to relax the constraint.
3. handle the special case where dx != 0 while slope == 0 because of very large dy and limited precision.

BUG=skia:

Change-Id: Ice70164f3f396f0db3896bedc7b96fbd613078dc
Reviewed-on: https://skia-review.googlesource.com/7120
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>

7 years agoRoll Recipe DEPS
Eric Boren [Wed, 18 Jan 2017 14:47:28 +0000 (09:47 -0500)]
Roll Recipe DEPS

build:
9d148ff Dart: update ASAN bots with new GN build environment variables.
32ca07f Dart: Remove "--exclude-suite=pkg" from builder commands
06034fe Adding new Mac Mini 8GB vm to waterfall.
ef69d02 Roll recipe dependencies (trivial).
4145f27 Report ANGLE DLL sizes.
ef3c5b8 Remove some old cruft from file module.
23a7971 Use recipes' own bootstrap instead of build repo's third_party s
8d30f42 Revert "Use recipes' own bootstrap instead of build repo's third
8593c2c Take 2: Use bootstrap if we can't import coverage during recipe_
4f0412a Roll recipe dependencies (trivial).
fe2f60d Roll recipe dependencies (trivial).
de4b06e V8: Reduce variants on slow bot and add shards on another
cb42bda Rename Mac 10.10 bisect bots to Mac 10.12.
0d22ef1 Roll recipe dependencies (trivial).
64e721b chartjson upload: Don't upload with no data
8b9588d Manually set encoding for html page as UTF-8.
f428765 Fix the border color of status cells.
0f43046 perf_dashboard: Use args to pass and output data
74cd943 [Findit] Include step_metadata in Findit recipes' result report.
438f445 Revert "chartjson upload: Don't upload with no data"
626496b Cleanup unneeded files from build archives.
edccd96 Get rid of passing separate api object around in chromium_tests
f543594 Add missing comma to filter_build_files.py.
8e3c7bf Add more names to be excluded in filter_build_files.py.
6e8aadb Revert "Get rid of passing separate api object around in chromiu
6708a01 Get rid of passing separate api object around in chromium_tests
61e29b6 Adds Gold upload support to the pdfium recipe.
c6ff1f3 Fixe small bug in pdfium recipe
a506fb2 Make sure revision value is added when running trybots
b00fc85 Revert "Make sure revision value is added when running trybots"
c93a38c Revert "Fixe small bug in pdfium recipe"
42d1235 TBR=dsansome@chromium.org
76d62a0 Roll recipe dependencies (trivial).
011ee29 Roll recipe dependencies (trivial).
3e194cb Get rid of passing separate api object around in chromium_tests
69437e7 Added flutter.jar to uploaded artifacts for x86.
3bb8075 Bisect - Rework perf_try to use compare_samples to parse values.
c9c9234 Should not set up goma on 32bit Windows and Linux.
4a64172 Add more logging for errors uploading to test-results
b6bb03e Log time of the request to find matching server request
5dfca39 Adjust config level and use datetime module to format current UT
1215a71 v8: add script to compute build dependency statistics
f96c93e V8: Output build dependencies on x64 builder
02359c1 V8: Upload build dependencies to perf dashboard
47ff677 [perf] Fix typo. s/isolate_map/isolated_map.
26b0ef9 swarming: Clean up infrastructure handling logic
b0d760f [Android] Remove blimp_test_apk from the FindAnnotatedTests.
4b21c40 Roll recipe dependencies (trivial).
7808adc Improve recipe_simulation_test.py for bots and devs.
7d494c6 Fix bug in chartjson upload code
ddbb900 Remove build-side references to blimp.
81e709d Remove gnumbd tree closing from gatekeeper config.
bdbdb5a Raise exception when failed to start goma in main waterfall
e818a6f V8: Use better path for uploading build dependency stats

depot_tools:
b56ad33 Respect -t/--title in initial cl uploads to Gerrit
0fd68fa Roll recipe dependencies (trivial).
5ededcb Clear Zone.Identifier to allow depot_tools.zip bootstrap
59f4851 Don't send email to CCs by default on initial upload
6428784 Display Short URLs in Issues
d0c226a Output missing LGTMs notification also on dry-run
54985b6 Improve clang-format error messages when run outside of chromium

recipe_engine:
86fea56 Use basestring as a default type for enum

skia-recipes:
071ac85 Roll Recipe DEPS

Change-Id: Ie0391b3330e007a2411c8d5f31c09094f8354511
Reviewed-on: https://skia-review.googlesource.com/7171
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoAdd Vulkan SDK for Linux asset
Kevin Lubick [Wed, 18 Jan 2017 14:24:56 +0000 (09:24 -0500)]
Add Vulkan SDK for Linux asset

Also add Vulkan tasks for Linux NUC to use the asset.  Still need to
update the recipes, which will happen in a followup CL.

BUG=skia:6089

Change-Id: Ie215c98a03016c00ee2f2c8da281fd565e8900ce
Reviewed-on: https://skia-review.googlesource.com/7165
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
7 years agoRevert "SkImageInfoValidConversion (part 2)"
Matt Sarett [Wed, 18 Jan 2017 13:39:39 +0000 (13:39 +0000)]
Revert "SkImageInfoValidConversion (part 2)"

This reverts commit 94bd50cc5575b90eb60234399d69905b8651c27e.

Reason for revert: Still breaking roll

Original change's description:
> SkImageInfoValidConversion (part 2)
>
> Disabling non-opaque -> opaque should be fine now that the
> Chrome unit test has been fixed.
>
> BUG=skia:6021
>
> Change-Id: I39f087e2695bdefacf793bd137931e3115ec58cb
> Reviewed-on: https://skia-review.googlesource.com/7121
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

TBR=msarett@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6021

Change-Id: I79843ea6cf60ca94822446c548f3386706924ee6
Reviewed-on: https://skia-review.googlesource.com/7164
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoRevert "move device headers to core"
Mike Reed [Wed, 18 Jan 2017 00:04:52 +0000 (00:04 +0000)]
Revert "move device headers to core"

This reverts commit 98420d0c9b5934d6b08ea994844476ddedd23de0.

Reason for revert: <INSERT REASONING HERE>

blink_headless ImageBufferSurface.cpp

Original change's description:
> move device headers to core
>
> CANNOT LAND until we update lots of call-sites
>
> BUG=skia:
>
> Change-Id: Ibb957dbbf5baf2a2920887e48c03709d1f6c51e1
> Reviewed-on: https://skia-review.googlesource.com/6982
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
>

TBR=bungeman@google.com,fmalita@chromium.org,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: I11f108137ed0a8efd553af6ea6039904cf3a3870
Reviewed-on: https://skia-review.googlesource.com/7161
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoAdd Tasks for Linux + Iris 540
Kevin Lubick [Tue, 17 Jan 2017 20:15:40 +0000 (15:15 -0500)]
Add Tasks for Linux + Iris 540

This does not include Vulkan as it doesn't build yet.

BUG=skia:6089

Change-Id: If44616dbd7b2aaa63232dac04e96d8433da7f157
Reviewed-on: https://skia-review.googlesource.com/7113
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
7 years agoFix code that relied on readPixels not doing color space conversion
Brian Osman [Tue, 17 Jan 2017 21:10:07 +0000 (16:10 -0500)]
Fix code that relied on readPixels not doing color space conversion

SampleApp doesn't have (can't easily get) an image, so I couldn't use
the new helper function there. It's probably still worth having?

BUG=skia:

Change-Id: I60c208ff958076015a9539359921b9aff68f25c8
Reviewed-on: https://skia-review.googlesource.com/7129
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agomove device headers to core
Mike Reed [Fri, 13 Jan 2017 03:27:57 +0000 (22:27 -0500)]
move device headers to core

CANNOT LAND until we update lots of call-sites

BUG=skia:

Change-Id: Ibb957dbbf5baf2a2920887e48c03709d1f6c51e1
Reviewed-on: https://skia-review.googlesource.com/6982
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agoRoll skia-recipes
Eric Boren [Tue, 17 Jan 2017 19:35:06 +0000 (14:35 -0500)]
Roll skia-recipes

6815aa7 Use skia/bin/gn instead of skia/buildtools/$(PLATFORM)/gn
ef0ad89 core: Obtain the primary repo URL from the "repository" property

BUG=skia:

Change-Id: I5cd47dd47747565c141240241b1373b34d69bee5
Reviewed-on: https://skia-review.googlesource.com/7123
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoRevert "Continue making Ganesh use absolute texture coordinates"
Joe Gregorio [Tue, 17 Jan 2017 19:20:54 +0000 (19:20 +0000)]
Revert "Continue making Ganesh use absolute texture coordinates"

This reverts commit 4493a9dc9df8cf306a974bde7e0e9c5470ebcdc9.

Reason for revert: Continuing failures https://luci-milo.appspot.com/swarming/task/33c693c3539a1410

Change-Id: Id371d6df6a875a5f6872f4ebd91b08a354d949de
Reviewed-on: https://skia-review.googlesource.com/7125
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
7 years agoSkImageInfoValidConversion (part 2)
Matt Sarett [Tue, 17 Jan 2017 18:57:45 +0000 (13:57 -0500)]
SkImageInfoValidConversion (part 2)

Disabling non-opaque -> opaque should be fine now that the
Chrome unit test has been fixed.

BUG=skia:6021

Change-Id: I39f087e2695bdefacf793bd137931e3115ec58cb
Reviewed-on: https://skia-review.googlesource.com/7121
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoSkSplicer: no need for AI. Clang is good at this.
Mike Klein [Tue, 17 Jan 2017 18:14:17 +0000 (13:14 -0500)]
SkSplicer: no need for AI.  Clang is good at this.

Change-Id: I1d5b82c0c2748b4d206d8d104fdd5dc04dc2693b
Reviewed-on: https://skia-review.googlesource.com/7116
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoPass GrAppliedClip to pipeline creation.
Brian Salomon [Tue, 17 Jan 2017 17:39:53 +0000 (12:39 -0500)]
Pass GrAppliedClip to pipeline creation.

This skips adding the clip's coverage processor to the GrPipelineBuilder before creating GrPipeline.

Change-Id: I1282dd8600701ab2b6a049abd8ad571abbbcbbe5
Reviewed-on: https://skia-review.googlesource.com/7020
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoContinue making Ganesh use absolute texture coordinates
Robert Phillips [Tue, 17 Jan 2017 16:52:21 +0000 (11:52 -0500)]
Continue making Ganesh use absolute texture coordinates

The idea here is that the GrCoordTransform will actually hold a GrTextureProxy (rather than a GrTexture) and then, in GrGLSLPrimitiveProcessor::GetTransformMatrix, use the instantiated width & height (when uploading the transform matrix)

Change-Id: Ibac3a540fcb1967ceef571157d41c1937acfadf8
Reviewed-on: https://skia-review.googlesource.com/6977
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoRevert "Revert "Enforce our rules about valid images when making textures""
Brian Osman [Tue, 17 Jan 2017 16:41:03 +0000 (16:41 +0000)]
Revert "Revert "Enforce our rules about valid images when making textures""

This reverts commit 8bbdd49805bd77fec61e6e31f59d31a361e8be30.

Reason for revert: Original change re-landed.

Original change's description:
> Revert "Enforce our rules about valid images when making textures"
>
> This reverts commit 7035f3c466826a4116e2f31deb64d1645ea9441b.
>
> Reason for revert: Need to revert earlier change to fix DEPS roll.
>
> Original change's description:
> > Enforce our rules about valid images when making textures
> >
> > I'm working to make GrUploadPixmapToTexture more robust
> > and easier to follow. This is one step on that journey.
> >
> > BUG=skia:
> >
> > Change-Id: I3ac39057e20ff8249843bb41ceca25f629aff31c
> > Reviewed-on: https://skia-review.googlesource.com/7037
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > Reviewed-by: Matt Sarett <msarett@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> >
>
> TBR=bsalomon@google.com,msarett@google.com,robertphillips@google.com,brianosman@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I1d7fef2d3777f0fcabc6c36749908409bd31a0f1
> Reviewed-on: https://skia-review.googlesource.com/7094
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
>

TBR=bsalomon@google.com,msarett@google.com,robertphillips@google.com,brianosman@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=skia:

Change-Id: I53319ebca4b13175014e6000d7b613932d02612b
Reviewed-on: https://skia-review.googlesource.com/7114
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoRemove (most) usage of MakeTextureFromPixmap
Brian Osman [Tue, 17 Jan 2017 15:06:20 +0000 (10:06 -0500)]
Remove (most) usage of MakeTextureFromPixmap

Planning to remove this API entirely, as it's not really needed. There is
one remaining call-site that requires a bigger change, so I want to land
these first.

BUG=skia:

Change-Id: I6c6ae88202291c4896c1ba8f47824596ac8a150f
Reviewed-on: https://skia-review.googlesource.com/7105
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoReland "Add SkImageInfoValidConversion() and SkImageInfoIsValid"
Matt Sarett [Tue, 17 Jan 2017 15:48:53 +0000 (10:48 -0500)]
Reland "Add SkImageInfoValidConversion() and SkImageInfoIsValid"

The original is at:
https://skia-review.googlesource.com/c/6887/

The only change to the original is to temporarily comment out
a check in SkImageInfoPriv.h until a Chrome unit test can
be fixed.

The idea is share these standards for the following:
SkImage::readPixels()
SkCanvas::readPixels()
SkCanvas::writePixels()
SkBitmap::readPixels()
SkPixmap::readPixels()

On the raster side, SkPixmap::readPixels() is the right
place to check, because all raster calls go through
there eventually.  Then at lower levels (ex: SkPixelInfo),
we can assert.

There's not really a unifying location for gpu calls,
so I've added this in multiple places.  I haven't really
dug into the gpu code to SkASSERT() on invalid cases
that we will have already caught.

Follow-up work:
Similar refactor for SkReadPixelRec::trim().
Code cleanup in SkPixelInfo::CopyPixels()

BUG=skia:6021

Change-Id: I6a16f9479bc09e3c87e10c72b0378579f1a70866
Reviewed-on: https://skia-review.googlesource.com/7104
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoSimplify GrProcOptInfo initialization.
Brian Salomon [Tue, 17 Jan 2017 15:44:34 +0000 (10:44 -0500)]
Simplify GrProcOptInfo initialization.

Removes unused single channel tracking.

Makes it so that only the op/gp can initiate lcd coverage.

Makes GrProcOptInfo fragment processor analysis continuable.

Change-Id: I003a8aa3836bb64d04b230ddee581dc500e613a9
Reviewed-on: https://skia-review.googlesource.com/7039
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agohide getClipStack
Mike Reed [Mon, 16 Jan 2017 01:02:32 +0000 (20:02 -0500)]
hide getClipStack

BUG=skia:6122

Change-Id: I0aca03b349541174ced019f4f2116e0015c980c4
Reviewed-on: https://skia-review.googlesource.com/7097
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoadd and test SkFixed15::to_u8()
Mike Klein [Tue, 17 Jan 2017 15:19:50 +0000 (10:19 -0500)]
add and test SkFixed15::to_u8()

Change-Id: Iedbcd2d938122cdc8f6b235745eb6165e348c237
Reviewed-on: https://skia-review.googlesource.com/7108
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoGrTessellator: fix for disappearing thin path.
Stephen White [Mon, 16 Jan 2017 16:47:21 +0000 (11:47 -0500)]
GrTessellator: fix for disappearing thin path.

simplify_boundary() was incorrectly comparing squared distances
against a non-squared constant. For .25 of a pixel, we need to
compare against 0.25 squared, or 0.0625.

This also includes a fix to get_edge_normal(), We were actually
returning edge "vectors", instead of edge normals. This wasn't
causing problems, since the error cancels itself out, but it's
confusing.

BUG=skia:

Change-Id: I0d50f2d001ed5e41de2900139c396b9ef75d2ddf
Reviewed-on: https://skia-review.googlesource.com/7043
Commit-Queue: Stephan White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoAdd a bench to exercise legacy-mode SkRasterPipeline behavior.
Mike Klein [Tue, 17 Jan 2017 15:24:15 +0000 (10:24 -0500)]
Add a bench to exercise legacy-mode SkRasterPipeline behavior.

No fancy f16 or sRGB here... just good old legacy 8888.

Change-Id: I21eb7c0d8e2c7a7d92e9d8a8bae9d318c4daa7e5
Reviewed-on: https://skia-review.googlesource.com/7109
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoSkSplicer: fix a typo in srcover stage.
Mike Klein [Tue, 17 Jan 2017 15:16:06 +0000 (10:16 -0500)]
SkSplicer: fix a typo in srcover stage.

Change-Id: Iafd23c860395587c77cd412a3b522ba851b4570d
Reviewed-on: https://skia-review.googlesource.com/7107
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agodo/while loops in SPIR-V no longer cause an assertion failure
Ethan Nicholas [Fri, 13 Jan 2017 21:40:35 +0000 (16:40 -0500)]
do/while loops in SPIR-V no longer cause an assertion failure

BUG=skia:

Change-Id: Ic5f590879d8ada5d4580b5c6e9091ccc9532be4b
Reviewed-on: https://skia-review.googlesource.com/6605
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoUpdate Buildbot doc for Task Scheduler
Eric Boren [Tue, 17 Jan 2017 12:26:41 +0000 (07:26 -0500)]
Update Buildbot doc for Task Scheduler

BUG=skia:6118

NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=7023

Change-Id: I398f4fd98959bb37bcb5499d38e517542e0df90f
Reviewed-on: https://skia-review.googlesource.com/7023
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
7 years agoTest PG
Ravi Mistry [Tue, 17 Jan 2017 13:42:11 +0000 (08:42 -0500)]
Test PG

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
NOTRY=true
BUG=skia:

Change-Id: Ida204d1c58671c4d79d6fc3d95bf8ddf3cef77b4
Reviewed-on: https://skia-review.googlesource.com/7103
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoTemporarily restore FixedAllocTest.cpp
Mike Klein [Tue, 17 Jan 2017 13:18:02 +0000 (08:18 -0500)]
Temporarily restore FixedAllocTest.cpp

This adds it back as an empty file, so that the existing Android DM
build keeps working.  We can remove it once DM's Android build config
is generated with gn_to_bp.py too.

Change-Id: I27b8ff480044a0824d24395c4498bf593cdd9747
Reviewed-on: https://skia-review.googlesource.com/7102
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoMove recipe modules to shared repo
Eric Boren [Fri, 13 Jan 2017 18:37:53 +0000 (13:37 -0500)]
Move recipe modules to shared repo

BUG=skia:6070

Change-Id: I6c487e77ddfddb6164b983981dff5ee8ae870376
Reviewed-on: https://skia-review.googlesource.com/6946
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Stephan Altmueller <stephana@google.com>
7 years agoSplit ShadowMaskFilter into separate ambient and spot mask filters
Jim Van Verth [Mon, 16 Jan 2017 18:03:37 +0000 (13:03 -0500)]
Split ShadowMaskFilter into separate ambient and spot mask filters

This does not change the public API.

BUG=skia:6119

Change-Id: Ibdcd2f8611bc2eec332d8a65e5d51246b89a0a90
Reviewed-on: https://skia-review.googlesource.com/7083
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRemove SkFallbackAlloc and SkFixedAlloc.
Herb Derby [Fri, 13 Jan 2017 22:34:33 +0000 (17:34 -0500)]
Remove SkFallbackAlloc and SkFixedAlloc.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN;skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

TBR=reed@google.com

Change-Id: I1000dc9ed8ad65b249798759d9af99f47fc237d2
Reviewed-on: https://skia-review.googlesource.com/6809
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoUpdate SKP version
UpdateSKPs [Sun, 15 Jan 2017 07:00:37 +0000 (07:00 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

Change-Id: I029f220cc2d35d6567e02dbaea3a118ef60ded77
Reviewed-on: https://skia-review.googlesource.com/7042
Reviewed-by: update-skps <update-skps@skia.org>
Commit-Queue: update-skps <update-skps@skia.org>

7 years agoRevert "Add SkImageInfoValidConversion() and SkImageInfoIsValid"
Brian Osman [Sat, 14 Jan 2017 23:43:24 +0000 (23:43 +0000)]
Revert "Add SkImageInfoValidConversion() and SkImageInfoIsValid"

This reverts commit cf5d6caff7a58f1c7ecc36d9a91ccdada5fc7b78.

Reason for revert: Chrome DEPS roll failing, based on the unit tests, I suspect this is the cause.

Original change's description:
> Add SkImageInfoValidConversion() and SkImageInfoIsValid
>
> The idea is share these standards for the following:
> SkImage::readPixels()
> SkCanvas::readPixels()
> SkCanvas::writePixels()
> SkBitmap::readPixels()
> SkPixmap::readPixels()
>
> On the raster side, SkPixmap::readPixels() is the right
> place to check, because all raster calls go through
> there eventually.  Then at lower levels (ex: SkPixelInfo),
> we can assert.
>
> There's not really a unifying location for gpu calls,
> so I've added this in multiple places.  I haven't really
> dug into the gpu code to SkASSERT() on invalid cases
> that we will have already caught.
>
> Follow-up work:
> Similar refactor for SkReadPixelRec::trim().
> Code cleanup in SkPixelInfo::CopyPixels()
>
> BUG=skia:6021
>
> Change-Id: I91ecce10e46c1a6530f0af24a9eb8226dbecaaa2
> Reviewed-on: https://skia-review.googlesource.com/6887
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>

TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org
# Not skipping CQ checks because original CL landed > 1 day ago.
BUG=skia:6021

Change-Id: I63b88e90bdbb3051a14de00ac73a8351ab776d25
Reviewed-on: https://skia-review.googlesource.com/7095
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoRevert "Enforce our rules about valid images when making textures"
Brian Osman [Sat, 14 Jan 2017 23:41:12 +0000 (23:41 +0000)]
Revert "Enforce our rules about valid images when making textures"

This reverts commit 7035f3c466826a4116e2f31deb64d1645ea9441b.

Reason for revert: Need to revert earlier change to fix DEPS roll.

Original change's description:
> Enforce our rules about valid images when making textures
>
> I'm working to make GrUploadPixmapToTexture more robust
> and easier to follow. This is one step on that journey.
>
> BUG=skia:
>
> Change-Id: I3ac39057e20ff8249843bb41ceca25f629aff31c
> Reviewed-on: https://skia-review.googlesource.com/7037
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Matt Sarett <msarett@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

TBR=bsalomon@google.com,msarett@google.com,robertphillips@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: I1d7fef2d3777f0fcabc6c36749908409bd31a0f1
Reviewed-on: https://skia-review.googlesource.com/7094
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoEnforce our rules about valid images when making textures
Brian Osman [Fri, 13 Jan 2017 20:50:18 +0000 (15:50 -0500)]
Enforce our rules about valid images when making textures

I'm working to make GrUploadPixmapToTexture more robust
and easier to follow. This is one step on that journey.

BUG=skia:

Change-Id: I3ac39057e20ff8249843bb41ceca25f629aff31c
Reviewed-on: https://skia-review.googlesource.com/7037
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agosavelayer gm
Mike Reed [Sat, 14 Jan 2017 18:45:02 +0000 (13:45 -0500)]
savelayer gm

BUG=skia:

Change-Id: Ie24ed6e450b77447a75b5b9bdd0a4516cca5e85c
Reviewed-on: https://skia-review.googlesource.com/7093
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoRevert "Exercise concave analytic AA"
Mike Reed [Sat, 14 Jan 2017 16:53:13 +0000 (16:53 +0000)]
Revert "Exercise concave analytic AA"

This reverts commit 480a1c6a1643ccbe959fa849fb91df6d86d51ec3.

Reason for revert: <INSERT REASONING HERE>

2.32m done  8888 skp  http___www_yespornplease_com.skp
2.32m start 8888 skp  http___www_freepostcodelottery_com.skp
2.32m done  8888 skp  http___www_pingwest_com.skp
2.32m start 8888 skp  http___www_fbdown_net.skp
../../../../../work/skia/src/core/SkAnalyticEdge.cpp:116: fatal error: "assert(slope == SK_MaxS32 || SkAbs32(fSnappedX + SkFixedMul(slope, newSnappedY - fSnappedY) - newSnappedX) < SK_FixedHalf)"

../../../src/core/SkScan_AAAPath.cpp:746:61: runtime error: left shift of negative value -1
    #0 0x30c120a in blit_aaa_trapezoid_row(AdditiveBlitter*, int, int, int, int, int, int, int, unsigned char, unsigned char*, bool, bool, bool) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30c120a)
    #1 0x30bc557 in aaa_walk_edges(SkAnalyticEdge*, SkAnalyticEdge*, SkPath::FillType, AdditiveBlitter*, int, int, int, int, bool, bool, bool, bool) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30bc557)
    #2 0x30aed31 in aaa_fill_path(SkPath const&, SkIRect const&, AdditiveBlitter*, int, int, bool, bool, bool) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30aed31)
    #3 0x30addc5 in SkScan::AAAFillPath(SkPath const&, SkRegion const&, SkBlitter*, bool) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30addc5)
    #4 0x30af56d in SkScan::AAAFillPath(SkPath const&, SkRasterClip const&, SkBlitter*) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30af56d)
    #5 0x30dc96b in SkScan::AntiFillPath(SkPath const&, SkRasterClip const&, SkBlitter*) (/b/swarm_slave/w/irNiQodn/out/Debug/dm+0x30dc96b)

Original change's description:
> Exercise concave analytic AA
>
> This will allow Skia trybots (e.g., 1M skp) to exercise analytic AA.
> There's still a guard flag in Chromium that prevents layout tests failure.
>
> TBR=reed@google.com,caryclark@google.com
>
> BUG=skia:
>
> Change-Id: Ie893c10d34bf969e013ef047c1bbf4b004d584cc
> Reviewed-on: https://skia-review.googlesource.com/7091
> Reviewed-by: Yuqian Li <liyuqian@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>
>

TBR=caryclark@google.com,liyuqian@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: I9b621f2d0cd143b37a2570a10471d2ad8cb149fd
Reviewed-on: https://skia-review.googlesource.com/7092
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoExercise concave analytic AA
Yuqian Li [Sat, 14 Jan 2017 15:00:23 +0000 (10:00 -0500)]
Exercise concave analytic AA

This will allow Skia trybots (e.g., 1M skp) to exercise analytic AA.
There's still a guard flag in Chromium that prevents layout tests failure.

TBR=reed@google.com,caryclark@google.com

BUG=skia:

Change-Id: Ie893c10d34bf969e013ef047c1bbf4b004d584cc
Reviewed-on: https://skia-review.googlesource.com/7091
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>

7 years agoRevert "move SkDevice.h and SkBitmapDevice.h contents in to src headers"
Mike Reed [Fri, 13 Jan 2017 22:43:16 +0000 (22:43 +0000)]
Revert "move SkDevice.h and SkBitmapDevice.h contents in to src headers"

This reverts commit 2f719a6b9214997e4cc24646d4b280038962b836.

Reason for revert: <INSERT REASONING HERE>

swf/transform/jsrunner/swiffy_canvas.h

caller included SkDevice.h, but really wanted SkBitmap and SkColor

Original change's description:
> move SkDevice.h and SkBitmapDevice.h contents in to src headers
>
> BUG=skia:
>
> Change-Id: I3d8d313f0500c13db21cb973fed4064ec3816912
> Reviewed-on: https://skia-review.googlesource.com/7082
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
>

TBR=bungeman@google.com,fmalita@chromium.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: I40f7f1e4ad62685facdd39492da7a0b105178221
Reviewed-on: https://skia-review.googlesource.com/7087
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agomove SkDevice.h and SkBitmapDevice.h contents in to src headers
Mike Reed [Fri, 13 Jan 2017 20:44:27 +0000 (15:44 -0500)]
move SkDevice.h and SkBitmapDevice.h contents in to src headers

BUG=skia:

Change-Id: I3d8d313f0500c13db21cb973fed4064ec3816912
Reviewed-on: https://skia-review.googlesource.com/7082
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoFix ASAN
Matt Sarett [Fri, 13 Jan 2017 20:42:45 +0000 (15:42 -0500)]
Fix ASAN

NOTREECHECKS=true

BUG=skia:

Change-Id: I8104112ade6671b06fb5eb83b73f691fee99ea80
Reviewed-on: https://skia-review.googlesource.com/7081
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoFix syntax error for adjusting old stdc++ headers.
Herb Derby [Fri, 13 Jan 2017 20:17:02 +0000 (15:17 -0500)]
Fix syntax error for adjusting old stdc++ headers.

Change-Id: Ibc99ae943b275b770e8767b80400b8e1520e70a5
Reviewed-on: https://skia-review.googlesource.com/7035
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
7 years agoFix Android roll
Mike Klein [Fri, 13 Jan 2017 20:27:45 +0000 (15:27 -0500)]
Fix Android roll

    - only depend on cpu-features when we know we have an NDK
    - disable SkSplicer

Change-Id: I89e4cc70d6ddf0ebb7005d1cb453768d946cd205
Reviewed-on: https://skia-review.googlesource.com/7060
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoUse GrRenderTargetContext::readPixels in GrTextureToYUVPlanes
Robert Phillips [Fri, 13 Jan 2017 19:55:50 +0000 (14:55 -0500)]
Use GrRenderTargetContext::readPixels in GrTextureToYUVPlanes

This is salvaged from an ancient CL or mine. Thoughts?

Change-Id: I3712ca911d1ab5def3f4dcb080a3f9e226cdd44b
Reviewed-on: https://skia-review.googlesource.com/7031
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoRemove (unused) YUV API from SkPixelRef
Brian Osman [Fri, 13 Jan 2017 19:58:32 +0000 (14:58 -0500)]
Remove (unused) YUV API from SkPixelRef

YUV conversion happens via SkImage now.

BUG=skia:

Change-Id: I6e1fa18effb72cbb00a173a346769b873e372c40
Reviewed-on: https://skia-review.googlesource.com/7034
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoSkSplicer: implement load_tables and matrix_3x4
Mike Klein [Fri, 13 Jan 2017 18:18:44 +0000 (13:18 -0500)]
SkSplicer: implement load_tables and matrix_3x4

These are enough to splice interesting SkColorSpaceXform pipelines.

SkSplicer_stages.cpp is similar to but still intentionally distinct from
SkRasterPipeline_opts.  I hope to unify them next week.

unaligned_load() is nothing tricky... just a little refactor.

Change-Id: I05d0fc38dac985aa351d88776ecc14d2457f2124
Reviewed-on: https://skia-review.googlesource.com/7022
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoDecode system font weight correctly on Mac.
bungeman [Fri, 13 Jan 2017 16:40:21 +0000 (11:40 -0500)]
Decode system font weight correctly on Mac.

The -1 to 1 weights reported by CTFontDescriptors have different mappings
depending on if the CTFont is native or created from a CGDataProvider.

Change-Id: I725b04a31c224a4b01c0763137fa04bb4088def7
Reviewed-on: https://skia-review.googlesource.com/6979
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoRevert "Optimize SkBlend by using NEON intrinsics"
Mike Klein [Fri, 13 Jan 2017 20:10:09 +0000 (20:10 +0000)]
Revert "Optimize SkBlend by using NEON intrinsics"

This reverts commit 7adde145d3913cfd67b90bf83a9ea54386a285a7.

Reason for revert: may be breaking our Android One test bots.

Original change's description:
> Optimize SkBlend by using NEON intrinsics
>
> Use NEON intrinsics to check the alpha channel of the pixels.
>
> In some case, it's about 14 times faster than the original implementation.
>
> $ ./bin/droid out/arm64_release/nanobench  --samples 300 --nompd --match LinearSrcOver -v > neon_opt.log
> $ ./bin/compare neon_opt.log clean.log
>      LinearSrcOver_yellow_rose.pngVSkOptsDefault         1.8ms -> 24.9ms        13.8x
>        LinearSrcOver_iconstrip.pngVSkOptsDefault        5.71ms -> 69.8ms        12.2x
>            LinearSrcOver_plane.pngVSkOptsDefault        1.45ms ->   11ms        7.62x
>         LinearSrcOver_baby_tux.pngVSkOptsDefault        1.88ms -> 9.96ms        5.29x
>     LinearSrcOver_mandrill_512.pngVSkOptsDefault        1.41ms -> 4.62ms        3.29x
>      LinearSrcOver_yellow_rose.pngVSkOptsTrivial        24.9ms -> 24.9ms        1x
>  LinearSrcOver_yellow_rose.pngVSkOptsNonSimdCore        2.17ms -> 2.18ms        1x
>            LinearSrcOver_plane.pngVSkOptsTrivial        11.1ms -> 11.1ms        1x
>        LinearSrcOver_plane.pngVSkOptsNonSimdCore         1.5ms ->  1.5ms        1x
> LinearSrcOver_mandrill_512.pngVSkOptsNonSimdCore        2.39ms -> 2.39ms        1x
>    LinearSrcOver_iconstrip.pngVSkOptsNonSimdCore        6.43ms -> 6.43ms        1x
>      LinearSrcOver_baby_tux.pngVSkOptsBruteForce        22.3ms -> 22.3ms        1x
>   LinearSrcOver_yellow_rose.pngVSkOptsBruteForce        45.5ms -> 45.5ms        1x
>     LinearSrcOver_baby_tux.pngVSkOptsNonSimdCore        2.02ms -> 2.02ms        1x
>        LinearSrcOver_iconstrip.pngVSkOptsTrivial        69.7ms -> 69.7ms        1x
>         LinearSrcOver_baby_tux.pngVSkOptsTrivial        9.96ms -> 9.95ms        1x
>  LinearSrcOver_mandrill_512.pngVSkOptsBruteForce        99.3ms -> 99.2ms        1x
>
> BUG=skia:
>
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
>
> Change-Id: Ia576365578d65b771440da65fdf41f090ccf0541
> Reviewed-on: https://skia-review.googlesource.com/6860
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>

TBR=mtklein@chromium.org,bsalomon@google.com,joel.liang@arm.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ie40eb5a7c27807aaf396429a82a1a2dd328c2b5b
Reviewed-on: https://skia-review.googlesource.com/7036
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoMove Android shadow rendering interface to util library.
Jim Van Verth [Fri, 13 Jan 2017 19:37:37 +0000 (14:37 -0500)]
Move Android shadow rendering interface to util library.

BUG=skia:6119

Change-Id: I8318cf2758042ffd0c81c5fa74240acbf7bea61f
Reviewed-on: https://skia-review.googlesource.com/6999
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoRemove most modifiers of processors on GrPipelineBuilder
Brian Salomon [Fri, 13 Jan 2017 17:11:36 +0000 (12:11 -0500)]
Remove most modifiers of processors on GrPipelineBuilder

Change-Id: I2fc12a97d694e5c0d86c9a4e0818a058905c8cf0
Reviewed-on: https://skia-review.googlesource.com/6993
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoFixed another division by zero error in skslc
Ethan Nicholas [Thu, 5 Jan 2017 15:44:25 +0000 (10:44 -0500)]
Fixed another division by zero error in skslc

You'd think by now it would have occurred to me that mod is also a kind
of division.

BUG=skia:6087

Change-Id: I5128d09db94d06f10762ad5c23df32551c5e5855
Reviewed-on: https://skia-review.googlesource.com/6607
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoFix out of bounds read in RP::load_tables_u16_be()
Matt Sarett [Fri, 13 Jan 2017 18:58:57 +0000 (13:58 -0500)]
Fix out of bounds read in RP::load_tables_u16_be()

BUG=skia:

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I4f6dd002b03812d63bf62342c346ea21f6865466
Reviewed-on: https://skia-review.googlesource.com/7027
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoSimplify k.w calculation in getConicKLM.
Dean McNamee [Fri, 13 Jan 2017 12:17:09 +0000 (12:17 +0000)]
Simplify k.w calculation in getConicKLM.

Additionally reformat the equations to better expose the symmetry.

BUG=skia:

Change-Id: If485cc7aeae97b89dedeb4d6b23efbe945036e3a
Reviewed-on: https://skia-review.googlesource.com/7000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Dean McNamee <deanm@chromium.org>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoSwitch a bunch of tests to use DEF_SIMPLE_GM.
Stephen White [Thu, 12 Jan 2017 22:15:50 +0000 (17:15 -0500)]
Switch a bunch of tests to use DEF_SIMPLE_GM.

Should be no user- or test-visible changes.

BUG=skia:

Change-Id: I6499dc978a41fee344b847c118f84227271561c5
Reviewed-on: https://skia-review.googlesource.com/6906
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephan White <senorblanco@chromium.org>

7 years agoAdd SkImageInfoValidConversion() and SkImageInfoIsValid
Matt Sarett [Fri, 13 Jan 2017 17:29:08 +0000 (12:29 -0500)]
Add SkImageInfoValidConversion() and SkImageInfoIsValid

The idea is share these standards for the following:
SkImage::readPixels()
SkCanvas::readPixels()
SkCanvas::writePixels()
SkBitmap::readPixels()
SkPixmap::readPixels()

On the raster side, SkPixmap::readPixels() is the right
place to check, because all raster calls go through
there eventually.  Then at lower levels (ex: SkPixelInfo),
we can assert.

There's not really a unifying location for gpu calls,
so I've added this in multiple places.  I haven't really
dug into the gpu code to SkASSERT() on invalid cases
that we will have already caught.

Follow-up work:
Similar refactor for SkReadPixelRec::trim().
Code cleanup in SkPixelInfo::CopyPixels()

BUG=skia:6021

Change-Id: I91ecce10e46c1a6530f0af24a9eb8226dbecaaa2
Reviewed-on: https://skia-review.googlesource.com/6887
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoIntroduce SkArenaAlloc - should be fast for POD types and RAII for types with dtors.
Herb Derby [Fri, 13 Jan 2017 16:30:44 +0000 (11:30 -0500)]
Introduce SkArenaAlloc - should be fast for POD types and RAII for types with dtors.

- Implementation.
- Use in SkLinearPipeline.

TBR=mtklein@google.com

Change-Id: Ie014184469b217132b0307b5a9ae40c0c60e5fc9
Reviewed-on: https://skia-review.googlesource.com/6921
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agosimplify round_down_to_int by using ceil instead of floor
Lee Salzman [Fri, 13 Jan 2017 17:03:24 +0000 (12:03 -0500)]
simplify round_down_to_int by using ceil instead of floor

BUG=skia:

Change-Id: I465d98d6b0d97e1ede82670c663f9695b5a0a1de
Reviewed-on: https://skia-review.googlesource.com/7041
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>

7 years agoDelay SkPaint->GrPaint conversion in text rendering.
Brian Salomon [Fri, 13 Jan 2017 17:02:17 +0000 (12:02 -0500)]
Delay SkPaint->GrPaint conversion in text rendering.

This fixes an issue where color filters aren't correctly applied to color glyphs. Instead we apply the filter to the SkPaint's color which is correct for mask glyphs only.

Add color filter and alpha + various effects to coloremoji gm

Change-Id: If77dece71d43468fec65499857eaaaedb56428e9
Reviewed-on: https://skia-review.googlesource.com/6891
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
7 years agoRevert "Revert "Hide SkCanvas getDevice() & getTopDevice()}""
Florin Malita [Fri, 13 Jan 2017 16:56:38 +0000 (16:56 +0000)]
Revert "Revert "Hide SkCanvas getDevice() & getTopDevice()}""

This reverts commit e050ca783297db6d88d4d8d0f466f12020747cb8.

Reason for revert: Chromium change is sticking, revert not needed.

Change-Id: Ic3004460606e4c512f79ba0923746706b960881a
Reviewed-on: https://skia-review.googlesource.com/7021
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@google.com>
7 years agocall fetch-gn from git-sync-deps
Mike Klein [Fri, 13 Jan 2017 16:14:50 +0000 (11:14 -0500)]
call fetch-gn from git-sync-deps

https://skia.org/?cl=6994

Change-Id: Icac009bdef49f38ae7b8f082ffda6408481a03cd
Reviewed-on: https://skia-review.googlesource.com/6994
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agosome armv7 hacking
Mike Klein [Thu, 12 Jan 2017 16:36:46 +0000 (11:36 -0500)]
some armv7 hacking

We can splice these stages if we drop them down to 2 at a time.
Turns out this is significantly (2-3x) faster than the status quo.

    SkRasterPipeline_…
    â€¦f16_compile 1x  â€¦srgb_compile 2.06x  â€¦f16_run 3.08x  â€¦srgb_run 4.61x

Added a couple ways to detect (likely) the required VFPv4 support:
   - use hwcap when available (NDK â‰¥21, Android framework)
   - use cpu-features when not (NDK <21)

The code in SkSplicer_generated.h is ARM, not Thumb2.  SkSplicer seems
to be blx'ing into it, so that's great, and we bx lr out.  There's no
point in attempting to use Thumb2 in vector heavy code... it'll all be
4 byte anyway.

Follow ups:
   - vpush {d8-d9} before the loop, vpop {d8-d9} afterwards,
     skip these instructions when splicing;
   - (probably) drop jumping stages down to 2-at-a-time also.

Change-Id: If151394ec10e8cbd6a05e2d81808488d743bfe15
Reviewed-on: https://skia-review.googlesource.com/6940
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoMinor Ganesh refFoo cleanup
Robert Phillips [Fri, 13 Jan 2017 16:21:36 +0000 (11:21 -0500)]
Minor Ganesh refFoo cleanup

Change-Id: I2c66693c280225795a5d36ccc0391fcd4056420d
Reviewed-on: https://skia-review.googlesource.com/6995
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoTry out new refFoo pattern on GrStyle
Robert Phillips [Fri, 13 Jan 2017 16:02:42 +0000 (11:02 -0500)]
Try out new refFoo pattern on GrStyle

Change-Id: Ic7f30e3730a3431adf365d729320fe50f38dcea8
Reviewed-on: https://skia-review.googlesource.com/6907
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoUpdate Nexus Players to N2G10B
Kevin Lubick [Fri, 13 Jan 2017 14:37:03 +0000 (09:37 -0500)]
Update Nexus Players to N2G10B

This will hopefully bring in driver fixes, especially for Vulkan.

BUG=skia:

Change-Id: I6a8f1bf249d78d9360c52e0382250b63ae0cc96d
Reviewed-on: https://skia-review.googlesource.com/6989
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoTry out refFoo pattern on GrRenderTargetContext
Robert Phillips [Fri, 13 Jan 2017 14:18:59 +0000 (09:18 -0500)]
Try out refFoo pattern on GrRenderTargetContext

Change-Id: Ifae5618f30c2202b9083f479b58556709ff6126a
Reviewed-on: https://skia-review.googlesource.com/6990
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoReland https://skia-review.googlesource.com/c/6091/
Yuqian Li [Fri, 13 Jan 2017 15:13:13 +0000 (10:13 -0500)]
Reland https://skia-review.googlesource.com/c/6091/

The only difference is that we now also put the guard flag
SK_SUPPORT_LEGACY_AAA in SkUserConfig.h. Previously, SkAnalyticEdge.cpp doesn't
get that flag from SkScan.h and that caused many problems.

BUG=skia:
TBR=reed@google.com,caryclark@google.com

Change-Id: I134bb76cebd6fffa712f438076668765321bba3b
Reviewed-on: https://skia-review.googlesource.com/6992
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>

7 years agogclient-free download and build instructions.
Mike Klein [Fri, 13 Jan 2017 14:05:46 +0000 (09:05 -0500)]
gclient-free download and build instructions.

https://skia.org/?cl=6988

Change-Id: If1275fe3cb1866216cc24c42c11a2d1f1be04a66
Reviewed-on: https://skia-review.googlesource.com/6988
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoRevert "Hide SkCanvas getDevice() & getTopDevice()}"
Florin Malita [Fri, 13 Jan 2017 15:13:09 +0000 (15:13 +0000)]
Revert "Hide SkCanvas getDevice() & getTopDevice()}"

This reverts commit 76467a11a0aa4ba15f0f2e3ee078ba9b6ecbaa91.

Reason for revert: we may need to revert the Chromium GDI change.

Original change's description:
> Hide SkCanvas getDevice() & getTopDevice()}
>
> No longer used externally.
>
> R=reed@google.com
>
> Change-Id: I450148010852c2567d136d2c85c8837c6dcbc6b9
> Reviewed-on: https://skia-review.googlesource.com/6974
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
>

TBR=fmalita@chromium.org,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: If8480aa5d36ff843c28409a5c94d51570ba0fc1c
Reviewed-on: https://skia-review.googlesource.com/6991
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
7 years agoRemove spurious checks for sRGB float data
Brian Osman [Thu, 12 Jan 2017 22:18:22 +0000 (17:18 -0500)]
Remove spurious checks for sRGB float data

We don't support this. F16 or F32 textures must be built with a linear
transfer function, if any.

BUG=skia:

Change-Id: Ia8d83a03d12ddc3b70f5d7e4fabed72f6c2af538
Reviewed-on: https://skia-review.googlesource.com/6978
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoUnify ICC support for gray jpegs and gray pngs
Matt Sarett [Thu, 12 Jan 2017 23:36:38 +0000 (18:36 -0500)]
Unify ICC support for gray jpegs and gray pngs

(1) Parse ICC gray profiles into RGB SkColorSpace objects.  This is
    easy - "gray transfer fn + white point" is subset of "RGB transfer fns
    + matrix".  This makes it easier/possible for the drawing code to reason
    about color spaces attached to kGray buffers.
(2) Allow gray images to be tagged with gray ICCs OR rgb ICCs.  ICC gray
    forces to designer to use "D50 gray".  It is not uncommon to see gray
    images with RGB profiles - and this actually allows the designer to
    choose more kinds of gray (ex: sRGB gray).
(3) Make SkJpegCodec support gray images with RGB ICCs.
(4) Make SkPngCodec support gray images with Gray ICCs.
(5) Delete gray from SkColorSpace_A2B - we no longer create these objects
    for gray profiles.

BUG=skia:

Change-Id: Id5eca803798330c54a19c4657def2e5976d1941e
Reviewed-on: https://skia-review.googlesource.com/6922
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoHide SkCanvas getDevice() & getTopDevice()}
Florin Malita [Thu, 12 Jan 2017 21:01:30 +0000 (16:01 -0500)]
Hide SkCanvas getDevice() & getTopDevice()}

No longer used externally.

R=reed@google.com

Change-Id: I450148010852c2567d136d2c85c8837c6dcbc6b9
Reviewed-on: https://skia-review.googlesource.com/6974
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoOptimize SkBlend by using NEON intrinsics
Joel Liang [Wed, 11 Jan 2017 06:38:57 +0000 (14:38 +0800)]
Optimize SkBlend by using NEON intrinsics

Use NEON intrinsics to check the alpha channel of the pixels.

In some case, it's about 14 times faster than the original implementation.

$ ./bin/droid out/arm64_release/nanobench  --samples 300 --nompd --match LinearSrcOver -v > neon_opt.log
$ ./bin/compare neon_opt.log clean.log
     LinearSrcOver_yellow_rose.pngVSkOptsDefault         1.8ms -> 24.9ms        13.8x
       LinearSrcOver_iconstrip.pngVSkOptsDefault        5.71ms -> 69.8ms        12.2x
           LinearSrcOver_plane.pngVSkOptsDefault        1.45ms ->   11ms        7.62x
        LinearSrcOver_baby_tux.pngVSkOptsDefault        1.88ms -> 9.96ms        5.29x
    LinearSrcOver_mandrill_512.pngVSkOptsDefault        1.41ms -> 4.62ms        3.29x
     LinearSrcOver_yellow_rose.pngVSkOptsTrivial        24.9ms -> 24.9ms        1x
 LinearSrcOver_yellow_rose.pngVSkOptsNonSimdCore        2.17ms -> 2.18ms        1x
           LinearSrcOver_plane.pngVSkOptsTrivial        11.1ms -> 11.1ms        1x
       LinearSrcOver_plane.pngVSkOptsNonSimdCore         1.5ms ->  1.5ms        1x
LinearSrcOver_mandrill_512.pngVSkOptsNonSimdCore        2.39ms -> 2.39ms        1x
   LinearSrcOver_iconstrip.pngVSkOptsNonSimdCore        6.43ms -> 6.43ms        1x
     LinearSrcOver_baby_tux.pngVSkOptsBruteForce        22.3ms -> 22.3ms        1x
  LinearSrcOver_yellow_rose.pngVSkOptsBruteForce        45.5ms -> 45.5ms        1x
    LinearSrcOver_baby_tux.pngVSkOptsNonSimdCore        2.02ms -> 2.02ms        1x
       LinearSrcOver_iconstrip.pngVSkOptsTrivial        69.7ms -> 69.7ms        1x
        LinearSrcOver_baby_tux.pngVSkOptsTrivial        9.96ms -> 9.95ms        1x
 LinearSrcOver_mandrill_512.pngVSkOptsBruteForce        99.3ms -> 99.2ms        1x

BUG=skia:

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Ia576365578d65b771440da65fdf41f090ccf0541
Reviewed-on: https://skia-review.googlesource.com/6860
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoAttempt 3: SkRasterPipelineBlitter: support A8
Mike Klein [Fri, 13 Jan 2017 12:59:23 +0000 (07:59 -0500)]
Attempt 3: SkRasterPipelineBlitter: support A8

Now that SkOpts_hsw.cpp no longer hooks in SkRasterPipeline_opts,
it should be safe to try this again.

This reverts commit 86d55b312a2649d80890ccf75f24571ada0265f1.

Change-Id: I2d495600ca9d3a0f49c2e02fbaaae349cefac3a1
Reviewed-on: https://skia-review.googlesource.com/6985
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRevert "Reland https://skia-review.googlesource.com/c/6091/"
Yuqian Li [Thu, 12 Jan 2017 23:37:38 +0000 (23:37 +0000)]
Revert "Reland https://skia-review.googlesource.com/c/6091/"

This reverts commit b46fff60bc82fe6f0c64b2241d854a121f7cb5f9.

Reason for revert: possible chromium cc unit tests failure

Change-Id: Ie174c55e4d0fc3ae45854b5897ba26b7ad5a9c13
Reviewed-on: https://skia-review.googlesource.com/6981
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
7 years agoUse RasterPipeline to support full precision on 16-bit RGBA pngs
Matt Sarett [Thu, 12 Jan 2017 23:34:29 +0000 (18:34 -0500)]
Use RasterPipeline to support full precision on 16-bit RGBA pngs

Reland of Original Change:
https://skia-review.googlesource.com/6260

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I809984dd9af225103bfbe83492a17c19da7c5e40
Reviewed-on: https://skia-review.googlesource.com/6980
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoAdd support for drawImageLattice in SKIA debugger
Stan Iliev [Thu, 12 Jan 2017 21:20:50 +0000 (16:20 -0500)]
Add support for drawImageLattice in SKIA debugger

Add support in SKIA debugger for SkCanvas.drawImageLattice calls.

Test: Tested with an SKP from android settings app.
Change-Id: I3f39f353dca8a3a2854241e7ef995d4d8c635f3e
Reviewed-on: https://skia-review.googlesource.com/6882
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
7 years agoReland https://skia-review.googlesource.com/c/6091/
Yuqian Li [Thu, 12 Jan 2017 20:35:15 +0000 (15:35 -0500)]
Reland https://skia-review.googlesource.com/c/6091/

The only difference is that we now put the guard flag SK_SUPPORT_LEGACY_AAA in
SkUserConfig.h instead of SkScan.h. Previously, SkAnalyticEdge.cpp doesn't get
that flag from SkScan.h and that caused many problems.

BUG=skia:
TBR=reed@google.com,caryclark@google.com

Change-Id: I7b89d3cb64ad71715101d2a5e8e77be3a8a6fa16
Reviewed-on: https://skia-review.googlesource.com/6972
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>

7 years agoRevert "Use RasterPipeline to support full precision on 16-bit RGBA pngs"
Matt Sarett [Thu, 12 Jan 2017 21:03:17 +0000 (21:03 +0000)]
Revert "Use RasterPipeline to support full precision on 16-bit RGBA pngs"

This reverts commit bb2339da39ab3ee59121acd911920dafcd4a2f72.

Reason for revert: Breaks MSAN

Original change's description:
> Use RasterPipeline to support full precision on 16-bit RGBA pngs
>
> TODO: Support more precision on 16-bit RGB pngs
>
> BUG=skia:
>
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
>
> Change-Id: I89dfef3b4887b9c4895c17309933883ab90ffa4d
> Reviewed-on: https://skia-review.googlesource.com/6260
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

TBR=mtklein@chromium.org,mtklein@google.com,msarett@google.com,scroggo@google.com,reed@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I47579c20af033a75883e2b35567cb9c690ce54b0
Reviewed-on: https://skia-review.googlesource.com/6975
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoimpl clipping for GDI raster-handle
Mike Reed [Thu, 12 Jan 2017 19:18:39 +0000 (14:18 -0500)]
impl clipping for GDI raster-handle

BUG=skia:

Change-Id: I66bbcd80853662d982b80e7e504f2b5ccedc055c
Reviewed-on: https://skia-review.googlesource.com/6967
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agodrop depot_tools dependency in bin/fetch-gn
Mike Klein [Thu, 12 Jan 2017 18:20:38 +0000 (13:20 -0500)]
drop depot_tools dependency in bin/fetch-gn

... and copy gn to bin/ when done to make it easy to find.

Change-Id: I1ec405b4c45efb828626ff7d904a417f69b39cb2
Reviewed-on: https://skia-review.googlesource.com/6962
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agorm -r {include,src}/animator
Hal Canary [Thu, 12 Jan 2017 17:22:47 +0000 (12:22 -0500)]
rm -r {include,src}/animator

Change-Id: Ibfb57dfa7fd317fb0737096cc7c1bbcb644421b5
Reviewed-on: https://skia-review.googlesource.com/6957
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agocleanup after 95e3c05
Hal Canary [Thu, 12 Jan 2017 18:47:57 +0000 (13:47 -0500)]
cleanup after 95e3c05

Change-Id: Ifd194fd009196b8bee2dd83328bbe698586d72f4
Reviewed-on: https://skia-review.googlesource.com/6965
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoFix tool with swapped fC, fE (SkColorSpaceTransferFn)
Matt Sarett [Thu, 12 Jan 2017 18:39:04 +0000 (13:39 -0500)]
Fix tool with swapped fC, fE (SkColorSpaceTransferFn)

I missed updating this tool.

BUG=skia:

Change-Id: If5c79f0c41dd829ce8f952106660100ce4accca0
Reviewed-on: https://skia-review.googlesource.com/6963
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoUse RasterPipeline to support full precision on 16-bit RGBA pngs
Matt Sarett [Thu, 12 Jan 2017 18:13:48 +0000 (13:13 -0500)]
Use RasterPipeline to support full precision on 16-bit RGBA pngs

TODO: Support more precision on 16-bit RGB pngs

BUG=skia:

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I89dfef3b4887b9c4895c17309933883ab90ffa4d
Reviewed-on: https://skia-review.googlesource.com/6260
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoRevert "Implement Analytic AA for General Paths (with Guard against Chrome)"
Yuqian Li [Thu, 12 Jan 2017 18:12:46 +0000 (18:12 +0000)]
Revert "Implement Analytic AA for General Paths (with Guard against Chrome)"

This reverts commit 89a0e72287e991cfa2f860f92fad545ca59defe1.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Implement Analytic AA for General Paths (with Guard against Chrome)
>
> I've set up a SK_SUPPORT_LEGACY_AAA flag to guard against Chromium layout tests. I also set that flag in this CL so theoretically this CL won't trigger any GM changes. I'll use this to verify my guard, and remove that flag and actually enables concave AAA in a future CL.
>
> When enabled, for most simple concave paths (e.g., rectangle stroke, rrect stroke, sawtooth, stars...), the Analytic AA achieves 1.3x-2x speedup, and they look much prettier. And they probably are the majority in our use cases by number. But they probably are not the majority by time cost; a single complicated path may cost 10x-100x more time to render than a rectangle stroke... For those complicated paths, we fall back to supersampling by default as we're likely to be 1.1-1.2x slower and the quality improvement is not visually significant. However, one can use gSkForceAnalyticAA to disable that fallback.
>
> BUG=skia:
>
> Change-Id: If9549a3acc4a187cfaf7eb51890c148da3083d31
> Reviewed-on: https://skia-review.googlesource.com/6091
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Yuqian Li <liyuqian@google.com>
>

TBR=caryclark@google.com,liyuqian@google.com,reed@google.com
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I13c05aaa1bcb14956bd0fe01bb404e41be75af22
Reviewed-on: https://skia-review.googlesource.com/6961
Commit-Queue: Yuqian Li <liyuqian@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
7 years agoFix SkImageFilterCache race
Florin Malita [Thu, 12 Jan 2017 17:06:14 +0000 (12:06 -0500)]
Fix SkImageFilterCache race

BUG=chromium:668937
R=reed@google.com,robertphillips@google.com

Change-Id: I72ceaf1d88946c277a38f32014640e01ae9cbded
Reviewed-on: https://skia-review.googlesource.com/6954
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoImplement Analytic AA for General Paths (with Guard against Chrome)
Yuqian Li [Wed, 11 Jan 2017 15:58:31 +0000 (10:58 -0500)]
Implement Analytic AA for General Paths (with Guard against Chrome)

I've set up a SK_SUPPORT_LEGACY_AAA flag to guard against Chromium layout tests. I also set that flag in this CL so theoretically this CL won't trigger any GM changes. I'll use this to verify my guard, and remove that flag and actually enables concave AAA in a future CL.

When enabled, for most simple concave paths (e.g., rectangle stroke, rrect stroke, sawtooth, stars...), the Analytic AA achieves 1.3x-2x speedup, and they look much prettier. And they probably are the majority in our use cases by number. But they probably are not the majority by time cost; a single complicated path may cost 10x-100x more time to render than a rectangle stroke... For those complicated paths, we fall back to supersampling by default as we're likely to be 1.1-1.2x slower and the quality improvement is not visually significant. However, one can use gSkForceAnalyticAA to disable that fallback.

BUG=skia:

Change-Id: If9549a3acc4a187cfaf7eb51890c148da3083d31
Reviewed-on: https://skia-review.googlesource.com/6091
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>

7 years agofix clipping in rasterhandleallocator
Mike Reed [Thu, 12 Jan 2017 16:28:01 +0000 (11:28 -0500)]
fix clipping in rasterhandleallocator

BUG=skia:

Change-Id: Ia24c5ae191fd823095cd0c75993cfd0208c98869
Reviewed-on: https://skia-review.googlesource.com/6952
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agorefFoo variant for getters that naturally have a sk_sp
Mike Reed [Thu, 12 Jan 2017 15:13:40 +0000 (10:13 -0500)]
refFoo variant for getters that naturally have a sk_sp

BUG=skia:

Change-Id: I13afa1b81e8a72d93e45fb4d37228be196b0f388
Reviewed-on: https://skia-review.googlesource.com/6923
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoskia_android_serial = "auto"
Mike Klein [Thu, 12 Jan 2017 15:48:19 +0000 (10:48 -0500)]
skia_android_serial = "auto"

Handy if you only have one device plugged in at a time.

Note that when used, this makes GN treat all devices' serial numbers as "auto", so it won't re-push if you swap devices until you change the binary that's being pushed.

Change-Id: I1f72133d6d8c4b5569734f191d414088e0b41f06
Reviewed-on: https://skia-review.googlesource.com/6948
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
7 years agoCleanup GrPixelConfig helper functions
Brian Osman [Thu, 12 Jan 2017 15:28:01 +0000 (10:28 -0500)]
Cleanup GrPixelConfig helper functions

Remove unused functions, and convert another to switch style.

BUG=skia:

Change-Id: I93edbece54f147d868801bb008e6f935a8cb997f
Reviewed-on: https://skia-review.googlesource.com/6947
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoFix perf regression with SDF paths
Jim Van Verth [Thu, 12 Jan 2017 15:00:16 +0000 (10:00 -0500)]
Fix perf regression with SDF paths

BUG=skia:6113,chromium:677889

Change-Id: I13d012a92e4d0371138f5ed4b92c7850f9b773a5
Reviewed-on: https://skia-review.googlesource.com/6945
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agodisable runtime detected AVX2 raster pipelines
Mike Klein [Tue, 10 Jan 2017 13:42:16 +0000 (08:42 -0500)]
disable runtime detected AVX2 raster pipelines

It's proving too difficult to keep on top of all the ways we might cause ODR violations that crash Chrome.  I'd rather focus on other ways of running the pipelines that won't have that particular problem.  Our -Fast bots will keep testing and benchmarking AVX2 raster pipelines.

BUG=chromium:679147,chromium:654213,chromium:664864,chromium:666707,etc.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I35ba8f5f4303107237fd78a6ce442d7c26e5fbef
Reviewed-on: https://skia-review.googlesource.com/6827
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRemove defunct include/images directory from GN.
Derek Sollenberger [Thu, 12 Jan 2017 14:32:37 +0000 (09:32 -0500)]
Remove defunct include/images directory from GN.

BUG=skia:6065

Change-Id: I332581cca684c4918dc87434509744b8bf4f5ed8
Reviewed-on: https://skia-review.googlesource.com/6944
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRemove second version of SkImageInfo2GrPixelConfig
Brian Osman [Wed, 11 Jan 2017 21:58:42 +0000 (16:58 -0500)]
Remove second version of SkImageInfo2GrPixelConfig

Alpha type is not (and never will be) part of pixel config, so the logic
around that was unnecessary. (Also, we already sanitize color type and
alpha type before making a new device at a higher level).

With that out of the way, we can easily supply a full info at the two
call-sites that were using the other version.

BUG=skia:

Change-Id: Iceccdbdebd1062d3e5023620755aabcc86604d2f
Reviewed-on: https://skia-review.googlesource.com/6920
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoRemove kIndex_8_GrPixelConfig
Brian Osman [Wed, 11 Jan 2017 21:57:15 +0000 (16:57 -0500)]
Remove kIndex_8_GrPixelConfig

It's been disabled for a long time (GPUs don't support it, and it actually
caused performance regression in testing).

BUG=skia:4333

Change-Id: I6e2bf755f765168fd616de6c9c023c6fbd5abd20
Reviewed-on: https://skia-review.googlesource.com/6897
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoMove recipe expectations into example.py recipes inside of modules
Eric Boren [Thu, 12 Jan 2017 13:46:20 +0000 (08:46 -0500)]
Move recipe expectations into example.py recipes inside of modules

Each top-level recipe still needs one test and expectation file.

BUG=skia:6070

Change-Id: I3b14e8a11a86af68f5558177536f0018b644be4d
Reviewed-on: https://skia-review.googlesource.com/6943
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoMove most recipes into modules
Eric Boren [Thu, 12 Jan 2017 13:15:38 +0000 (08:15 -0500)]
Move most recipes into modules

The modules will eventually move into a shared repository.

BUG=skia:6070

Change-Id: I622265d98a5446f9f3ebf2c6a197770398623769
Reviewed-on: https://skia-review.googlesource.com/6942
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoonly copy NDK binaries when using NDK in our standalone builds
Mike Klein [Thu, 12 Jan 2017 13:07:23 +0000 (08:07 -0500)]
only copy NDK binaries when using NDK in our standalone builds

  i.e. not when generating Android.bp (and in the future, not in Clank builds)

BUG=skia:6065

Change-Id: I52bdd5f01deb5e5b4d9e72bec197a82dc887be88
Reviewed-on: https://skia-review.googlesource.com/6941
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoGrTessellator: fix artifact with exactly-1-px-wide edges.
Stephen White [Wed, 11 Jan 2017 21:19:26 +0000 (16:19 -0500)]
GrTessellator: fix artifact with exactly-1-px-wide edges.

When path features are exactly a pixel wide, the extruded inner edges
can become collinear and then be removed, since their winding is
zero. We need these edges to be preserved through triangulation,
otherwise opaque portions of the geometry can become transparent.

Since the simplify() pass can handle zero-winding edges just fine, the
the fix is to simply not remove them.

In addition, this changes refactors out disconnect() from all the calls
to remove_edge_above()/remove_edge_below(). It also renames the remaining
function erase_edge() (since it's now unconditional).

Add a new test to a new "thinconcavepaths" GM.

BUG=680260
NOTRY=true

Change-Id: I1d3a436c95a01c4d4ef5dc05503de4312677f65d
Reviewed-on: https://skia-review.googlesource.com/6902
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephan White <senorblanco@chromium.org>

7 years agoadd win subclass of raster-allocator
Mike Reed [Thu, 12 Jan 2017 02:18:25 +0000 (21:18 -0500)]
add win subclass of raster-allocator

BUG=skia:

Change-Id: Ibe1664b599a88dce06d03cf8eea10db5f75ce037
Reviewed-on: https://skia-review.googlesource.com/6924
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>