platform/upstream/libSkiaSharp.git
7 years agoAdd Braswell bots.
Ben Wagner [Fri, 3 Mar 2017 20:12:25 +0000 (15:12 -0500)]
Add Braswell bots.

BUG=skia:6324
NOTRY=true

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

7 years agoUse an exponential growth strategy for extra blocks.
Herb Derby [Fri, 3 Mar 2017 20:09:43 +0000 (15:09 -0500)]
Use an exponential growth strategy for extra blocks.

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

7 years agoRevert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric...
Cary Clark [Fri, 3 Mar 2017 20:27:13 +0000 (20:27 +0000)]
Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."""

This reverts commit cfaa63237b152ae216f1351207bce3ea9808814c.

Reason for revert: speculative revert to fix Google3

Original change's description:
> Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""
>
> passes new (augmented) CanvasClipType unittest
> fixed rasterclipstack::setnewsize
>
> This reverts commit ea5e676a7b75600edcde3912886486004ccd7626.
>
> BUG=skia:
>
> Change-Id: I004653e0f4d01454662f8516fccab0046486f273
> Reviewed-on: https://skia-review.googlesource.com/9185
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

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

7 years agoSkJumper: store_f32
Mike Klein [Fri, 3 Mar 2017 19:05:32 +0000 (14:05 -0500)]
SkJumper: store_f32

Change-Id: I4bc6d1a8787c540fd1a29274650d34392e56651c
Reviewed-on: https://skia-review.googlesource.com/9223
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoUpgrade Go in CIPD to 1.7.5
Joe Gregorio [Fri, 3 Mar 2017 18:57:39 +0000 (13:57 -0500)]
Upgrade Go in CIPD to 1.7.5

BUG=skia:

Change-Id: I70fadfa293387bec03a201ac986b3e1cba053ab6
Reviewed-on: https://skia-review.googlesource.com/9222
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
7 years agoRevert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""
Mike Reed [Fri, 3 Mar 2017 18:58:10 +0000 (13:58 -0500)]
Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""

passes new (augmented) CanvasClipType unittest
fixed rasterclipstack::setnewsize

This reverts commit ea5e676a7b75600edcde3912886486004ccd7626.

BUG=skia:

Change-Id: I004653e0f4d01454662f8516fccab0046486f273
Reviewed-on: https://skia-review.googlesource.com/9185
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoRemove extract_comments in housekeeper bot.
Joe Gregorio [Fri, 3 Mar 2017 18:21:26 +0000 (13:21 -0500)]
Remove extract_comments in housekeeper bot.

BUG=skia:

Change-Id: I6bd745a03c9f8c06ed711839a4bda1db0693cf5a
Reviewed-on: https://skia-review.googlesource.com/9220
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>

7 years agoSwitch SkImageGenerator over to generating GrTextureProxies
Robert Phillips [Fri, 3 Mar 2017 16:10:18 +0000 (11:10 -0500)]
Switch SkImageGenerator over to generating GrTextureProxies

It does not seem irrational for generateTexture to always receive a valid GrContext. lockAsBitmap can do as it pleases.

This is split out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)

Change-Id: I8aebc813a8a3a7d694b7369c2c9810e2164fe16e
Reviewed-on: https://skia-review.googlesource.com/9191
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoRevert "Upgrade Go in CIPD to 1.7.5"
Cary Clark [Fri, 3 Mar 2017 17:34:15 +0000 (17:34 +0000)]
Revert "Upgrade Go in CIPD to 1.7.5"

This reverts commit 3fb5299febf37456408c81298bbf2092133cb4f3.

Reason for revert: speculative revert to see if it fixes housekeeping bot

Original change's description:
> Upgrade Go in CIPD to 1.7.5
>
> BUG=skia:
>
> Change-Id: I574c704a4c4bee90b26c1d73d17762ae8b8f55f6
> Reviewed-on: https://skia-review.googlesource.com/9192
> Commit-Queue: Joe Gregorio <jcgregorio@google.com>
> Reviewed-by: Ravi Mistry <rmistry@google.com>
>

TBR=rmistry@google.com,jcgregorio@google.com,borenet@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

7 years agoUpgrade Go in CIPD to 1.7.5
Joe Gregorio [Fri, 3 Mar 2017 15:55:10 +0000 (10:55 -0500)]
Upgrade Go in CIPD to 1.7.5

BUG=skia:

Change-Id: I574c704a4c4bee90b26c1d73d17762ae8b8f55f6
Reviewed-on: https://skia-review.googlesource.com/9192
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoPut is_skia_standalone back a bit.
Mike Klein [Fri, 3 Mar 2017 15:55:02 +0000 (10:55 -0500)]
Put is_skia_standalone back a bit.

We do still need to know when we're in our GN environment or in another,
like Fuchsia's or Flutter's.

The places where we replaced is_skia_standalone with defined(ndk) still
look right to me as defined(ndk).

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-GCC-x86_64-Release-Flutter_Android

Change-Id: I5455014a8f4a350ac3a939097d042fd8cb4c32fa
Reviewed-on: https://skia-review.googlesource.com/9193
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoStrengthen is_official_build, update docs.
Mike Klein [Fri, 3 Mar 2017 14:21:30 +0000 (09:21 -0500)]
Strengthen is_official_build, update docs.

This makes is_official_build turn off all development targets and
features in Skia, including building third-party dependencies from
source.

This will intentionally break some external users, who will find
themselves no longer able to find third-party headers or link against
third-party libraries.  These users have been building with our testing
third-party dependencies unknowingly.  They'll need to either explicitly
turn back on building each dependency from source
(skia_use_system_foo=false) or disable that dependency entirely
(skia_use_foo=false).

is_skia_standalone is now basically !is_official_build, so I've
propagated that through, removing is_skia_standalone.  In a few places
we were using it as a stand-in for defined(ndk), so I've just written
defined(ndk) there.  Duh.

gn_to_bp:

    is_offical_build's new strength also makes gn_to_bp.py simpler to
    write.  In spirit, Android builds are official Skia builds that also
    build DM and nanobench.

    It seems that SkJumper (src/jumper/*) is (unintentionally) enabled
    on Android.  Switching to an is_official_build would have disabled
    that.  But as that accidental launch seems to have gone fine, I've
    kept it explicitly enabled.

    In the end, no changes to Android.bp or its SkUserConfig.h.

The -Mini builder no longer needs to explicitly disable tools.
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-Mini

Change-Id: Id06e53268a5caf55c6046ada354a0863c3031c73
Reviewed-on: https://skia-review.googlesource.com/9190
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoUse non-fatal errors for WIC decoding failures
Matt Sarett [Thu, 2 Mar 2017 17:07:46 +0000 (12:07 -0500)]
Use non-fatal errors for WIC decoding failures

This should fix flakiness on the Win 2k8 bots.

BUG=skia:

Change-Id: Ibdd33279a092172f0b154493f59790a8db9f58bd
Reviewed-on: https://skia-review.googlesource.com/9142
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoDocumentation: detailed iOS
Hal Canary [Fri, 3 Mar 2017 13:29:18 +0000 (08:29 -0500)]
Documentation: detailed iOS

NOTRY=true
Change-Id: I24328509fc902f4f41198e249e82e88eda5dd21d
Reviewed-on: https://skia-review.googlesource.com/9189
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoMake GrSurface::MakeDeferred return sk_sp<GrTextureProxy>
Robert Phillips [Thu, 2 Mar 2017 23:18:38 +0000 (18:18 -0500)]
Make GrSurface::MakeDeferred return sk_sp<GrTextureProxy>

This should make upcoming changes less tedious

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

7 years agoupdate cliptype test to exercise clipstack backend
Mike Reed [Fri, 3 Mar 2017 01:07:46 +0000 (20:07 -0500)]
update cliptype test to exercise clipstack backend

BUG=skia:

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

7 years agoGrTessellator: add a null-check for a clusterfuzz test case.
Stephen White [Thu, 2 Mar 2017 21:16:33 +0000 (16:16 -0500)]
GrTessellator: add a null-check for a clusterfuzz test case.

BUG=695696

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

7 years agoRelease resources if SkMallocPixelRef::NewWithProc fails.
Ben Wagner [Thu, 2 Mar 2017 22:33:21 +0000 (17:33 -0500)]
Release resources if SkMallocPixelRef::NewWithProc fails.

Change-Id: I29b96cd9f2d2311b4caae092102f501dbc6a4fe8
Reviewed-on: https://skia-review.googlesource.com/9182
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoRevert "Use inline storage for SkEdgeBuilder."
Mike Klein [Thu, 2 Mar 2017 22:04:55 +0000 (22:04 +0000)]
Revert "Use inline storage for SkEdgeBuilder."

This reverts commit be32a432af7aab06ab1457cec35789da85b40bbe.

Reason for revert: Google3 stacks are smaller than you might hope.  "the frame size of 25584 bytes is larger than 16384 bytes; see http://go/big_stack_frame"

Original change's description:
> Use inline storage for SkEdgeBuilder.
>
> Change-Id: I06d9ee759a366d6c2c11341e15e671f5a1f87ae7
> Reviewed-on: https://skia-review.googlesource.com/9164
> Reviewed-by: Yuqian Li <liyuqian@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
>

TBR=herb@google.com,liyuqian@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

7 years agoDon't mark the matrix-type as dirty just be cause we translate it.
Mike Reed [Thu, 2 Mar 2017 20:45:15 +0000 (15:45 -0500)]
Don't mark the matrix-type as dirty just be cause we translate it.

This speeds up simple mods to canvas, e.g.

save()
translate(...)
...
restore()

BUG=skia:

Change-Id: I4b872e7d3102fad21d9c17a275006f5576827d41
Reviewed-on: https://skia-review.googlesource.com/9169
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoRemove SkLiteDL::makeThreadsafe().
Mike Klein [Thu, 2 Mar 2017 20:26:33 +0000 (15:26 -0500)]
Remove SkLiteDL::makeThreadsafe().

It's not used, and removing it cuts a branch in DrawDrawable::draw().

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

7 years agoFuzzCanvas: fix drawVertices BUG=skia:6314
Hal Canary [Thu, 2 Mar 2017 20:27:23 +0000 (15:27 -0500)]
FuzzCanvas: fix drawVertices BUG=skia:6314

Change-Id: I5f55a0fc03d4fe780b35529df9eeb385639501f2
Reviewed-on: https://skia-review.googlesource.com/9173
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoadd unittests for clip-state queries
Mike Reed [Thu, 2 Mar 2017 20:21:11 +0000 (15:21 -0500)]
add unittests for clip-state queries

BUG=skia:

Change-Id: I6f8d5a0e78c5b41caa6c6388f7f2ace050ed08ac
Reviewed-on: https://skia-review.googlesource.com/9171
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoUse GrSemaphore rather than GrFence for external texture data
Brian Osman [Thu, 2 Mar 2017 20:09:20 +0000 (15:09 -0500)]
Use GrSemaphore rather than GrFence for external texture data

BUG=skia:

Change-Id: I0d23eb9dcf5c01c71d3571ef97690af68b900807
Reviewed-on: https://skia-review.googlesource.com/9141
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoUse the auto blitter alloc to build linear pipelines with.
Herb Derby [Thu, 2 Mar 2017 19:39:32 +0000 (14:39 -0500)]
Use the auto blitter alloc to build linear pipelines with.

TBR=mtklein@google.com

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

7 years agoSkJumper: use AVX2 mask loads and stores for U32
Mike Klein [Thu, 2 Mar 2017 19:08:36 +0000 (14:08 -0500)]
SkJumper: use AVX2 mask loads and stores for U32

SkRasterPipeline_f16:  63 -> 58  (8888+f16 loads, f16 store)
SkRasterPipeline_srgb: 96 -> 84  (2x 8888 loads, 8888 store)

PS3 has a simpler way to build the mask, in a uint64_t.
Timing is still roughlt the same.

Change-Id: Ie278611dff02281e5a0f3a57185050bbe852bff0
Reviewed-on: https://skia-review.googlesource.com/9165
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agofixed duplicate interface variable in SPIR-V output
Ethan Nicholas [Thu, 2 Mar 2017 19:33:31 +0000 (14:33 -0500)]
fixed duplicate interface variable in SPIR-V output

BUG=skia:

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

7 years agoRevert "Remove SkDraw from device-draw methods, and enable device-centric clipping."
Mike Reed [Thu, 2 Mar 2017 20:22:35 +0000 (20:22 +0000)]
Revert "Remove SkDraw from device-draw methods, and enable device-centric clipping."

This reverts commit c77e33f73d3e86cfabf925d6f2e1166f81022575.

Reason for revert: breaks isClipRect
- this CL inspected the conservative clip for this, which is (by definition) a rect
- probably need to query the device for this info

Original change's description:
> Remove SkDraw from device-draw methods, and enable device-centric clipping.
>
> BUG=skia:6214
>
> Change-Id: I593900724310d09133ae4791ef68d38c43762fc2
> Reviewed-on: https://skia-review.googlesource.com/8806
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

TBR=bsalomon@google.com,halcanary@google.com,msarett@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6214

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

7 years agoRefactor SkLiteDL to no longer extend SkDrawable.
Derek Sollenberger [Wed, 1 Mar 2017 20:33:23 +0000 (15:33 -0500)]
Refactor SkLiteDL to no longer extend SkDrawable.

Change-Id: Ieaa849bceba0e98e4c99491c721fe945a0694e68
Reviewed-on: https://skia-review.googlesource.com/9111
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>

7 years agoTell PDF on Mac when a font is a variation font.
Ben Wagner [Thu, 2 Mar 2017 18:31:16 +0000 (13:31 -0500)]
Tell PDF on Mac when a font is a variation font.

PDF needs to know when a font is a variation font so that it knows
it cannot just embed the typeface.

BUG=chromium:697916

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

7 years agoAdd MotoG4 bot.
Ben Wagner [Thu, 2 Mar 2017 17:43:06 +0000 (12:43 -0500)]
Add MotoG4 bot.

BUG=skia:
NOTRY=true

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

7 years agoUse inline storage for SkEdgeBuilder.
Herb Derby [Thu, 2 Mar 2017 19:00:10 +0000 (14:00 -0500)]
Use inline storage for SkEdgeBuilder.

Change-Id: I06d9ee759a366d6c2c11341e15e671f5a1f87ae7
Reviewed-on: https://skia-review.googlesource.com/9164
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agopass storage directly to allocator for blitters
Mike Reed [Thu, 2 Mar 2017 18:39:25 +0000 (13:39 -0500)]
pass storage directly to allocator for blitters

BUG=skia:

Change-Id: If93df0437b2aba813042241f00eb0c6fba2a3c6f
Reviewed-on: https://skia-review.googlesource.com/9161
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoUse proxy canvas size.
Herb Derby [Thu, 2 Mar 2017 18:36:26 +0000 (13:36 -0500)]
Use proxy canvas size.

The old code just hard coded 1,1 as size. Instead use the size of the
proxy canvas.

Change-Id: Ib1ebc9339c98680ca350f26f8ec514f6782de8a4
Reviewed-on: https://skia-review.googlesource.com/9160
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoRemove SkDraw from device-draw methods, and enable device-centric clipping.
Mike Reed [Thu, 2 Mar 2017 16:23:46 +0000 (11:23 -0500)]
Remove SkDraw from device-draw methods, and enable device-centric clipping.

BUG=skia:6214

Change-Id: I593900724310d09133ae4791ef68d38c43762fc2
Reviewed-on: https://skia-review.googlesource.com/8806
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoSkJumper: skip null contexts
Mike Klein [Thu, 2 Mar 2017 17:42:14 +0000 (12:42 -0500)]
SkJumper: skip null contexts

This makes stages that don't use a context pointer look a little
cleaner, especially on ARM.  No interesting speed difference on x86.

What do you think?

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

7 years agoSkPDF: empty shader boxes bad
Hal Canary [Thu, 2 Mar 2017 17:42:02 +0000 (12:42 -0500)]
SkPDF: empty shader boxes bad

BUG=skia:6315
Change-Id: I48172b4deb4c55b08310e8e3d68089cfafeaa951
Reviewed-on: https://skia-review.googlesource.com/9156
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoRevert "Revert "Revert "Revert "Move GrTextureProvider to src""""
Brian Osman [Thu, 2 Mar 2017 18:36:27 +0000 (13:36 -0500)]
Revert "Revert "Revert "Revert "Move GrTextureProvider to src""""

This reverts commit 580ffa0fb17bc4e924776eafd941bf1fab397cde.

Reason for revert: Okay, it landed.

Original change's description:
> Revert "Revert "Revert "Move GrTextureProvider to src"""
>
> This reverts commit 2fe8373bb1d56f531f8a2e03a3087b0aa73e199c.
>
> Reason for revert: Google3 fix isn't landing.
>
> Original change's description:
> > Revert "Revert "Move GrTextureProvider to src""
> >
> > This reverts commit 13d7f5d7c2872ed4298330758e173ae605578cb2.
> >
> > Reason for revert: Fixed client code. Re-landing.
> >
> > Original change's description:
> > > Revert "Move GrTextureProvider to src"
> > >
> > > This reverts commit 24429c68c56683252e3fc2a79d9b660eaf96ec0c.
> > >
> > > Reason for revert: Breaking a roll
> > >
> > > Original change's description:
> > > > Move GrTextureProvider to src
> > > >
> > > > With this hidden, we can make further simplification. Just want to test
> > > > this change against our external clients first, to make sure we're okay
> > > > to proceed.
> > > >
> > > > BUG=skia:
> > > >
> > > > Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
> > > > Reviewed-on: https://skia-review.googlesource.com/9072
> > > > Commit-Queue: Brian Osman <brianosman@google.com>
> > > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > >
> > >
> > > TBR=bsalomon@google.com,brianosman@google.com,benjaminwagner@google.com,reviews@skia.org
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=skia:
> > >
> > > Change-Id: I43cc135731245c29e24bbecf06ee46c562955c03
> > > Reviewed-on: https://skia-review.googlesource.com/9123
> > > Reviewed-by: Brian Osman <brianosman@google.com>
> > > Commit-Queue: Brian Osman <brianosman@google.com>
> > >
> >
> > TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> >
> > Change-Id: Ibcb2ea34654315327c46ea8e4de5bf14376d9bdf
> > Reviewed-on: https://skia-review.googlesource.com/9127
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> >
>
> TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: If5c06c7608d76c45438d03fefb21c4edd7da4f36
> Reviewed-on: https://skia-review.googlesource.com/9128
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
>

TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

7 years agoUse fast path for circular shadows.
Jim Van Verth [Thu, 2 Mar 2017 16:28:43 +0000 (11:28 -0500)]
Use fast path for circular shadows.

Also cleans up some of the MaskFilter code to make it
more correct.

BUG=skia:6119

Change-Id: I93016bcdd9c55fcb2d1dc8776428a72eb563d67a
Reviewed-on: https://skia-review.googlesource.com/9116
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoCheck that the FT_Face actually exists in SkTypeface_FreeType::onGetVariationDesignPo...
Ben Wagner [Thu, 2 Mar 2017 16:48:38 +0000 (11:48 -0500)]
Check that the FT_Face actually exists in SkTypeface_FreeType::onGetVariationDesignPosition.

All users of AutoFTAccess check the FT_Face for nullptr in case the
FT_Face cannot actually be created. This check was overlooked in the
recent addition of SkTypeface_FreeType::onGetVariationDesignPosition.

BUG=chromium:697878

Change-Id: I92dfe845f2aecfa00bd4d088ac139f74c019c03d
Reviewed-on: https://skia-review.googlesource.com/9151
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoSkJumper: be more precise by rejecting data sections.
Mike Klein [Thu, 2 Mar 2017 16:16:22 +0000 (11:16 -0500)]
SkJumper: be more precise by rejecting data sections.

