platform/upstream/libSkiaSharp.git
7 years agoRevert[3] "store vertices arrays inline with object"""
Mike Reed [Thu, 16 Mar 2017 16:44:25 +0000 (16:44 +0000)]
Revert[3] "store vertices arrays inline with object"""

This reverts commit 7d9f9e30204ee8a380443b868e4cc281319a2051.

Reason for revert: speculative revert to try to fix google3

Original change's description:
> Revert[2] "store vertices arrays inline with object""
>
> This reverts commit 9e62df6ecd1000860ad19ab9425579dfb7002ba0.
>
> Reason for revert: behavior in reader32 fixed
>
> Fix is here: https://skia-review.googlesource.com/c/9729/
>
> Original change's description:
> > Revert "store vertices arrays inline with object"
> >
> > This reverts commit eaaebb19a17d213355e7a70e0cfabe4ba61929d4.
> >
> > Reason for revert: may call SkReader32::read(null, 0) -- reader needs to handle this
> >
> > Original change's description:
> > > store vertices arrays inline with object
> > >
> > > Also unify some of naming (esp. around texCoords)
> > >
> > > BUG=skia:6366
> > >
> > > Change-Id: I5a6793f029cccf0cd0a2c1d180b259ce4eab526f
> > > Reviewed-on: https://skia-review.googlesource.com/9705
> > > Commit-Queue: Mike Reed <reed@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > >
> >
> > TBR=bsalomon@google.com,reed@google.com,reviews@skia.org
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:6366
> >
> > Change-Id: Ie421654bcd74d74f8be6676291e3d6e16e2a7a16
> > Reviewed-on: https://skia-review.googlesource.com/9727
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> >
>
> TBR=bsalomon@google.com,reviews@skia.org,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:6366
>
> Change-Id: I1f12108fff8f551d66455cfadd6d5dd9412e9aa8
> Reviewed-on: https://skia-review.googlesource.com/9760
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

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

7 years agoMarker for AMD driver update.
Ben Wagner [Thu, 16 Mar 2017 16:15:18 +0000 (12:15 -0400)]
Marker for AMD driver update.

BUG=skia:6317
NOTRY=true

Change-Id: I2a02d069f8414a4f45b5b9eb48ae12167e210b97
Reviewed-on: https://skia-review.googlesource.com/9803
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoturned off SPIR-V validation on ASAN bots
Ethan Nicholas [Thu, 16 Mar 2017 15:33:40 +0000 (11:33 -0400)]
turned off SPIR-V validation on ASAN bots

BUG=skia:

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

7 years agoRevert "Remove budgeted parameter from SkSurface::makeImageSnapshot"
Yuqian Li [Thu, 16 Mar 2017 15:04:53 +0000 (15:04 +0000)]
Revert "Remove budgeted parameter from SkSurface::makeImageSnapshot"

This reverts commit b64bcbdc3a5aa7b9e3ff216e4617ddc1db9260b5.

Reason for revert:

Android build failed as shown below.

frameworks/base/libs/hwui/VkLayer.cpp:32:41: error: too many arguments to function call, expected 0, have 1
    mImage = surface->makeImageSnapshot(SkBudgeted::kNo);

Original change's description:
> Remove budgeted parameter from SkSurface::makeImageSnapshot
>
> This unused feature complicates MDB.
>
> Chrome compiles locally for me with this CL.
>
> Change-Id: I611e464885fb984030eace43ead42cf39d0e7f72
> Reviewed-on: https://skia-review.googlesource.com/9734
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>

TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

7 years agowired up SPIR-V validator
Ethan Nicholas [Thu, 16 Mar 2017 13:56:54 +0000 (09:56 -0400)]
wired up SPIR-V validator

Change-Id: I33dfd5e7ea3ea048b88c6db2f14389b16a0af7c8
Reviewed-on: https://skia-review.googlesource.com/9688
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoSupport all gradient types in SkColorSpaceXformCanvas.
Mike Klein [Wed, 15 Mar 2017 23:31:00 +0000 (16:31 -0700)]
Support all gradient types in SkColorSpaceXformCanvas.

This shader introspection still doesn't seem like the right way to go,
but while we've got it might as well fill in the rest of gradient types.

These are low-hanging and among the most egregious gbr-8888/8888 diffs.

Change-Id: Iaee67b615e49873c3aa8e2a67396a311efa75060
Reviewed-on: https://skia-review.googlesource.com/9746
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoOutset dst texture bounds by a pixel to fix corruption in dstreadshuffle.
Brian Salomon [Thu, 16 Mar 2017 13:21:54 +0000 (09:21 -0400)]
Outset dst texture bounds by a pixel to fix corruption in dstreadshuffle.

BUG=skia:6380

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

7 years agoRemove budgeted parameter from SkSurface::makeImageSnapshot
Robert Phillips [Thu, 16 Mar 2017 12:32:56 +0000 (08:32 -0400)]
Remove budgeted parameter from SkSurface::makeImageSnapshot

This unused feature complicates MDB.

Chrome compiles locally for me with this CL.

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

7 years agoAdd SK_API to SkCreateColorSpaceXformCanvas
Christopher Cameron [Wed, 15 Mar 2017 19:57:55 +0000 (12:57 -0700)]
Add SK_API to SkCreateColorSpaceXformCanvas

BUG=skia:6242

API change just makes already public API actually accessible.

TBR=reed@google.com

Change-Id: I72f9271db5f14e6fc35628bed5e16b01b304de4c
Reviewed-on: https://skia-review.googlesource.com/9743
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoRename GrAADistanceFieldPathRenderer to GrSmallPathRenderer
Jim Van Verth [Thu, 16 Mar 2017 12:45:39 +0000 (08:45 -0400)]
Rename GrAADistanceFieldPathRenderer to GrSmallPathRenderer

