platform/upstream/libSkiaSharp.git
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>
7 years agoRename GalaxyS7 to include model number.
Ben Wagner [Fri, 10 Mar 2017 17:45:18 +0000 (12:45 -0500)]
Rename GalaxyS7 to include model number.

We'll be adding GalaxyS7_G930FD soon.

NOTRY=true
BUG=skia:6359

Change-Id: I3235576957ea0c395c8d42ee09d5ee89946176d9
Reviewed-on: https://skia-review.googlesource.com/9091
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoRevert "Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw...
Florin Malita [Fri, 10 Mar 2017 18:02:29 +0000 (18:02 +0000)]
Revert "Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs""

This reverts commit 3304c447b953dad79fe7f355184ac13ed7e302e0.

Reason for revert: Fix for SkTHashMap issue landed

Original change's description:
> Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs"
>
> This reverts commit db3ceb86421fb9da86bb920e3a1f0957beec08d9.
>
> Reason for revert: observing some strange budget behavior w/ instrumented Chromium builds;  need to investigate.
>
> Original change's description:
> > Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs
> >
> > Refactor to store sk_sps, and minimize explicit ref manipulation.
> >
> > Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6
> > Reviewed-on: https://skia-review.googlesource.com/9490
> > Commit-Queue: Florin Malita <fmalita@chromium.org>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> >
>
> TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I8ca9862ad1519a9ec69ad1ce8e4d129b0dae7b0a
> Reviewed-on: https://skia-review.googlesource.com/9524
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>
>

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

Change-Id: I1ba50e3b574381717fbbf46b829d72aceff8f7fe
Reviewed-on: https://skia-review.googlesource.com/9535
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoFix SkTHashTable dangling values
Florin Malita [Fri, 10 Mar 2017 16:51:07 +0000 (11:51 -0500)]
Fix SkTHashTable dangling values

The element rearrange logic in SkTHashTable::remove() marks empty slots
as such, but does not reset their value.

When breaking out of the rearrange loop, we must also reset the last empty
slot value to avoid retaining unwanted copies.

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

7 years agore-guard against negative dimensions on no-draw canvas
Mike Reed [Fri, 10 Mar 2017 15:49:45 +0000 (10:49 -0500)]
re-guard against negative dimensions on no-draw canvas

We used to (incidentally) guard for this when we used bitmapdevice as our backnig.
Now that we have a (faster) nodrawdevice, we need to explicitly guard for it.

BUG=skia:

Change-Id: I9cbbf064cbfced78f0004a2e5aff60aa3ded6215
Reviewed-on: https://skia-review.googlesource.com/9530
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoput sksl->glsl modifiers in correct order
Ethan Nicholas [Thu, 9 Mar 2017 21:35:09 +0000 (16:35 -0500)]
put sksl->glsl modifiers in correct order

BUG=skia:6352

Change-Id: I7cdf6fa9c5b48fd2686c5cfc28c594bd291feea5
Reviewed-on: https://skia-review.googlesource.com/9520
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoRemove ownership aruments from render target wrap functions
Brian Osman [Fri, 10 Mar 2017 13:30:22 +0000 (08:30 -0500)]
Remove ownership aruments from render target wrap functions

We never adopt render targets (just borrow them).

BUG=skia:

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

7 years agoPartially defer SkImage_Gpu
Robert Phillips [Thu, 9 Mar 2017 21:36:32 +0000 (16:36 -0500)]
Partially defer SkImage_Gpu

One of SkImageCacherator, GrBitmapTextureMaker, GrImageTextureMaker, GrTextureAdjuster, GrTextureProducer or SkImage has to take the first step. This is probably the least odd of the options.

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

7 years agoFuzzCanvas: fuzz_enum_range template
Hal Canary [Fri, 10 Mar 2017 13:48:28 +0000 (08:48 -0500)]
FuzzCanvas: fuzz_enum_range template

Change-Id: Ida7c9f88066fb929d9ccf2f664091b194d22d848
Reviewed-on: https://skia-review.googlesource.com/9527
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoincrease Builder's prealloc size after colorspace change
Mike Reed [Fri, 10 Mar 2017 00:52:32 +0000 (19:52 -0500)]
increase Builder's prealloc size after colorspace change

BUG=skia:

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

7 years agoclipstacks can be on the stack or embedded, therefore should not be ref-counted
Mike Reed [Fri, 10 Mar 2017 05:21:52 +0000 (00:21 -0500)]
clipstacks can be on the stack or embedded, therefore should not be ref-counted

BUG=skia:

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

7 years agoClients can provide preallocated storage to clipstack
Mike Reed [Fri, 10 Mar 2017 04:56:25 +0000 (23:56 -0500)]
Clients can provide preallocated storage to clipstack