This allows %rip addressing as long as it's not going into a data
section.  This lets us use switch tables, avoiding loops and stack.

On HSW,
  SkRasterPipeline_f16:   90 -> 63
  SkRasterPipeline_srgb: 170 -> 97

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

7 years agoGrTessellator (AA): restore rounding in Line::intersect().
Stephen White [Thu, 2 Mar 2017 15:35:56 +0000 (10:35 -0500)]
GrTessellator (AA): restore rounding in Line::intersect().

I removed this in https://skia-review.googlesource.com/8028, but that
was actually just masking a problem properly fixed in
https://skia-review.googlesource.com/8364. Now that it is fixed, we
can restore the rounding, which actually improves performance by
5-10% on Canvas Arcs (when run with the tess verb limit disabled).

NOTE: this change will affect many GMs, including strokes_poly,
addarc, parsedpaths, dashcubics, beziers, nested_aa, etc.

BUG=skia:

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

7 years agoSkJumper: handle the <kStride tail in AVX+ mode.
Mike Klein [Wed, 1 Mar 2017 18:07:40 +0000 (13:07 -0500)]
SkJumper: handle the <kStride tail in AVX+ mode.

We have plenty general purpose registers to spare on x86-64,
so the cheapest thing to do is use one to hold the usual 'tail'.

