platform/upstream/libSkiaSharp.git
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>

7 years agoUse Fibonacci instead of 2^n for block growth.
Herb Derby [Wed, 8 Mar 2017 19:17:49 +0000 (14:17 -0500)]
Use Fibonacci instead of 2^n for block growth.

Chrome on android showed an increase of 5% memory use when 2^n block
growth was introduced. Use Fibonacci instead.

BUG=chromium:699130

Change-Id: I228d66385c63d487e72db46356f44e9efb5fa0f3
Reviewed-on: https://skia-review.googlesource.com/9447
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoremove SkClipVisitor
Mike Reed [Wed, 8 Mar 2017 19:15:50 +0000 (14:15 -0500)]
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>
7 years agoRevert "Optimize mipmap downsample_2_2 in sRGB mode"
Derek Sollenberger [Wed, 8 Mar 2017 19:45:33 +0000 (19:45 +0000)]
Revert "Optimize mipmap downsample_2_2 in sRGB mode"

This reverts commit 3ea01f72f20d4f58bf0dcd420fa5c2724b67ac8d.

Reason for revert: triggering errors on the MSAN bots

Original change's description:
> Optimize mipmap downsample_2_2 in sRGB mode
>
> 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 25.1 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 313 ms
>
> Also provides marginal performance improvements
> for other sRGB downsamples.
>
> BUG=skia:
>
> Change-Id: Icfcd2ccd69676ccf3822db8042a4698e4464bb71
> Reviewed-on: https://skia-review.googlesource.com/9386
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
>

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

Change-Id: I06907fb1691077a03daadc0980e86393bc08d9c5
Reviewed-on: https://skia-review.googlesource.com/9450
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>

7 years agoremove SkPictureUtils.h
Mike Reed [Wed, 8 Mar 2017 15:39:02 +0000 (10:39 -0500)]
remove SkPictureUtils.h

BUG=skia:

Change-Id: Iab6e71f347fa34baf442e38ba7773058695f3e6d
Reviewed-on: https://skia-review.googlesource.com/9348
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agoAdd jobs for building for Chromecast
Kevin Lubick [Wed, 8 Mar 2017 19:01:01 +0000 (14:01 -0500)]
Add jobs for building for Chromecast

BUG=skia:6345

Change-Id: Iaf09eb7f57ae71687c6804221837a8cc8ef04931
Reviewed-on: https://skia-review.googlesource.com/9419
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
7 years agoRevert "Fix SkJumper gcc warning"
Mike Klein [Wed, 8 Mar 2017 19:10:44 +0000 (19:10 +0000)]
Revert "Fix SkJumper gcc warning"

This reverts commit e353e81a6fdf401310e0643280ec34d9de0019a3.

Reason for revert: crashing

Original change's description:
> Fix SkJumper gcc warning
>
> TBR=mtklein@google.com
>
> Change-Id: I1c3201307a1cd74a441d63d505882dc5535e150e
> Reviewed-on: https://skia-review.googlesource.com/9416
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
>

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

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

7 years agoclip to elements directly, no need for replay indirection
Mike Reed [Wed, 8 Mar 2017 18:13:44 +0000 (13:13 -0500)]
clip to elements directly, no need for replay indirection

allows us to remove SkCanvas::replayClips in future CL

BUG=skia:

Change-Id: I20c3700c8a331b4988fc1332702ff0e0565e94bc
Reviewed-on: https://skia-review.googlesource.com/9417
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoRevert "Turn on SkJumper all the time."
Mike Klein [Wed, 8 Mar 2017 18:54:25 +0000 (18:54 +0000)]
Revert "Turn on SkJumper all the time."

This reverts commit 135555101cbde68656f028c41506113374a4026f.

Reason for revert: forgot g3, seems to break Chrome NaCl builders?

https://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Win/builds/15969/steps/compile/logs/stdio

Original change's description:
> Turn on SkJumper all the time.
>
> If the previous CL sticks, it's now easy to turn on SkJumper everywhere:
> I was mostly holding back because of build system complexity.
>
> This has the main effect of turning on SkJumper in Chromium.
> It's already been on on our local test bots and on Android framework.
>
> Change-Id: I7fbfc6aaaa7dace9c3f2cb509583c69b10997dbf
> Reviewed-on: https://skia-review.googlesource.com/9380
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>

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

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