Also disables use of small distance fields in Android framework.

Change-Id: I1ba40ce85aa34d067608587e1fbe1d42e8a42868
Reviewed-on: https://skia-review.googlesource.com/9731
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
7 years agoMake SkTArray not allocate unless reserve or initial count > 0
Brian Salomon [Thu, 16 Mar 2017 00:52:35 +0000 (20:52 -0400)]
Make SkTArray not allocate unless reserve or initial count > 0

This also makes it so that it doesn't shrink back into preallocated storage and therefore doesn't need to store the reserve count.

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

7 years agoMore pre-emptive proxification
Robert Phillips [Thu, 16 Mar 2017 11:51:56 +0000 (07:51 -0400)]
More pre-emptive proxification

These methods are not called yet. This CL is broken out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)

Change-Id: I2bf38202750e91e66a8044a790ccfe34d59e08a7
Reviewed-on: https://skia-review.googlesource.com/9683
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoFuzzCanvas: only valid ChannelSelectors
Hal Canary [Wed, 15 Mar 2017 20:58:33 +0000 (16:58 -0400)]
FuzzCanvas: only valid ChannelSelectors

BUG=skia:6374
Change-Id: Idf925dbe32298672d7e5debb7e95499269d93706
Reviewed-on: https://skia-review.googlesource.com/9781
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoUpdate recipes.py to f605e5c0bc2e748170ca851383cb552c7225316b
Robert Iannucci [Thu, 16 Mar 2017 01:04:05 +0000 (18:04 -0700)]
Update recipes.py to f605e5c0bc2e748170ca851383cb552c7225316b

This will enable it to be compatible with both the textpb and
upcoming jsonpb form of recipes.cfg.

BUG=chromium:699379

Change-Id: Ieabf2b0c3e41bbb250e987a90902ee1bdb71b73d
Reviewed-on: https://skia-review.googlesource.com/9749
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoRevert "Support pixel antialising in DirectWrite."
Mike Reed [Wed, 15 Mar 2017 23:51:22 +0000 (23:51 +0000)]
Revert "Support pixel antialising in DirectWrite."

This reverts commit 34db1eee20ffea6e423284bb06824653efff645d.

Reason for revert: breaks the chrome roll

E:\b\c\b\win_clang\src\third_party\skia\src\ports\SkScalerContext_win_dw.cpp(287,49):  error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
        GaspRange range{bitmapPPEM, bitmapPPEM, 0};
                                                ^
                                                {}
E:\b\c\b\win_clang\src\third_party\skia\src\ports\SkScalerContext_win_dw.cpp(287,49):  error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
        GaspRange range{bitmapPPEM, bitmapPPEM, 0};
                                                ^
                                                {}
E:\b\c\b\win_clang\src\third_party\skia\src\ports\SkScalerContext_win_dw.cpp(290,59):  error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
                range = GaspRange{bitmapPPEM, bitmapPPEM, 0};
                                                          ^
                                                          {}
E:\b\c\b\win_clang\src\third_party\skia\src\ports\SkScalerContext_win_dw.cpp(290,59):  error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
                range = GaspRange{bitmapPPEM, bitmapPPEM, 0};
                                                          ^
                                                          {}
E:\b\c\b\win_clang\src\third_party\skia\src\ports\SkScalerContext_win_dw.cpp(338,39):  error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
        GaspRange range = {0, 0xFFFF, 0};
                                      ^
                                      {}
E:\b\c\b\win_clang\src\third_party\skia\src\ports\SkScalerContext_win_dw.cpp(338,39):  error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
        GaspRange range = {0, 0xFFFF, 0};
                                      ^
                                      {}

Original change's description:
> Support pixel antialising in DirectWrite.
>
> DirectWrite2 supports pixel antialiasing and rendering without hinting.
>
> BUG=skia:5416
>
> Change-Id: I215245b20dd403669dbccd37e34cb2fcd5e06431
> Reviewed-on: https://skia-review.googlesource.com/9145
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
>

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

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

7 years agoremove legacy clipop names
Mike Reed [Wed, 15 Mar 2017 23:08:55 +0000 (19:08 -0400)]
remove legacy clipop names

BUG=skia:

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

7 years agoSupport pixel antialising in DirectWrite.
Ben Wagner [Wed, 15 Mar 2017 19:22:29 +0000 (15:22 -0400)]
Support pixel antialising in DirectWrite.

DirectWrite2 supports pixel antialiasing and rendering without hinting.

BUG=skia:5416

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

7 years agoAdd color spin test for SkColorSpaceXformCanvas
Matt Sarett [Wed, 15 Mar 2017 19:48:19 +0000 (15:48 -0400)]
Add color spin test for SkColorSpaceXformCanvas

Also changes behavior to treat nullptr srcs as sRGB.

Testing locally, it looks like 353 gms have no diffs from 8888.
There are 269 diffs - some are fine (gms that do color space stuff)
and some are bugs.

BUG=skia:

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

7 years agoMake dstreadshuffle GM more visually comprehensible
Brian Salomon [Wed, 15 Mar 2017 19:37:43 +0000 (15:37 -0400)]
Make dstreadshuffle GM more visually comprehensible

Change-Id: I1f42f474fb753e3dfbb574864f0279f139dce7e9
Reviewed-on: https://skia-review.googlesource.com/9732
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoFuzzCanvas: make fuzzing drawImgNine easier
Hal Canary [Wed, 15 Mar 2017 16:58:15 +0000 (12:58 -0400)]
FuzzCanvas: make fuzzing drawImgNine easier

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

7 years agoSkDynamicMemoryWStream::detachAsStream() returns unique_ptr
Hal Canary [Tue, 14 Mar 2017 18:35:02 +0000 (14:35 -0400)]
SkDynamicMemoryWStream::detachAsStream() returns unique_ptr