Speedups on HSW:
    SkRasterPipeline_srgb: 292 -> 170
    SkRasterPipeline_f16:  122 ->  90

There's plenty more room to improve here, e.g. using mask loads and
stores, but this seems to be enough to get things working reasonably.

BUG=skia:6289

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

7 years agoUse GrTextureProvider's uniqueKey setting method rather than directly setting it
Robert Phillips [Thu, 2 Mar 2017 15:23:52 +0000 (10:23 -0500)]
Use GrTextureProvider's uniqueKey setting method rather than directly setting it

Clients will not be able to directly set the uniqueKey on GrTextureProxies. This CL sets up the choke point for the switch over to having uniqueKeys be managed by a third party (the textureProvider).

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

7 years agoDetermine whether any fp uses local coords in FragmentProcessorAnalysis rather than...
Brian Salomon [Thu, 2 Mar 2017 13:49:19 +0000 (08:49 -0500)]
Determine whether any fp uses local coords in FragmentProcessorAnalysis rather than GrPipeline creation

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

7 years agoFix flutter compile bot
Ravi Mistry [Thu, 2 Mar 2017 14:23:47 +0000 (09:23 -0500)]
Fix flutter compile bot

BUG=skia:6310

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

7 years agoSkJumper: allow the compiler to generate FMAs
Mike Klein [Thu, 2 Mar 2017 14:19:25 +0000 (09:19 -0500)]
SkJumper: allow the compiler to generate FMAs

Today we use mad() to get FMAs where possible.
-ffp-contract=fast lets the compiler generate them if it spots an opportunity.

It looks like it's found a mix of FMAs and FMSs.

I will follow up by seeing if we can relax the use of mad().
Quick experiments say no, but less quick experiments may say otherwise.

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

7 years agoUpdate Skia milestone to 59
Heather Miller [Thu, 2 Mar 2017 14:45:02 +0000 (09:45 -0500)]
Update Skia milestone to 59

BUG=skia:

Change-Id: Ifa8fa20a838b2899a1230bf51cea7c4cf28971d8
Reviewed-on: https://skia-review.googlesource.com/9139
Reviewed-by: Heather Miller <hcm@google.com>
7 years agoTest sRGB with non-linear blending using new "srgbnl" sink
Matt Sarett [Thu, 2 Mar 2017 13:53:46 +0000 (08:53 -0500)]
Test sRGB with non-linear blending using new "srgbnl" sink

BUG=skia:

Change-Id: Ief7516c1505f8e447f83121ed4ba75b9fa9ba75b
Reviewed-on: https://skia-review.googlesource.com/8976
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agofix leak in SPIRV code generator
Ethan Nicholas [Wed, 1 Mar 2017 17:07:28 +0000 (12:07 -0500)]
fix leak in SPIRV code generator

BUG=skia:6101

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