7 years agoRefactor GrColorSpaceXformHelper
Brian Osman [Wed, 8 Mar 2017 16:42:02 +0000 (11:42 -0500)]
Refactor GrColorSpaceXformHelper

Nonlinear blending mode is going to (sometimes) require additional
uniforms and shader code for color space transformation.

This change just alters the usage of the helper struct so that we can
hide any new logic (without having to change all the FPs that use it).

BUG=skia:

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

7 years agoFix SkJumper gcc warning
Florin Malita [Wed, 8 Mar 2017 18:07:51 +0000 (13:07 -0500)]
Fix SkJumper gcc warning

TBR=mtklein@google.com

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

7 years agoAdd a unique ID to GrOpLists and return it from GrRenderTargetContext::addDrawOp
Robert Phillips [Wed, 8 Mar 2017 16:50:55 +0000 (11:50 -0500)]
Add a unique ID to GrOpLists and return it from GrRenderTargetContext::addDrawOp

This is to support the preFlush callbacks

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

7 years agoMake GPU dm sink correctly advertise whether it is multisampled
Brian Salomon [Wed, 8 Mar 2017 16:38:45 +0000 (11:38 -0500)]
Make GPU dm sink correctly advertise whether it is multisampled

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

7 years agoAdd gm to compare premuls in dst vs. src color space
Matt Sarett [Wed, 8 Mar 2017 16:31:06 +0000 (11:31 -0500)]
Add gm to compare premuls in dst vs. src color space

BUG=skia:

Change-Id: I36755f4bbc405a8af12990573e1f554df012b30a
Reviewed-on: https://skia-review.googlesource.com/9402
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agospecial device for not drawing -- performs no clipping
Mike Reed [Wed, 8 Mar 2017 16:29:33 +0000 (11:29 -0500)]
special device for not drawing -- performs no clipping

Running nanobench clip_overhead_recording_lite

Before : 240us
After  : 177us

BUG=skia:6214

Change-Id: I9ae6f9170c151798ffdc6c584a48b08cc7705d6b
Reviewed-on: https://skia-review.googlesource.com/9409
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
7 years agobin/fetch-clang-format
Hal Canary [Wed, 8 Mar 2017 15:54:09 +0000 (10:54 -0500)]
bin/fetch-clang-format

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

7 years agoformatting change: FuzzCanvas.cpp
Hal Canary [Wed, 8 Mar 2017 16:02:40 +0000 (11:02 -0500)]
formatting change: FuzzCanvas.cpp

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

7 years agoDW last resort font default name not necessary.
Ben Wagner [Wed, 8 Mar 2017 15:36:31 +0000 (10:36 -0500)]
DW last resort font default name not necessary.

Currently in SkFontMgr_DirectWrite when trying to find some last resort
font SystemParametersInfoW failing is considered a fatal error and so
onLegacyCreateTypeface will return nullptr. Instead, treat failure of
getDefaultFontFamily as ignorable and continue to the default default.

BUG=chromium:697672

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

7 years agoSkPDF: Always get advances at unitsPerEm.
Hal Canary [Mon, 6 Mar 2017 21:18:49 +0000 (16:18 -0500)]
SkPDF: Always get advances at unitsPerEm.

  * Work around BUG=chromium:696356
  * SkTestScalerContext needs a return a em-size.
  * SkPDFFont::MakeVectorCache which always produces a glyph
    cache at emsize.  Replaces vector_cache().
  * Stop looking at fLastGlyphID and fEmSize in TypefaceMetrics.

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

7 years agoRemove SK_SUPPORT_LEGACY_AAA flag as chromium now turns it off
Yuqian Li [Mon, 6 Mar 2017 22:04:58 +0000 (17:04 -0500)]
Remove SK_SUPPORT_LEGACY_AAA flag as chromium now turns it off

BUG=skia:

Change-Id: I3b385b8aeab08f402f4471637bf641cd456c8c56
Reviewed-on: https://skia-review.googlesource.com/9327
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>