https://crrev.com/2747183002 must land first.
Change-Id: I65d1285a24d63c2c2f18662d511dea1c399511e1
Reviewed-on: https://skia-review.googlesource.com/9682
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
7 years agoRun gen tasks
Kevin Lubick [Wed, 15 Mar 2017 18:54:01 +0000 (14:54 -0400)]
Run gen tasks

BUG=skia:
NOTRY=true

Change-Id: I2fe67029b5e4e7e1696697876f94fd10c184f728
Reviewed-on: https://skia-review.googlesource.com/9736
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoFuzzCanvas: NativeGLCanvas
Hal Canary [Wed, 15 Mar 2017 15:39:06 +0000 (11:39 -0400)]
FuzzCanvas: NativeGLCanvas

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

7 years agoRevert "Add pre-Flush callback to GrDrawingManager"
Robert Phillips [Wed, 15 Mar 2017 18:41:24 +0000 (18:41 +0000)]
Revert "Add pre-Flush callback to GrDrawingManager"

This reverts commit d222ec492f5d0229986f529134d083e589bcc4a9.

Reason for revert: TegraX1 Vulkan bot

Original change's description:
> Add pre-Flush callback to GrDrawingManager
>
> This will allow internal systems (e.g., fonts & path renderers) to create pre-flush atlases.
>
> Depends on: https://skia-review.googlesource.com/c/8988/ (Allow GrSurfaceProxy-derived classes to use flags when instantiating)
>
> Change-Id: I307796595d651cf376838bff1f9e4385c3753547
> Reviewed-on: https://skia-review.googlesource.com/8679
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I852648adc12d2aa58cd09c57d961c340d657776c
Reviewed-on: https://skia-review.googlesource.com/9735
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoSkColorSpaceXformCanvas: simple support for shaders
Mike Klein [Wed, 15 Mar 2017 16:56:47 +0000 (09:56 -0700)]
SkColorSpaceXformCanvas: simple support for shaders

So far it looks like we can hit the major shader subclasses without
needing to add new calls to SkShader.  Not married to this approach,
but it's a big head start.

I've left out nonlinear gradient types just to keep this CL clear.
Will follow up with them... they won't be interestingly different.

Change-Id: I8711ff464f384d8be1671c139ba10a20502d9c0f
Reviewed-on: https://skia-review.googlesource.com/9742
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRevert[2] "store vertices arrays inline with object""
Mike Reed [Wed, 15 Mar 2017 18:35:07 +0000 (18:35 +0000)]
Revert[2] "store vertices arrays inline with object""

This reverts commit 9e62df6ecd1000860ad19ab9425579dfb7002ba0.

Reason for revert: behavior in reader32 fixed

Fix is here: https://skia-review.googlesource.com/c/9729/

Original change's description:
> Revert "store vertices arrays inline with object"
>
> This reverts commit eaaebb19a17d213355e7a70e0cfabe4ba61929d4.
>
> Reason for revert: may call SkReader32::read(null, 0) -- reader needs to handle this
>
> Original change's description:
> > store vertices arrays inline with object
> >
> > Also unify some of naming (esp. around texCoords)
> >
> > BUG=skia:6366
> >
> > Change-Id: I5a6793f029cccf0cd0a2c1d180b259ce4eab526f
> > Reviewed-on: https://skia-review.googlesource.com/9705
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> >
>
> TBR=bsalomon@google.com,reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:6366
>
> Change-Id: Ie421654bcd74d74f8be6676291e3d6e16e2a7a16
> Reviewed-on: https://skia-review.googlesource.com/9727
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

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

7 years agoPush setMipColorMode calls further down-stack & add to GrTextureProxy
Robert Phillips [Wed, 15 Mar 2017 17:02:45 +0000 (13:02 -0400)]
Push setMipColorMode calls further down-stack & add to GrTextureProxy

setMipColorMode seems like an odd call.

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

7 years agoRecreate SVG asset
Kevin Lubick [Wed, 15 Mar 2017 18:14:54 +0000 (14:14 -0400)]
Recreate SVG asset

Create SVGS properly, w/o missing ones from https://skia-review.googlesource.com/c/9630/

BUG=skia:
NOTRY=true

Change-Id: I74a91b7310534d578cccbf681f9cf6877eefdcd1
Reviewed-on: https://skia-review.googlesource.com/9733
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agomust check for zero-length in reader32::read() before calling memcpy
Mike Reed [Wed, 15 Mar 2017 17:38:26 +0000 (13:38 -0400)]
must check for zero-length in reader32::read() before calling memcpy

memcpy's behavior is undefined if the dst-ptr is null, but reader32 supports
null as long as the size is 0, so it needs to check explicitly before
calling memcpy. This is implemented (now) by calling sk_careful_memcpy.

BUG=skia:

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

7 years agoFix formatting error in test output
Brian Osman [Wed, 15 Mar 2017 17:35:51 +0000 (13:35 -0400)]
Fix formatting error in test output

BUG=skia:

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

7 years agoDisable debug layers on non android vulkan bots
Greg Daniel [Wed, 15 Mar 2017 17:28:21 +0000 (13:28 -0400)]
Disable debug layers on non android vulkan bots

BUG=skia:

Change-Id: I3f671bed10aad6b481bdcf42585c8c24dc4a274d
Reviewed-on: https://skia-review.googlesource.com/9726
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoAdd pre-Flush callback to GrDrawingManager
Robert Phillips [Wed, 15 Mar 2017 17:27:18 +0000 (13:27 -0400)]
Add pre-Flush callback to GrDrawingManager

This will allow internal systems (e.g., fonts & path renderers) to create pre-flush atlases.

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