7 years agoSymbolize all Ubuntu dm/nanobench runs
Kevin Lubick [Thu, 2 Mar 2017 13:34:47 +0000 (08:34 -0500)]
Symbolize all Ubuntu dm/nanobench runs

BUG=skia:6206

Change-Id: Ic73b04ee832c7c603a032c5726b34ecb3ac3b4ff
Reviewed-on: https://skia-review.googlesource.com/9131
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoAdd some thread safety notes.
Mike Klein [Wed, 1 Mar 2017 16:16:17 +0000 (11:16 -0500)]
Add some thread safety notes.

These are the main problems we tend to hit with multithreaded drawing.

Change-Id: I63dc56f38a533eb839d36833e865af5fcc700d3b
Reviewed-on: https://skia-review.googlesource.com/9100
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoRemove atlas creation from GrResourceProvider
Robert Phillips [Wed, 1 Mar 2017 19:32:46 +0000 (14:32 -0500)]
Remove atlas creation from GrResourceProvider

This is pulled out of: https://skia-review.googlesource.com/c/6680/ (Make SkImage_Gpu be deferred) and is only tangentially related to the goal of that CL.

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

7 years agoSome small SkJumper refactoring.
Mike Klein [Thu, 2 Mar 2017 02:49:23 +0000 (21:49 -0500)]
Some small SkJumper refactoring.

No generated code changes.

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

7 years agoRevert "Revert "Revert "Move GrTextureProvider to src"""
Brian Osman [Thu, 2 Mar 2017 01:17:01 +0000 (01:17 +0000)]
Revert "Revert "Revert "Move GrTextureProvider to src"""

This reverts commit 2fe8373bb1d56f531f8a2e03a3087b0aa73e199c.

Reason for revert: Google3 fix isn't landing.

Original change's description:
> Revert "Revert "Move GrTextureProvider to src""
>
> This reverts commit 13d7f5d7c2872ed4298330758e173ae605578cb2.
>
> Reason for revert: Fixed client code. Re-landing.
>
> Original change's description:
> > Revert "Move GrTextureProvider to src"
> >
> > This reverts commit 24429c68c56683252e3fc2a79d9b660eaf96ec0c.
> >
> > Reason for revert: Breaking a roll
> >
> > Original change's description:
> > > Move GrTextureProvider to src
> > >
> > > With this hidden, we can make further simplification. Just want to test
> > > this change against our external clients first, to make sure we're okay
> > > to proceed.
> > >
> > > BUG=skia:
> > >
> > > Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
> > > Reviewed-on: https://skia-review.googlesource.com/9072
> > > Commit-Queue: Brian Osman <brianosman@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > >
> >
> > TBR=bsalomon@google.com,brianosman@google.com,benjaminwagner@google.com,reviews@skia.org
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> >
> > Change-Id: I43cc135731245c29e24bbecf06ee46c562955c03
> > Reviewed-on: https://skia-review.googlesource.com/9123
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> >
>
> TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: Ibcb2ea34654315327c46ea8e4de5bf14376d9bdf
> Reviewed-on: https://skia-review.googlesource.com/9127
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
>

TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: If5c06c7608d76c45438d03fefb21c4edd7da4f36
Reviewed-on: https://skia-review.googlesource.com/9128
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoAdd support for Semaphores (gpu waiting on gpu) in Ganesh
Greg Daniel [Wed, 1 Mar 2017 22:01:09 +0000 (17:01 -0500)]
Add support for Semaphores (gpu waiting on gpu) in Ganesh

BUG=skia:

Change-Id: I4324b65bc50a3dfd90372459899870d5f1952fdc
Reviewed-on: https://skia-review.googlesource.com/9120
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoMake SkTypeface::onGetVariationDesignPosition pure virtual.
Ben Wagner [Wed, 1 Mar 2017 21:55:44 +0000 (16:55 -0500)]
Make SkTypeface::onGetVariationDesignPosition pure virtual.

It was non-pure until it could be implemented everywhere. Now that it
is implemented everywhere, mark it as pure virtual.

Change-Id: I985eda37d52e6d194fb39c27cb6bc0ce641238ec
Reviewed-on: https://skia-review.googlesource.com/9125
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoSkJumper: upgrade to Clang 3.9
Mike Klein [Wed, 1 Mar 2017 21:43:08 +0000 (16:43 -0500)]
SkJumper: upgrade to Clang 3.9

Mostly I think this will help me handle the AVX tails better.
But there are some wins here already, particularly in AVX and ARM code.

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

7 years agoRemove SK_HAS_DWRITE_X defines.
Ben Wagner [Wed, 1 Mar 2017 21:08:00 +0000 (16:08 -0500)]
Remove SK_HAS_DWRITE_X defines.

While developing DirectWrite it was ncessary to support building with
older Windows SDKs which may not have certain headers. Now that the
minimum required Windows SDK is 8.1 (0x0603) we can remove these
difficult to use macros to simplify future development.

Change-Id: Ia780466b7c9b86198116c5974c43363f49a0ebac
Reviewed-on: https://skia-review.googlesource.com/9124
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoCall FT_Set_Default_Properties when available.
Ben Wagner [Wed, 1 Mar 2017 18:00:53 +0000 (13:00 -0500)]
Call FT_Set_Default_Properties when available.

FreeType 2.7.0 added the ability to read some global properties from
environment variables to configure an FT_Library. However, this did
not apply to FT_New_Library. After 2.7.1 FT_Set_Default_Properties was
added so that users of FT_New_Library can also repect these properties.

This also removes SK_FONTHOST_FREETYPE_USE_NORMAL_LCD_FILTER and
associated code since there are no users of this flag, the behavior it
guards is now more or less in upstream FreeType, and the pattern in the
code it guards is now in use for calling FT_Set_Default_Properties.

BUG=skia:6165

Change-Id: I9fca86cc8b1bb9709c0b980330cf974455be3b57
Reviewed-on: https://skia-review.googlesource.com/9109
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoRevert "Revert "Move GrTextureProvider to src""
Brian Osman [Wed, 1 Mar 2017 21:54:04 +0000 (21:54 +0000)]
Revert "Revert "Move GrTextureProvider to src""