This allows devices (gpu, pdf) which are themselves always dynamically allocated
(since they are reference counted) to provide storage to clipstack, allowing it
to avoid calls to malloc.

Previously this was attempted by embedding the storage directly in clipstack,
but that increased the size of clipstack in all instances, even those where
it might be on the stack. This can be problematic for small-stack environments
like servers.

See previous (reverted) CL: https://skia-review.googlesource.com/c/9522/

BUG=skia:

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

7 years agoFuzzCanvas: SkVertices
Hal Canary [Thu, 9 Mar 2017 19:10:36 +0000 (14:10 -0500)]
FuzzCanvas: SkVertices

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

7 years ago[recipes.cfg] manually roll recipes to get skia recipe roller unstuck.
Robert Iannucci [Thu, 9 Mar 2017 22:43:50 +0000 (14:43 -0800)]
[recipes.cfg] manually roll recipes to get skia recipe roller unstuck.

This rolls the engine past the bad revision which was the cause of the
mentioned bug (22e413ad35481ecd49d232620e7794ce6f544958).

No expectation changes.

BUG=chromium:699379
R=borenet@google.com

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

7 years agoRevert "prealloc room for some number of Elements to avoid malloc"
Mike Reed [Fri, 10 Mar 2017 02:51:59 +0000 (02:51 +0000)]
Revert "prealloc room for some number of Elements to avoid malloc"

This reverts commit 94cbbba96f1a2a425663e631c09591023f2e48d7.