Change-Id: I307796595d651cf376838bff1f9e4385c3753547
Reviewed-on: https://skia-review.googlesource.com/8679
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoFix warning in Clang 4.0 Mac build.
Mike Klein [Wed, 15 Mar 2017 16:43:04 +0000 (09:43 -0700)]
Fix warning in Clang 4.0 Mac build.

    ../src/views/mac/SkNSView.mm:18:31: note: expanded from macro 'RETINA_API_AVAILABLE'
    #define RETINA_API_AVAILABLE (defined(MAC_OS_X_VERSION_10_7) && \
                                  ^
    ../src/views/mac/SkNSView.mm:404:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
    #if RETINA_API_AVAILABLE

After this change, Clang 4.0 builds everything on Mac without warning.

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

7 years agoRevert "store vertices arrays inline with object"
Mike Reed [Wed, 15 Mar 2017 17:32:39 +0000 (17:32 +0000)]
Revert "store vertices arrays inline with object"

This reverts commit eaaebb19a17d213355e7a70e0cfabe4ba61929d4.

Reason for revert: may call SkReader32::read(null, 0) -- reader needs to handle this

Original change's description:
> store vertices arrays inline with object
>
> Also unify some of naming (esp. around texCoords)
>
> BUG=skia:6366
>
> Change-Id: I5a6793f029cccf0cd0a2c1d180b259ce4eab526f
> Reviewed-on: https://skia-review.googlesource.com/9705
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

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

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

7 years agoUse SkBlendMode_Name rather than one-off tables
Brian Osman [Wed, 15 Mar 2017 16:19:37 +0000 (12:19 -0400)]
Use SkBlendMode_Name rather than one-off tables

BUG=skia:

Change-Id: I653ff55bc1164ddae4b03967f2f54bb5fece5a33
Reviewed-on: https://skia-review.googlesource.com/9722
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agostore vertices arrays inline with object
Mike Reed [Wed, 15 Mar 2017 16:19:07 +0000 (12:19 -0400)]
store vertices arrays inline with object

Also unify some of naming (esp. around texCoords)

BUG=skia:6366

Change-Id: I5a6793f029cccf0cd0a2c1d180b259ce4eab526f
Reviewed-on: https://skia-review.googlesource.com/9705
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoEmit dumpInfo string when processor opt test fails
Brian Osman [Wed, 15 Mar 2017 15:33:12 +0000 (11:33 -0400)]
Emit dumpInfo string when processor opt test fails

Add missing implementation for ComposeTwo, and provide more information in
ComposeOne.

BUG=skia:

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

7 years agoRetract GrContext from src/gpu/effects
Robert Phillips [Wed, 15 Mar 2017 14:42:12 +0000 (10:42 -0400)]
Retract GrContext from src/gpu/effects

Change-Id: Iceb7263098286bafb2605ef17d1fe6bb25d71e97
Reviewed-on: https://skia-review.googlesource.com/9693
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoViewer's nonlinear blend mode uses SkColorSpaceXformCanvas
Brian Osman [Wed, 15 Mar 2017 14:24:55 +0000 (10:24 -0400)]
Viewer's nonlinear blend mode uses SkColorSpaceXformCanvas

Also avoid asserting when untagged images are being transformed.

BUG=skia:

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

7 years agoAdd Linux GTX 960 tasks
Kevin Lubick [Wed, 15 Mar 2017 13:06:26 +0000 (09:06 -0400)]
Add Linux GTX 960 tasks

BUG=skia:6376

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

7 years agoUpdate coverage script to cover new Canvas Fuzzers
Kevin Lubick [Wed, 15 Mar 2017 14:30:33 +0000 (10:30 -0400)]
Update coverage script to cover new Canvas Fuzzers

BUG=skia:
NOTRY=true

Change-Id: I8efd0da6c7f21ee2309be3c257f85950356a64bf
Reviewed-on: https://skia-review.googlesource.com/9696
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoRoll freetype.
Ben Wagner [Tue, 14 Mar 2017 20:54:06 +0000 (16:54 -0400)]
Roll freetype.

https://skia.googlesource.com/third_party/freetype2.git/+log/08fd250e1a..447a0b6263

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

7 years agoSkDynamicMemoryWStream::detachAsData more memory efficent
Hal Canary [Tue, 14 Mar 2017 19:52:12 +0000 (15:52 -0400)]
SkDynamicMemoryWStream::detachAsData more memory efficent

I did some testing with very large datasets, and the difference in max
RSS is measurable and significant.

Change-Id: I6bb2f795d5b4f6ebdba42c3089dc85a278355d48
Reviewed-on: https://skia-review.googlesource.com/9686
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
7 years agoGPU version of onMakeColorSpace
Brian Osman [Tue, 14 Mar 2017 16:07:12 +0000 (12:07 -0400)]
GPU version of onMakeColorSpace

New fragment processor that implements end-to-end
color space conversion, with nonlinear blending.

BUG=skia:6242

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

7 years agoUpdate recipes.py to 78c57c5d69a38ef3db86d9763d539383f98714e6.
Robert Iannucci [Wed, 15 Mar 2017 08:24:56 +0000 (01:24 -0700)]
Update recipes.py to 78c57c5d69a38ef3db86d9763d539383f98714e6.

This updates the recipes.py script to the latest version, which fixes a
couple bugs.

BUG=

Change-Id: I6a0373531ae35577de77723210d68a5a2320d815
Reviewed-on: https://skia-review.googlesource.com/9706
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agooption to make 'M' mean picture+serialize
Mike Reed [Wed, 15 Mar 2017 01:10:42 +0000 (21:10 -0400)]
option to make 'M' mean picture+serialize

BUG=skia:

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

7 years agoadd uniqueID
Mike Reed [Wed, 15 Mar 2017 01:05:17 +0000 (21:05 -0400)]
add uniqueID