7 years agoUse glXCreateContextAttribsARB in viewer to make it easier to attach RenderDoc.
Brian Salomon [Wed, 8 Mar 2017 15:50:21 +0000 (10:50 -0500)]
Use glXCreateContextAttribsARB in viewer to make it easier to attach RenderDoc.

Change-Id: I0cc82fe826b81a082b579f60af3d9ef35d5fe351
Reviewed-on: https://skia-review.googlesource.com/9407
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoRename not-fBlendCorrectly to fNonLinearBlending
Matt Sarett [Wed, 8 Mar 2017 15:22:41 +0000 (10:22 -0500)]
Rename not-fBlendCorrectly to fNonLinearBlending

No policy or behavior changes here, just a rename.

BUG=skia:

Change-Id: Ieefa5c5bbd40f25d4fef81f07b50b4057ea732b4
Reviewed-on: https://skia-review.googlesource.com/9406
Commit-Queue: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoOptimize mipmap downsample_2_2 in sRGB mode
Matt Sarett [Wed, 8 Mar 2017 14:53:41 +0000 (09:53 -0500)]
Optimize mipmap downsample_2_2 in sRGB mode

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 25.1 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 313 ms

Also provides marginal performance improvements
for other sRGB downsamples.

BUG=skia:

Change-Id: Icfcd2ccd69676ccf3822db8042a4698e4464bb71
Reviewed-on: https://skia-review.googlesource.com/9386
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoTurn on SkJumper all the time.
Mike Klein [Tue, 7 Mar 2017 15:04:05 +0000 (10:04 -0500)]
Turn on SkJumper all the time.

If the previous CL sticks, it's now easy to turn on SkJumper everywhere:
I was mostly holding back because of build system complexity.

This has the main effect of turning on SkJumper in Chromium.
It's already been on on our local test bots and on Android framework.

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

7 years agoRefactor GrTextBlobCache
Florin Malita [Tue, 7 Mar 2017 21:51:57 +0000 (16:51 -0500)]
Refactor GrTextBlobCache

Instead of a single-level cache with blob-id-derived key, refactor GrTextBlobCache
as a two-level cache with a direct blob-id key (to support efficient lookup by id in
future CLs).

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

7 years agoAdd GalaxyS6 bot.
Ben Wagner [Tue, 7 Mar 2017 21:41:43 +0000 (16:41 -0500)]
Add GalaxyS6 bot.

BUG=skia:6337
NOTRY=true

Change-Id: Ibddd57c461d3a1ce62245487dfc0e4eeeba1978a
Reviewed-on: https://skia-review.googlesource.com/9397
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
7 years agoFuzzCanvas: SkColorFilter
Hal Canary [Tue, 7 Mar 2017 21:23:20 +0000 (16:23 -0500)]
FuzzCanvas: SkColorFilter

  * Also fix SkRRect generation to only make valid RRs.a
  * drawDRRect only draws if outer contains inner.
  * Also fix SkComposeColorFilter::toString

Change-Id: Ia75da2813555b7714663929d0ec288ae2a86d9f1
Reviewed-on: https://skia-review.googlesource.com/9399
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoFuzz Canvas: Remember that nextRange is inclusive.
Hal Canary [Tue, 7 Mar 2017 20:06:29 +0000 (15:06 -0500)]
Fuzz Canvas: Remember that nextRange is inclusive.

BUG=skia:6336
Change-Id: I5ca005f8bf821d5a6f153c3df80d4c7309519cba
Reviewed-on: https://skia-review.googlesource.com/9395
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoAdd viewer GUI options for desktop and Android to toggle instanced rendering.
Brian Salomon [Tue, 7 Mar 2017 20:16:34 +0000 (15:16 -0500)]
Add viewer GUI options for desktop and Android to toggle instanced rendering.

BUG=skia:

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

7 years agooptimize intersect, use getType to utilize fast-case in preTranslate
Mike Reed [Tue, 7 Mar 2017 19:55:37 +0000 (14:55 -0500)]
optimize intersect, use getType to utilize fast-case in preTranslate

10-15% speed up in clip_record_overhead bench

Comparing the raw fType field was missing the (maybe deprecatable) IsRectToRect
bit (0x10), which is set for identity and translate matrices, so we were
never taking the fast case.

BUG=skia:

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