Reason for revert: exceeded stack-size on g3 (in SkPDFDevice.cpp:1552

Original change's description:
> prealloc room for some number of Elements to avoid malloc
>
> I chose 16, as in my test case from android, the depth was
> at least 9. Possibly we could make it even smaller if our
> underlying impl (SkDeque) would never prune its allocations,
> so that we don't malloc repeatedly if we save/restore/save/restore
> across the boundary of the first/nth chunk...
>
> BUG=skia:
>
> Change-Id: Id3f0b900b1931f713f80a664f2b4b142f264be8d
> Reviewed-on: https://skia-review.googlesource.com/9522
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

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

7 years agoprealloc room for some number of Elements to avoid malloc
Mike Reed [Thu, 9 Mar 2017 21:39:41 +0000 (16:39 -0500)]
prealloc room for some number of Elements to avoid malloc

I chose 16, as in my test case from android, the depth was
at least 9. Possibly we could make it even smaller if our
underlying impl (SkDeque) would never prune its allocations,
so that we don't malloc repeatedly if we save/restore/save/restore
across the boundary of the first/nth chunk...

BUG=skia:

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

7 years agoRevert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs"
Florin Malita [Thu, 9 Mar 2017 22:42:58 +0000 (22:42 +0000)]
Revert "Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs"

This reverts commit db3ceb86421fb9da86bb920e3a1f0957beec08d9.

Reason for revert: observing some strange budget behavior w/ instrumented Chromium builds;  need to investigate.

Original change's description:
> Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs
>
> Refactor to store sk_sps, and minimize explicit ref manipulation.
>
> Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6
> Reviewed-on: https://skia-review.googlesource.com/9490
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

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

Change-Id: I8ca9862ad1519a9ec69ad1ce8e4d129b0dae7b0a
Reviewed-on: https://skia-review.googlesource.com/9524
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>

7 years agoFuzzCanvas: ImageFilter
Hal Canary [Thu, 9 Mar 2017 16:33:35 +0000 (11:33 -0500)]
FuzzCanvas: ImageFilter

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

7 years agotake fast case in swap() if we're using malloc OR we're empty
Mike Reed [Thu, 9 Mar 2017 21:36:26 +0000 (16:36 -0500)]
take fast case in swap() if we're using malloc OR we're empty

This avoids taking the (more expensive) copy case when we don't need to.
The old behavior only took this fast case if we were "actively" using
a dynamically allocated array.

BUG=skia:

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

7 years agoMark function used as template parameter extern.
Ben Wagner [Thu, 9 Mar 2017 20:12:09 +0000 (15:12 -0500)]
Mark function used as template parameter extern.

VC++19.10.2517 does not support the C++11 change to allow the address of
internal linkage objects to be used as non-type template arguments.

BUG=skia:6351

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

7 years agoHold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs
Florin Malita [Thu, 9 Mar 2017 19:21:44 +0000 (14:21 -0500)]
Hold sk_sp<GrAtlasTextBlob> refs in GrTextBlobCache instead of raw ptrs

Refactor to store sk_sps, and minimize explicit ref manipulation.

Change-Id: Ie3d18e5fe1cefbbc5c2f3c4941287a24038522a6
Reviewed-on: https://skia-review.googlesource.com/9490
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoRemove more unused ownership arguments
Brian Osman [Thu, 9 Mar 2017 19:19:20 +0000 (14:19 -0500)]
Remove more unused ownership arguments

Technically, we only ever pass kAdopt along one specific code path, but
the remaining functions that have it are at least all similar. This was
another outlier that seems unlikely to ever benefit.

BUG=skia:

Change-Id: If9a1275a2a0b83417225660f5e18c2133681830a
Reviewed-on: https://skia-review.googlesource.com/9494
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoAdd IntelBayTrail jobs
Kevin Lubick [Thu, 9 Mar 2017 15:24:18 +0000 (10:24 -0500)]
Add IntelBayTrail jobs

BUG=skia:6344
NOTRY=true

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

7 years agoAdd a separate draw function to GrRenderTargetContext for GrMeshDrawOp derived classes.
Brian Salomon [Thu, 9 Mar 2017 18:50:43 +0000 (13:50 -0500)]
Add a separate draw function to GrRenderTargetContext for GrMeshDrawOp derived classes.

The first phase of deferring GrPipeline creation until flush will apply only to GrDrawOp subclasses that do not derive from GrMeshDrawOp. This change prepares for that by creating separate draw functions on GrRenderTargetContext for GrMeshDrawOp-derived ops. This is temporary and will incrementally be undone as pipeline-creation deferral rolls out to the GrMeshDrawOps in a later phase of this work.

Change-Id: I0f5b71fe913f3273cfe9e965f7d8bbe7f01ad0ef
Reviewed-on: https://skia-review.googlesource.com/9481
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRemove unused ownership argument to GrSurfaceProxy::MakeWrappedBackend
Brian Osman [Thu, 9 Mar 2017 18:39:02 +0000 (13:39 -0500)]
Remove unused ownership argument to GrSurfaceProxy::MakeWrappedBackend

This is the last public reference to GrWrapOwnership, so removal paves
the way for moving it to somewhere internal.

BUG=skia:

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

7 years agoFix SkTArray copy construction
Florin Malita [Thu, 9 Mar 2017 18:34:09 +0000 (13:34 -0500)]
Fix SkTArray copy construction

We can't use memcpy for copy construction, even when MEM_COPY == true.

Change-Id: I50eb369f0fbf77e8f0ad5a148c67d46df0d3ab0e
Reviewed-on: https://skia-review.googlesource.com/9487
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
7 years agoSkSTArray move ctor
Florin Malita [Thu, 9 Mar 2017 17:17:15 +0000 (12:17 -0500)]
SkSTArray move ctor

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

7 years agoAdd tolerance to quadratic and linear cubic detection
csmartdalton [Wed, 8 Mar 2017 23:10:45 +0000 (16:10 -0700)]
Add tolerance to quadratic and linear cubic detection

Otherwise these can be misclassified as cusps since there is already
tolerance in the discriminant test.

BUG=skia:

Change-Id: Id02c12f671714cebf799953ebed5335ee4c4d52a
Reviewed-on: https://skia-review.googlesource.com/9355
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agoAdd GrSemaphoreOp to support deferred semaphore use
Greg Daniel [Thu, 9 Mar 2017 15:41:31 +0000 (10:41 -0500)]
Add GrSemaphoreOp to support deferred semaphore use

This is a precursor to adding support for external drawable ops.

BUG=skia:

Change-Id: I3e8b06b4cbe2b5728b7911c22ee74a93d0813f98
Reviewed-on: https://skia-review.googlesource.com/9452
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoDisable image tests on NexusPlayer Vulkan
Greg Daniel [Thu, 9 Mar 2017 15:30:31 +0000 (10:30 -0500)]
Disable image tests on NexusPlayer Vulkan

BUG=skia:6223

Change-Id: I39b4107e7e267ef6f465b1dae13c9dfe3c6990f6
Reviewed-on: https://skia-review.googlesource.com/9484
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoFuzzCanvas: TextBlob RSXform SkMaskFilter SkPathEffect
Hal Canary [Wed, 8 Mar 2017 21:52:18 +0000 (16:52 -0500)]
FuzzCanvas: TextBlob RSXform SkMaskFilter SkPathEffect

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

7 years agomake GrPaint.h private -- IWYU
Mike Reed [Thu, 9 Mar 2017 03:21:00 +0000 (22:21 -0500)]
make GrPaint.h private -- IWYU

prerequisit: https://codereview.chromium.org/2743533002/

BUG=skia:

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

7 years agomove intermediate patheffect classes inside src
Mike Reed [Thu, 9 Mar 2017 12:51:09 +0000 (07:51 -0500)]
move intermediate patheffect classes inside src

BUG=skia:

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

7 years agoMake GrClip.h private
Brian Salomon [Thu, 9 Mar 2017 14:03:58 +0000 (09:03 -0500)]
Make GrClip.h private

BUG=skia:

Change-Id: I4aa3c2707811ece3a63d161035e316c3bbc1cd15
Reviewed-on: https://skia-review.googlesource.com/9482
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agolimit addEndMoveSpans loop in pathops
Cary Clark [Wed, 8 Mar 2017 22:11:12 +0000 (17:11 -0500)]
limit addEndMoveSpans loop in pathops

Prevent addEndMoveSpans from looping
forever and abort with an error
if the loop count is crazy big.

R=kjlubick@google.com
BUG=684553

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

7 years agoOptimize mipmap downsample_2_2 in sRGB mode
Matt Sarett [Wed, 8 Mar 2017 21:30:18 +0000 (16:30 -0500)]
Optimize mipmap downsample_2_2 in sRGB mode

Reland of:
https://skia-review.googlesource.com/c/9386/

Desktop (HP z620)
Before:
mipmap_build_2048x2048_0_gamma 10.5 ms
mipmap_build_2048x2048_1_gamma 77.1 ms
After:
mipmap_build_2048x2048_0_gamma 10.5 ms
mipmap_build_2048x2048_1_gamma 41.0 ms

Pixel XL
Before:
mipmap_build_2048x2048_0_gamma 160 ms
mipmap_build_2048x2048_1_gamma 1.5 s
After:
mipmap_build_2048x2048_0_gamma 160 ms
mipmap_build_2048x2048_1_gamma 570 ms

Also provides marginal performance improvements
for other sRGB downsamples.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind_PreAbandonGpuContext

BUG=skia:

Change-Id: Ia82fc2ef795e1bb63a4a9deac5e38f5fde39f651
Reviewed-on: https://skia-review.googlesource.com/9455
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoAdded MSAA selection to viewer GUI
Brian Osman [Wed, 8 Mar 2017 22:10:24 +0000 (17:10 -0500)]
Added MSAA selection to viewer GUI

On Windows, we need to reconstruct the window to allow setting a new
pixel format with a different sample count.

Added some code that maintains window size/position across these changes.
Previously, just cycling through backends would cause the window to move,
as the "default" position would cycle across the screen. Now it's pinned.

BUG=skia:

Change-Id: Iecbe7a490577382043ffe5a88c910b4c0be2ed5c
Reviewed-on: https://skia-review.googlesource.com/9085
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoSwitch GrYUVProvider over to GrTextureProxies
Robert Phillips [Wed, 8 Mar 2017 19:32:55 +0000 (14:32 -0500)]
Switch GrYUVProvider over to GrTextureProxies

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

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

7 years agoAdd SkImage_Base::onMakeColorSpace() stub
Matt Sarett [Wed, 8 Mar 2017 20:26:29 +0000 (15:26 -0500)]
Add SkImage_Base::onMakeColorSpace() stub

BUG=skia:

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

7 years agoRevert "remove SkClipVisitor"
Mike Reed [Wed, 8 Mar 2017 21:42:37 +0000 (21:42 +0000)]
Revert "remove SkClipVisitor"

This reverts commit 91b961d33d1d3e78c212be8738c1c7c468c358ca.

Reason for revert: need to update caller in android

Original change's description:
> remove SkClipVisitor
>
> With new device clipping, this is unsupported on SkCanvas
>
> BUG=skia:
>
> Change-Id: I39443f213be1005b8b9208d604e4bfb31cbda424
> Reviewed-on: https://skia-review.googlesource.com/9349
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>

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

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

7 years agoMaintain window position and size when re-created
Brian Osman [Wed, 8 Mar 2017 20:36:30 +0000 (15:36 -0500)]
Maintain window position and size when re-created

Eliminates a UI oddity on Windows when cycling through backends.

BUG=skia:

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

7 years agoMake SkGr.h private and remove unused functions
Brian Osman [Tue, 7 Mar 2017 21:58:08 +0000 (16:58 -0500)]
Make SkGr.h private and remove unused functions

BUG=skia:

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

7 years agoAdd instanced rendering command line flag to viewer.
Brian Salomon [Wed, 8 Mar 2017 19:03:56 +0000 (14:03 -0500)]
Add instanced rendering command line flag to viewer.

Previously this could only be turned on at runtime.

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

7 years agoRemove SkChunckAlloc
Herb Derby [Mon, 6 Mar 2017 22:18:47 +0000 (17:18 -0500)]
Remove SkChunckAlloc

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