BUG=skia:6366

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

7 years agoSkJumper: update to Clang 4.0
Mike Klein [Wed, 15 Mar 2017 00:35:04 +0000 (17:35 -0700)]
SkJumper: update to Clang 4.0

This Clang makes some new decisions about what (not) to inline.
Luckily, liberal use of the 'inline' keyword steers it back in
the right direction.

This new code draws the same, and generally looks improved.

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

7 years agofloor -> floor_, just like abs_
Mike Klein [Tue, 14 Mar 2017 23:53:07 +0000 (16:53 -0700)]
floor -> floor_, just like abs_

Should fix the MSAN bot.

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

7 years agoSkJumper: more constants, _f and _i literals.
Mike Klein [Tue, 7 Mar 2017 22:29:54 +0000 (17:29 -0500)]
SkJumper: more constants, _f and _i literals.

Generalize section types to avoid, adding another type (.rodata).

I've kept K for iota only.  Maybe one day...

Change-Id: Ie5678a2ea00fefe550bc0e6dcab32f98c31d3fae
Reviewed-on: https://skia-review.googlesource.com/9403
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoAdded support for building for tvOS
Matthew Leibowitz [Tue, 14 Mar 2017 20:22:32 +0000 (16:22 -0400)]
Added support for building for tvOS

This change is just to add support for building for tvOS.
It is exactly the same as iOS, just using a different SDK.

I had to change the two lines for libjpeg-turbo so that
it will run for both tvOS and iOS.

BUG=skia:

Change-Id: I6ae5fc4257df74c0f321e5d2d71584f6a52ec3a6
Reviewed-on: https://skia-review.googlesource.com/9660
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoFix uninitialized values in FuzzCanvas
Kevin Lubick [Tue, 14 Mar 2017 21:20:24 +0000 (17:20 -0400)]
Fix uninitialized values in FuzzCanvas

BUG=skia:

Change-Id: I45cb8a2d0695ec9a065ea9dd216e5d0220ad5a98
Reviewed-on: https://skia-review.googlesource.com/9690
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoAdd GrRenderTargetContext::resourceProvider & GrResourceProvider::caps
Robert Phillips [Tue, 14 Mar 2017 18:39:29 +0000 (14:39 -0400)]
Add GrRenderTargetContext::resourceProvider & GrResourceProvider::caps

and retract GrSurfaceContextPriv a bit

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

7 years agoCompute clipped draw bounds outside GrAppliedClip.
Brian Salomon [Tue, 14 Mar 2017 17:42:58 +0000 (13:42 -0400)]
Compute clipped draw bounds outside GrAppliedClip.

We will be storing GrAppliedClips alongside ops. The op already stores the
clipped bounds. If GrAppliedClip has draw bounds then as ops combine the
GrAppliedClip's bounds should be merged to be consistent. However, we won't
actually ever use those bounds again so it would be wasteful to merge them.

Change-Id: I4ef3010dc04761e256120a2e0e074bc3c6ff6ca1
Reviewed-on: https://skia-review.googlesource.com/9642
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
7 years agoRename remaining NUCs.
Ben Wagner [Tue, 14 Mar 2017 17:15:54 +0000 (13:15 -0400)]
Rename remaining NUCs.

Detailed naming introduced in https://skia-review.googlesource.com/c/8805/, https://skia-review.googlesource.com/c/9229/, and https://skia-review.googlesource.com/c/9483/.

NOTRY=true

Change-Id: I6f324c76e2ac8ddc2bb5d623b6d84530fda57774
Reviewed-on: https://skia-review.googlesource.com/9650
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoBegin implementation of SkImage_Base::makeColorSpace
Matt Sarett [Tue, 14 Mar 2017 18:10:48 +0000 (14:10 -0400)]
Begin implementation of SkImage_Base::makeColorSpace

Originally:
https://skia-review.googlesource.com/9622

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release,Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-Android

BUG=skia:

Change-Id: I7ef1daaab32892399e3333e4b2fc75d70a1900e4
Reviewed-on: https://skia-review.googlesource.com/9651
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agovertices to/from data
Mike Reed [Tue, 14 Mar 2017 18:10:54 +0000 (14:10 -0400)]
vertices to/from data

precursor to enabling serialization in pictures

BUG=skia:6366

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

7 years agoGeneraly Fixes to gpu bezier code
Greg Daniel [Tue, 14 Mar 2017 14:20:24 +0000 (10:20 -0400)]
Generaly Fixes to gpu bezier code

BUG=skia:

Change-Id: I2246aa0b2bc3327df42ca30d35020a4b878a819b
Reviewed-on: https://skia-review.googlesource.com/9555
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
7 years agoadd SkVertices::Builder
Mike Reed [Tue, 14 Mar 2017 16:04:16 +0000 (12:04 -0400)]
add SkVertices::Builder

Possible next iterations:
- remove another allocation use the SkData trick to share
  the object and its (trailing) data
- store a bit that tells use to free each pointer, allowing
  the builder to "adopt" some allocations instead of copy.

Larger idea:
- merge with drawPoints to have a single object for both.

BUG=skia:6366

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

7 years agoRevert "Begin implementation of SkImage_Base::makeColorSpace"
Mike Reed [Tue, 14 Mar 2017 16:42:05 +0000 (16:42 +0000)]
Revert "Begin implementation of SkImage_Base::makeColorSpace"

This reverts commit 98629efdde9236e444d7b3fa644eaab3a1301566.

Reason for revert: unittest failures
Failures:
../../../tests/ImageTest.cpp:1099 0x28 == SkGetPackedR32(*p3Bitmap.getAddr32(0, 0))
../../../tests/ImageTest.cpp:1100 0x40 == SkGetPackedG32(*p3Bitmap.getAddr32(0, 0))
../../../tests/ImageTest.cpp:1101 0x5E == SkGetPackedB32(*p3Bitmap.getAddr32(0, 0))