This reverts commit 13d7f5d7c2872ed4298330758e173ae605578cb2.

Reason for revert: Fixed client code. Re-landing.

Original change's description:
> Revert "Move GrTextureProvider to src"
>
> This reverts commit 24429c68c56683252e3fc2a79d9b660eaf96ec0c.
>
> Reason for revert: Breaking a roll
>
> Original change's description:
> > Move GrTextureProvider to src
> >
> > With this hidden, we can make further simplification. Just want to test
> > this change against our external clients first, to make sure we're okay
> > to proceed.
> >
> > BUG=skia:
> >
> > Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
> > Reviewed-on: https://skia-review.googlesource.com/9072
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> >
>
> TBR=bsalomon@google.com,brianosman@google.com,benjaminwagner@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: I43cc135731245c29e24bbecf06ee46c562955c03
> Reviewed-on: https://skia-review.googlesource.com/9123
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
>

TBR=bsalomon@google.com,benjaminwagner@google.com,reviews@skia.org,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: Ibcb2ea34654315327c46ea8e4de5bf14376d9bdf
Reviewed-on: https://skia-review.googlesource.com/9127
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoFuzzCanvas: fix text generation BUG=skia:6299
Hal Canary [Wed, 1 Mar 2017 20:40:46 +0000 (15:40 -0500)]
FuzzCanvas: fix text generation BUG=skia:6299

Change-Id: Ia87aee1e21bb3429d9f0bab0943190b48e0d76f2
Reviewed-on: https://skia-review.googlesource.com/9122
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoRevert "Move GrTextureProvider to src"
Brian Osman [Wed, 1 Mar 2017 20:56:30 +0000 (20:56 +0000)]
Revert "Move GrTextureProvider to src"

This reverts commit 24429c68c56683252e3fc2a79d9b660eaf96ec0c.

Reason for revert: Breaking a roll

Original change's description:
> Move GrTextureProvider to src
>
> With this hidden, we can make further simplification. Just want to test
> this change against our external clients first, to make sure we're okay
> to proceed.
>
> BUG=skia:
>
> Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
> Reviewed-on: https://skia-review.googlesource.com/9072
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

TBR=bsalomon@google.com,brianosman@google.com,benjaminwagner@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: I43cc135731245c29e24bbecf06ee46c562955c03
Reviewed-on: https://skia-review.googlesource.com/9123
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoAdd Galaxy J5 bots.
Ben Wagner [Wed, 1 Mar 2017 19:13:55 +0000 (14:13 -0500)]
Add Galaxy J5 bots.

BUG=skia:6097
NOTRY=true

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

7 years agoAdd path renderer options to viewer GUI
Brian Osman [Wed, 1 Mar 2017 19:59:05 +0000 (14:59 -0500)]
Add path renderer options to viewer GUI

BUG=skia:

Change-Id: I248ba081f0229d7fcf2071009076acc88b80b076
Reviewed-on: https://skia-review.googlesource.com/9088
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoRemove stencil related flags from GrInstancedPipelineInfo.
Brian Salomon [Wed, 1 Mar 2017 19:34:41 +0000 (14:34 -0500)]
Remove stencil related flags from GrInstancedPipelineInfo.

Change-Id: Ieeb8ada92b5196473d5cea77350fd994bfff8916
Reviewed-on: https://skia-review.googlesource.com/9086
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoremove unneeded android flag for textdecorations
Mike Reed [Wed, 1 Mar 2017 19:02:05 +0000 (14:02 -0500)]
remove unneeded android flag for textdecorations

BUG=skia:

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

7 years agofix fuzzer
Cary Clark [Wed, 1 Mar 2017 19:02:02 +0000 (14:02 -0500)]
fix fuzzer

turn asserts into error returns to fix fuzz

R=kjlubick@google.com
BUG=skia:6162

Change-Id: I7508eb5cb41425dcfc2718aaa9cc1ee8aa00acc9
Reviewed-on: https://skia-review.googlesource.com/9118
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>

7 years agoUnpremul the blend constant in PDLCDXferProcessor.
Brian Salomon [Wed, 1 Mar 2017 18:59:10 +0000 (13:59 -0500)]
Unpremul the blend constant in PDLCDXferProcessor.

This was accidentally dropped in https://skia.googlesource.com/skia.git/+/eec6f7be5461e588210f383b8af18f324a2bdb46

BUG=chromium:695626

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

7 years agoGrTessellator: minor cleanups and speedups.
Stephen White [Wed, 1 Mar 2017 16:48:27 +0000 (11:48 -0500)]
GrTessellator: minor cleanups and speedups.

Don't null out vertex's fPrev and fNext ptrs during
MonotonePoly::emit(); list_insert() will do it for us.

Don't normalize the tangent returned by get_unit_normal() to unit
length, since we can do the dot product comparison without it.

Copy Lines where possible, rather than recomputing them.

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

7 years agoUse SkArenaAlloc in SkEdgeBuilder.
Herb Derby [Wed, 1 Mar 2017 18:44:39 +0000 (13:44 -0500)]
Use SkArenaAlloc in SkEdgeBuilder.

Change-Id: Ie3557469d018b857dc6fb4543d367fcd8768f0b7
Reviewed-on: https://skia-review.googlesource.com/9115
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoMove GrTextureProvider to src
Brian Osman [Wed, 1 Mar 2017 18:41:52 +0000 (13:41 -0500)]
Move GrTextureProvider to src

With this hidden, we can make further simplification. Just want to test
this change against our external clients first, to make sure we're okay
to proceed.

BUG=skia:

Change-Id: I47f8c8f2912201c2890bc2f9a9d68aa92649a2d4
Reviewed-on: https://skia-review.googlesource.com/9072
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoSet window dimensions in raster on Unix
Brian Osman [Wed, 1 Mar 2017 18:39:14 +0000 (13:39 -0500)]
Set window dimensions in raster on Unix

These values were left uninitialized, leading to problems with the GUI
in raster configs.

BUG=skia:

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