Original change's description:
> Begin implementation of SkImage_Base::makeColorSpace
>
> BUG=skia:
>
> Change-Id: Idf946faa64dad32a28070a430926a8225dbf6e5a
> Reviewed-on: https://skia-review.googlesource.com/9622
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
>

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

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

7 years agoExpose SkColorSpaceTransferFn inversion function
Brian Osman [Tue, 14 Mar 2017 15:27:13 +0000 (11:27 -0400)]
Expose SkColorSpaceTransferFn inversion function

Also adds tolerance to checks against zero

BUG=skia:

Change-Id: I2ad5737c6eef7e3ed52a685dceb347a434607336
Reviewed-on: https://skia-review.googlesource.com/9643
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoRemove unused SkBitmap::RLEPixels
Leon Scroggins III [Tue, 14 Mar 2017 15:17:17 +0000 (11:17 -0400)]
Remove unused SkBitmap::RLEPixels

TBR=reed@google.com

Change-Id: I14a75b7cad89aa7eb4b146a5d269856a4ad5d821
Reviewed-on: https://skia-review.googlesource.com/9646
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoAdd const to GrColorSpaceXform member arguments
Brian Osman [Tue, 14 Mar 2017 14:26:58 +0000 (10:26 -0400)]
Add const to GrColorSpaceXform member arguments

BUG=skia:

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

7 years agoUpdate Mesa drivers to 17.0.1
Kevin Lubick [Tue, 14 Mar 2017 13:18:00 +0000 (09:18 -0400)]
Update Mesa drivers to 17.0.1

BUG=skia:

Change-Id: I748f2122419145a9fb130a67e20ccaaa6bcc8983
Reviewed-on: https://skia-review.googlesource.com/9638
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoUse SkTArray for mailbox polling
Florin Malita [Tue, 14 Mar 2017 14:08:33 +0000 (10:08 -0400)]
Use SkTArray for mailbox polling

The mailbox uses SkTArray internally, so swapping is optimal when dest
has no preallocated storage.

Change-Id: Ic295f3707d07c97b1881e775cac3a23a6b2fef71
Reviewed-on: https://skia-review.googlesource.com/9641
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoBegin implementation of SkImage_Base::makeColorSpace
Matt Sarett [Tue, 14 Mar 2017 13:58:45 +0000 (09:58 -0400)]
Begin implementation of SkImage_Base::makeColorSpace

BUG=skia:

Change-Id: Idf946faa64dad32a28070a430926a8225dbf6e5a
Reviewed-on: https://skia-review.googlesource.com/9622
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoDocumentation: Consistancy
Hal Canary [Tue, 14 Mar 2017 14:03:51 +0000 (10:03 -0400)]
Documentation: Consistancy

  * Don't rely on '#!', since it doesn't work for Windows cmd shell.
  * Consistantly use `tools/git-sync-deps` rather than `bin/sync`.
  * Always call `bin/gn` ranther than `gn` in case depot_tools is
    missing from the path.

NOTRY=true
Change-Id: I27909f2610d1bb3241874399d7d2f7286f99f43b
Reviewed-on: https://skia-review.googlesource.com/9640
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoConsolidate Proxy caching code in GrResourceProvider
Robert Phillips [Tue, 14 Mar 2017 13:17:43 +0000 (09:17 -0400)]
Consolidate Proxy caching code in GrResourceProvider

This doesn't implement the GrSurfaceProxy-based caching but just carves out a space for it.

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

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

7 years agoPurge GrTextBlobCache entries on SkTextBlob deletion
Florin Malita [Mon, 13 Mar 2017 20:45:28 +0000 (16:45 -0400)]
Purge GrTextBlobCache entries on SkTextBlob deletion

Similar to the SkImage purge mechanism.

Change-Id: I0b7fb1bad507a3c7f30a4f7514bedd894d1748ac
Reviewed-on: https://skia-review.googlesource.com/9631
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoPreparatory Proxification
Robert Phillips [Tue, 14 Mar 2017 12:53:02 +0000 (08:53 -0400)]
Preparatory Proxification

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

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

7 years agoIncrease precision of equality checking for color space transfer fns
Matt Sarett [Mon, 13 Mar 2017 22:21:42 +0000 (18:21 -0400)]
Increase precision of equality checking for color space transfer fns

BUG=skia:

Change-Id: I7b921d34539c071e63a47fb7151dc1dcdaa08cb3
Reviewed-on: https://skia-review.googlesource.com/9636
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoMove GrSurfaceContext.h and GrTextureContext.h to src/gpu from include/gpu
Brian Salomon [Tue, 14 Mar 2017 13:05:05 +0000 (09:05 -0400)]
Move GrSurfaceContext.h and GrTextureContext.h to src/gpu from include/gpu

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

7 years agoRemove GrClipsStackClip member from SkGpuDevice
Brian Salomon [Mon, 13 Mar 2017 21:58:25 +0000 (17:58 -0400)]
Remove GrClipsStackClip member from SkGpuDevice

Change-Id: Ibfbfeda86e3d6a819bf198af5c36852744897fb8
Reviewed-on: https://skia-review.googlesource.com/9635
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
7 years agoRemove origin from GrClipStackClip and GrWindowRectsState.
Brian Salomon [Mon, 13 Mar 2017 21:57:28 +0000 (17:57 -0400)]
Remove origin from GrClipStackClip and GrWindowRectsState.

Change-Id: I993f426fee0f21cf1f529f58d242de3017253678
Reviewed-on: https://skia-review.googlesource.com/9623
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
7 years agoAdd GCN gen 2 bot (Radeon R9 M470X)
Ben Wagner [Mon, 13 Mar 2017 20:50:06 +0000 (16:50 -0400)]
Add GCN gen 2 bot (Radeon R9 M470X)