7 years agoUse GrAAType in instanced rendering.
Brian Salomon [Wed, 1 Mar 2017 16:28:27 +0000 (11:28 -0500)]
Use GrAAType in instanced rendering.

Change-Id: Ifb5a33f908de618d66fcb0dd329f064c1ecfcd63
Reviewed-on: https://skia-review.googlesource.com/9082
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoInitialize XImage struct fully
Brian Osman [Wed, 1 Mar 2017 17:00:06 +0000 (12:00 -0500)]
Initialize XImage struct fully

I was getting sporadic failures from XInitImage (causing the raster
backend to not draw anything).

BUG=skia:

Change-Id: Ied79f2b5354d89c146aca64d70fde8cf9f3ab62e
Reviewed-on: https://skia-review.googlesource.com/9102
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agochanged skslc layout parsing strategy
Ethan Nicholas [Wed, 1 Mar 2017 16:46:51 +0000 (11:46 -0500)]
changed skslc layout parsing strategy

Change-Id: I322f0682a8753beb858012b00ee7e4ec6b206c2f
Reviewed-on: https://skia-review.googlesource.com/9081
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
7 years agoSkAndroidCodec: Leave pixels in encoded colorspace when tf is numerical
Matt Sarett [Tue, 28 Feb 2017 20:36:42 +0000 (15:36 -0500)]
SkAndroidCodec: Leave pixels in encoded colorspace when tf is numerical

Color space conversion will be deferred until later.

Change-Id: I0fbade9bb374fe2ee9328f87284a2d86a199f7b4
Reviewed-on: https://skia-review.googlesource.com/9080
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoDefine canvas fuzzers like the other API fuzzers
Kevin Lubick [Wed, 1 Mar 2017 15:42:45 +0000 (10:42 -0500)]
Define canvas fuzzers like the other API fuzzers

Invoke these like:
out/Clang/fuzz -n RasterN32Canvas -b [fuzz]
out/Clang/fuzz -n NullCanvas -b [fuzz]
out/Clang/fuzz -n PDFCanvas -b [fuzz]

For debugging:
out/Clang/fuzz -n _DumpCanvas -b [fuzz]

BUG=skia:

Change-Id: I19bd215df09ad2e4ceb7ab16ac6b232fb3f905ed
Reviewed-on: https://skia-review.googlesource.com/9097
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoAdd imgui.ini to .gitignore
Brian Osman [Wed, 1 Mar 2017 15:23:09 +0000 (10:23 -0500)]
Add imgui.ini to .gitignore

This file is auto-generated by viewer's GUI library (to remember size and
position of windows).

BUG=skia:

Change-Id: Id363301d71d3df1d665c4e495a0d5062cdbc472b
Reviewed-on: https://skia-review.googlesource.com/9095
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoFix Memcheck:Overlap in setting up rect bench names
Brian Salomon [Wed, 1 Mar 2017 14:49:58 +0000 (09:49 -0500)]
Fix Memcheck:Overlap in setting up rect bench names

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

7 years agofuzz: dump_canvas
Hal Canary [Mon, 27 Feb 2017 21:42:03 +0000 (16:42 -0500)]
fuzz: dump_canvas

For example: `fuzz --type _dump_canvas -b fuzz_file`

Note well: this command-line usage is subject to change.

Change-Id: Ida7368a699bafe2395604d8428a2d50cb0eff6aa
Reviewed-on: https://skia-review.googlesource.com/9025
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoAllow dm threads for GalaxyS*
Ben Wagner [Wed, 1 Mar 2017 02:16:18 +0000 (21:16 -0500)]
Allow dm threads for GalaxyS*

This appears to have been added for the GalaxyS4 in
https://codereview.chromium.org/1106173004/, but we no longer test the
GalaxyS4.

BUG=skia:3214
NOTRY=true

Change-Id: I10c4e1457ebf0e65133ac914cd9fdf0964c74003
Reviewed-on: https://skia-review.googlesource.com/9090
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoDisable deferred gpu resources for Chrome branch
Robert Phillips [Tue, 28 Feb 2017 21:30:28 +0000 (16:30 -0500)]
Disable deferred gpu resources for Chrome branch

Chrome's branch is coming up and it seems unlikely that I will be able to push instantiation all the way to flush time (where failure will be easier to deal with) before then. This CL should silence the P1 bug but could introduce layout test diffs.

Ideally this wouldn't land until after: https://codereview.chromium.org/2718353004/ (Add flag for upcoming Skia change) so the layout test differences will be visible on the DEPS roll

BUG=688811

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

7 years agoadd isolate (init-with-previous) savelayer flag
Mike Reed [Tue, 28 Feb 2017 22:45:27 +0000 (17:45 -0500)]
add isolate (init-with-previous) savelayer flag

BUG=skia:4884

Change-Id: If7fabf5cc2c87b870f48dfb87e27a2524fec5ae5
Reviewed-on: https://skia-review.googlesource.com/9045
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoClarify what is passed to AutoDrawLooper.
Mike Reed [Tue, 28 Feb 2017 21:41:03 +0000 (16:41 -0500)]
Clarify what is passed to AutoDrawLooper.

Explicitly pass the raw bounds to AutoDrawLooper, regardless of the calculations needed for quickreject.
Deliberately move temp rects (e.g. storage) right where needed, so they are not in scope after their use.

Change-Id: I392bda7857566b2fc14429d8ea632ab712dd37d1
Reviewed-on: https://skia-review.googlesource.com/9044
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
7 years agoAdd AVX-512 detection to SkCpu, try 2.
Mike Klein [Wed, 1 Mar 2017 01:15:26 +0000 (20:15 -0500)]
Add AVX-512 detection to SkCpu, try 2.

This time, don't call xgetbv() before checking we can.

This reverts commit b26373cfd8151b2fa56bdf532ddcde4919cce09f.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug

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

7 years agoClean up/remove unused GrFragmentProcessor-derived ctors
Robert Phillips [Tue, 28 Feb 2017 21:20:03 +0000 (16:20 -0500)]
Clean up/remove unused GrFragmentProcessor-derived ctors