BUG=skia:6364
NOTRY=true

Change-Id: I4fda45c902eb95780c91a9c9a5d38740ec6f9137
Reviewed-on: https://skia-review.googlesource.com/9558
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
7 years agoDefault to no compression for CIPD assets and use depot_tools's CIPD exe
Kevin Lubick [Mon, 13 Mar 2017 19:31:47 +0000 (15:31 -0400)]
Default to no compression for CIPD assets and use depot_tools's CIPD exe

Using no compression can save up to a minute of overhead on the RPIs, for
a ~10% increase in file size to download, a great tradeoff.

This commit also regenerates svg and skimage to use no compression.
The next time RecreateSKPs is run, it will pick up the no-compression.

BUG=skia:

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

7 years agoremove legacy clipop flag for android
Mike Reed [Mon, 13 Mar 2017 19:31:31 +0000 (15:31 -0400)]
remove legacy clipop flag for android

BUG=skia:

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

7 years agoGrTessellator (AA): implement fast path for non-intersecting geometry.
Stephen White [Mon, 13 Mar 2017 19:10:13 +0000 (15:10 -0400)]
GrTessellator (AA): implement fast path for non-intersecting geometry.

In the common case, there are no intersections in the inner or outer
meshes generated for edge-AA. In that case, we don't have to build
connector edges, and we don't need to run the full simplify and
tessellate path on the full combined mesh. In order to maintain the
correspondence between inner and outer meshes, we can keep partner
pointers between inner and outer vertices instead.

So the new flow is:

- stroke the original boundaries to generate inner & outer meshes
- assign partner pointers to join inner & outer vertices
- build Edges only for Inner and Outer contours
- sort the two meshes independently
- do a complexity check on both meshes (simplified Bentley-Ottmann that
  just aborts on the first found intersection)
- if neither mesh is complex, use the fast path:
  - tessellate only the inner mesh
  - return the outer mesh, and use the partner pointers to generate
    the outer geometry triangles
- otherwise, use the complex path (as before):
  - connect the inner & outer partners with Connector Edges
  - merge the inner & outer meshes via sorted_merge()
  - simplify and tessellate the resulting complete mesh

On a 2012 Retina MBP (Intel), this yields:
Canvas Arcs +6%
Stroke Shapes +6%
Fill Shapes +15%

On a Z620 Ubuntu w/NVidia GTX 650:
Canvas Arcs: +5.0%
Stroke Shapes: +1.8%
Fill Shapes: +17.6%

Other changes:

- implemented VertexList::append(VertexList), for use by sorted_merge()
- renamed boundary_to_aa_mesh() to stroke_boundary(), and made it append
  inner & outer contours to inner & outer meshes
- the connect() loop at the bottom of stroke_boundary() now uses open
  VertexLists, since it can then append them easily to the inner & outer meshes
- sort_and_simplify() changed to sort_mesh(), with merging and simplification
  done explicitly by the callers
- sorted_merge() factored out of merge_sort(), for use when zipping together
  the inner and outer meshes

Change-Id: Ib00f9f12a375412eff35dd2bb78ccd787d9c37ce
Reviewed-on: https://skia-review.googlesource.com/9600
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoAdd GalaxyS7_G930FD bot
Ben Wagner [Mon, 13 Mar 2017 16:00:45 +0000 (12:00 -0400)]
Add GalaxyS7_G930FD bot

BUG=skia:6359
NOTRY=true

Change-Id: Ic1b8034c63fdc9890044cad34ea491ad40bd9ab5
Reviewed-on: https://skia-review.googlesource.com/9546
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Stephan Altmueller <stephana@google.com>
7 years agoMore SkCSXformCanvas work.
Mike Klein [Mon, 13 Mar 2017 16:56:34 +0000 (09:56 -0700)]
More SkCSXformCanvas work.

  - handle color arrays in drawPatch(), drawVertices(), drawAtlas()
  - color filters

Color filter support is a one-off for SkModeColorFilter.  I don't know
any other color filters that are parameterized by a color.  If there are
any/many, we may want to wire up something more comprehensive here.

Change-Id: Ibc89574e3a32d38af3bc2443a7d4bac0bb52d493
Reviewed-on: https://skia-review.googlesource.com/9601
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoAdd iOS simulator support in GN.
Mike Klein [Mon, 13 Mar 2017 16:25:33 +0000 (09:25 -0700)]
Add iOS simulator support in GN.

This builds fine on my laptop, but fails to link on the bots,
so I'm leaving out a new Build bot for now.

BUG=skia:6329

Change-Id: I4b33770f13ab9dec914d090b45d9921b19ee2c9d
Reviewed-on: https://skia-review.googlesource.com/9519
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoremove legacy flag
Mike Reed [Mon, 13 Mar 2017 16:49:57 +0000 (12:49 -0400)]
remove legacy flag

BUG=skia:

Change-Id: I030b85ef794d9098eeee7ac7c995a2b516218cfc
NOTRY=True
Reviewed-on: https://skia-review.googlesource.com/9620
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoAdd query to GrXPFactory about coverage-as-alpha optimization
Brian Salomon [Mon, 13 Mar 2017 14:36:40 +0000 (10:36 -0400)]
Add query to GrXPFactory about coverage-as-alpha optimization

This will be needed to have GrDrawOps that haven't yet built pipelines.

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

7 years agoRestore deferred GPU resources in Chrome
Robert Phillips [Mon, 13 Mar 2017 14:41:08 +0000 (10:41 -0400)]
Restore deferred GPU resources in Chrome

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