This is the simple (i.e., non-TextureAdjuster) portion of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)

Change-Id: I8f673ebe922e03c69473c18c166bcf818507c662
Reviewed-on: https://skia-review.googlesource.com/8997
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoFix -Wshadow-field warnings
Brian Salomon [Tue, 28 Feb 2017 21:11:04 +0000 (16:11 -0500)]
Fix -Wshadow-field warnings

BUG=skia:

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

7 years agoAdd backend selection to viewer's GUI
Brian Osman [Tue, 28 Feb 2017 20:45:01 +0000 (15:45 -0500)]
Add backend selection to viewer's GUI

BUG=skia:

Change-Id: I3314013538792c2aa82cc49f3f072aab2cdc4a55
Reviewed-on: https://skia-review.googlesource.com/9079
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
7 years agoRemove SkDataTableBuilder. It is not used.
Herb Derby [Tue, 28 Feb 2017 18:45:41 +0000 (13:45 -0500)]
Remove SkDataTableBuilder. It is not used.

Change-Id: Ieae9adba73b8ada959e08d69a06d0f3d010209c6
Reviewed-on: https://skia-review.googlesource.com/9076
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoAdd GrExternalTextureData and SkCrossContextImageData
Brian Osman [Tue, 28 Feb 2017 15:02:49 +0000 (10:02 -0500)]
Add GrExternalTextureData and SkCrossContextImageData

GrExternalTextureData is an API for exporting the backend-specific
information about a texture in a type-safe way, and without pointing
into the GrTexture. The new detachBackendTexture API lets us release
ownership of a texture to the client.

SkCrossContextImageData is the public API that lets clients upload
textures on one thread/GrContext, then safely transfer ownership to
another thread and GrContext for rendering.

Only GL is implemented/supported right now. Vulkan support requires
that we add thread-safe memory pools, or otherwise transfer the
actual memory block containing the texture to the new context.

Re-land of https://skia-review.googlesource.com/c/8529/

BUG=skia:

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

7 years agoFix crash switching to Vulkan in viewer on Windows
Brian Osman [Tue, 28 Feb 2017 19:37:40 +0000 (14:37 -0500)]
Fix crash switching to Vulkan in viewer on Windows

BUG=skia:

Change-Id: I626aa6a1571311600a6208c42a8c3e9509d037de
Reviewed-on: https://skia-review.googlesource.com/9078
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoAdd SkColorSpace::isNumericalTransferFn() to the public API
Matt Sarett [Tue, 28 Feb 2017 19:24:31 +0000 (14:24 -0500)]
Add SkColorSpace::isNumericalTransferFn() to the public API

This adds a little more flexibility for clients wanting to handle
color space transformation outside of the codecs.  Ex: they can
leave the encoded data as is and apply the numerical transfer
fn in a later step.

BUG=skia:

Change-Id: Ieca53b01648d4cb9cf0995715deacd4c4876900f
Reviewed-on: https://skia-review.googlesource.com/9077
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoviewer: Add a "Path renderer" dropdown menu
csmartdalton [Tue, 28 Feb 2017 00:00:53 +0000 (17:00 -0700)]
viewer: Add a "Path renderer" dropdown menu

BUG=skia:

Change-Id: Ia3ed812d24f0f83631ab238bc418a3c95d49b9dc
Reviewed-on: https://skia-review.googlesource.com/9000
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agoDisable f16 and srgb configs for Android CPU perf.
Ben Wagner [Tue, 28 Feb 2017 16:31:49 +0000 (11:31 -0500)]
Disable f16 and srgb configs for Android CPU perf.

This is a followup to https://skia-review.googlesource.com/c/9021/

BUG=skia:

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

7 years agoAllow GrSurfaceProxy-derived classes to use flags when instantiating (take 2)
Robert Phillips [Tue, 28 Feb 2017 16:26:32 +0000 (11:26 -0500)]
Allow GrSurfaceProxy-derived classes to use flags when instantiating (take 2)

In some instances proxies must be created that, when instantiated, have no pending IO.

This is split out of:

https://skia-review.googlesource.com/c/8679/ (Add per-Flush callback to GrDrawingManager)

and is a reland of:

https://skia-review.googlesource.com/c/8988/ ( Allow GrSurfaceProxy-derived classes to use flags when instantiating)

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

7 years agoRevert "Add AVX-512 detection to SkCpu"
Cary Clark [Tue, 28 Feb 2017 17:18:13 +0000 (17:18 +0000)]
Revert "Add AVX-512 detection to SkCpu"

This reverts commit 3c322e23a013e78fcbe0edd7adccd580af8466bc.

Reason for revert: crash in SkCpu on Mac

Original change's description:
> Add AVX-512 detection to SkCpu
>
> I've added a SKY alias for the five new bits detected on a Skylake Xeon.
>
> Change-Id: I9f7dd48f4dc866608d81befd061434ca325ef451
> Reviewed-on: https://skia-review.googlesource.com/9043
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>

TBR=mtklein@chromium.org,herb@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

7 years agoWhen traversing convex paths only consume zero length segments.
Brian Salomon [Tue, 28 Feb 2017 16:21:28 +0000 (11:21 -0500)]
When traversing convex paths only consume zero length segments.

BUG=chromium:688671

Change-Id: Ic27dde1ea7c1fe8b6afa0a05c637d8272e88b803
Reviewed-on: https://skia-review.googlesource.com/9071
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoFix single leg Compose Shader crash.
Herb Derby [Tue, 28 Feb 2017 16:14:47 +0000 (11:14 -0500)]
Fix single leg Compose Shader crash.

R=halcanary@google.com

BUG=skia:6291

Change-Id: Ifa63dce2b06662e7b535a4f04e1f3f772c099122
Reviewed-on: https://skia-review.googlesource.com/9027
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
7 years agoReland: Allow DFPathRenderer to store bitmaps at low resolutions
Jim Van Verth [Tue, 28 Feb 2017 15:24:39 +0000 (10:24 -0500)]
Reland: Allow DFPathRenderer to store bitmaps at low resolutions

BUG=chromium:682918

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