7 years agoSkColorSpaceXformCanvas
Mike Klein [Fri, 10 Mar 2017 14:55:51 +0000 (09:55 -0500)]
SkColorSpaceXformCanvas

TODO:
  images
  shaders
  color filters
  image filters
  a couple stray color arrays

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

7 years agouse AutoRestore instead of making a copy of the clipstack
Mike Reed [Fri, 10 Mar 2017 16:30:44 +0000 (11:30 -0500)]
use AutoRestore instead of making a copy of the clipstack

BUG=skia:

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

7 years agoRemove SK_SUPPORT_LEGACY_BROKEN_LERP support
Florin Malita [Mon, 13 Mar 2017 12:47:30 +0000 (08:47 -0400)]
Remove SK_SUPPORT_LEGACY_BROKEN_LERP support

Chromium change landed.

BUG=chromium:696216

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

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

7 years agoChanges to GrProcessorSet::FragmentProcessorAnalysis to prepare for deferred pipeline...
Brian Salomon [Mon, 13 Mar 2017 13:11:58 +0000 (09:11 -0400)]
Changes to GrProcessorSet::FragmentProcessorAnalysis to prepare for deferred pipeline creation.

This compacts the object so that it is more efficient for ops to store it.

It also adds a new constructor and query that will allow ops to use the analysis to also store the GrPaint's color.

This has the side effect of limiting the number of color processors on a GrProcessorSet to 64K which is just under 64K more than should ever be needed.

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

7 years agoTreat cross context images as Ganesh-created resources
Brian Osman [Mon, 13 Mar 2017 13:33:09 +0000 (09:33 -0400)]
Treat cross context images as Ganesh-created resources

Always create them budgeted, and register them with the cache (not as
wrapped resources).

Re-land (with fixes) of: https://skia-review.googlesource.com/9497

BUG=skia:

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

7 years agoFuzzCanvas: rename functions, cleanup
Hal Canary [Fri, 10 Mar 2017 18:56:08 +0000 (13:56 -0500)]
FuzzCanvas: rename functions, cleanup

Change-Id: I52c2da967f7a690d262d05e8f6a6c0242391d55a
Reviewed-on: https://skia-review.googlesource.com/9537
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoRemove run count field from SkTextBlob.
Florin Malita [Mon, 13 Mar 2017 13:03:24 +0000 (09:03 -0400)]
Remove run count field from SkTextBlob.

We can flag the last run record instead.  Run iteration is always
sequential, so no penalty.

As a side effect, we can no longer allow instantiation of zero-run text
blobs - but that seems like a good idea anyway.

Change-Id: I7ca80c4780623d5a188f92dfe6d6fe152f20f666
Reviewed-on: https://skia-review.googlesource.com/9149
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoRoll Recipe DEPS
Eric Boren [Mon, 13 Mar 2017 11:27:03 +0000 (07:27 -0400)]
Roll Recipe DEPS

BUG=skia:

Change-Id: Id8c90c6fb2e8f94713937b2e85666c76e96df2ed
Reviewed-on: https://skia-review.googlesource.com/9550
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoAdd SkSTArray move assignment operators
Florin Malita [Sun, 12 Mar 2017 14:40:13 +0000 (10:40 -0400)]
Add SkSTArray move assignment operators

Change-Id: Ib655a8a4d62c27dee4f92fcb644237f6fbbdb75b
Reviewed-on: https://skia-review.googlesource.com/9510
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
7 years agoUpdate SKP version
UpdateSKPs [Sun, 12 Mar 2017 06:54:57 +0000 (06:54 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

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

7 years agodisable assert until I can understand why it fails in cc_unittests
Mike Reed [Fri, 10 Mar 2017 21:35:25 +0000 (16:35 -0500)]
disable assert until I can understand why it fails in cc_unittests

BUG=skia:

Change-Id: I475b7b43e17f17f8f2a50e93ae0ce8a5b918b041
NOTRY=True
Reviewed-on: https://skia-review.googlesource.com/9547
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoAdd new test cases for Android shadow sample.
Jim Van Verth [Fri, 10 Mar 2017 19:34:51 +0000 (14:34 -0500)]
Add new test cases for Android shadow sample.

Adds examples of circular reveal and XY tilt.

BUG=skia:6119

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

7 years agoRevert "Treat cross context images as Ganesh-created resources"
Brian Osman [Fri, 10 Mar 2017 20:14:05 +0000 (20:14 +0000)]
Revert "Treat cross context images as Ganesh-created resources"

This reverts commit cccda60aca592d2320d79e2871e057778b2688ab.

Reason for revert: Android and Windows bot failures.

Original change's description:
> Treat cross context images as Ganesh-created resources
>
> Always create them budgeted, and register them with the cache (not as
> wrapped resources).
>
> BUG=skia:
>
> Change-Id: Id18ecf6e9e512db4be21b4f2bfd8e8c060bbe805
> Reviewed-on: https://skia-review.googlesource.com/9497
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

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

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

7 years agoFix SkFILEStream.
Ben Wagner [Fri, 10 Mar 2017 18:08:15 +0000 (13:08 -0500)]
Fix SkFILEStream.

Change-Id: I8c66e4e3e857227aed3d0bc497982f4c0d96d917
Reviewed-on: https://skia-review.googlesource.com/9498
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoCheck for bad bounds in picture cullbounds
Mike Reed [Fri, 10 Mar 2017 18:54:16 +0000 (13:54 -0500)]
Check for bad bounds in picture cullbounds

BUG=skia:

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

7 years agoTreat cross context images as Ganesh-created resources
Brian Osman [Fri, 10 Mar 2017 18:59:15 +0000 (13:59 -0500)]
Treat cross context images as Ganesh-created resources

Always create them budgeted, and register them with the cache (not as
wrapped resources).

BUG=skia:

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