platform/upstream/libSkiaSharp.git
7 years agoFix -Wshadow-field warnings
Brian Salomon [Tue, 28 Feb 2017 21:11:04 +0000 (16:11 -0500)]
Fix -Wshadow-field warnings

BUG=skia:

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

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

BUG=skia:

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

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

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

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

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

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

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

BUG=skia:

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

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

BUG=skia:

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

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

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

BUG=skia:

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

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

BUG=skia:

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

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

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

BUG=skia:

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

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

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

This is split out of:

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

and is a reland of:

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

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

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

This reverts commit 3c322e23a013e78fcbe0edd7adccd580af8466bc.

Reason for revert: crash in SkCpu on Mac

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

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

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

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

BUG=chromium:688671

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

R=halcanary@google.com

BUG=skia:6291

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

BUG=chromium:682918

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

7 years agoAdd AVX-512 detection to SkCpu
Mike Klein [Tue, 28 Feb 2017 14:35:03 +0000 (14:35 +0000)]
Add AVX-512 detection to SkCpu

I've added a SKY alias for the five new bits detected on a Skylake Xeon.

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

7 years agoAdd another null check for the Vk NexusPlayer bot
Brian Osman [Tue, 28 Feb 2017 15:05:43 +0000 (10:05 -0500)]
Add another null check for the Vk NexusPlayer bot

That bot has flaky failures creating contexts, and it consistently fails
this test. It probably can't create two contexts at the same time.

BUG=skia:

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

7 years agoRevert "Allow GrSurfaceProxy-derived classes to use flags when instantiating"
Robert Phillips [Tue, 28 Feb 2017 15:05:52 +0000 (15:05 +0000)]
Revert "Allow GrSurfaceProxy-derived classes to use flags when instantiating"

This reverts commit c8f1e3a5c08d58657dddccdeedbe5d6e8c16d891.

Reason for revert: check on ANGLE failure
Original change's description:
> Allow GrSurfaceProxy-derived classes to use flags when instantiating
>
> In some instances proxies must be created that, when instantiated, have no pending IO.
>
> This is split out of: (Add per-Flush callback to GrDrawingManager)
>
> https://skia-review.googlesource.com/c/8679/
>
> Change-Id: I68b5504d35ad436a4ae737ac4bb3c171fc9a5826
> Reviewed-on: https://skia-review.googlesource.com/8988
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>

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

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

7 years agoGrTessellator: take sweep_gt out behind the woodshed.
Stephen White [Mon, 27 Feb 2017 16:37:55 +0000 (11:37 -0500)]
GrTessellator: take sweep_gt out behind the woodshed.

No need for it, since sweep_gt(a, b) == sweep_lt(b, a).

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

7 years agoRevert "Allow distance field path renderer to store bitmaps at low resolutions"
Cary Clark [Tue, 28 Feb 2017 13:59:54 +0000 (13:59 +0000)]
Revert "Allow distance field path renderer to store bitmaps at low resolutions"

This reverts commit c0bc1bb8690e5ce489394112b0cf4fe4601c1f2c.

Reason for revert: broke build with SkTDynamicHash error

Original change's description:
> Allow distance field path renderer to store bitmaps at low resolutions
>
> BUG=chromium:682918
>
> Change-Id: I1a0608f7e6394ab05eebc4b78fb7087ca718f617
> Reviewed-on: https://skia-review.googlesource.com/8971
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:682918

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

7 years agoAllow GrSurfaceProxy-derived classes to use flags when instantiating
Robert Phillips [Mon, 27 Feb 2017 16:39:51 +0000 (11:39 -0500)]
Allow GrSurfaceProxy-derived classes to use flags when instantiating

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

This is split out of: (Add per-Flush callback to GrDrawingManager)

https://skia-review.googlesource.com/c/8679/

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

7 years agoRemove unused Skia OWNERS files
Ravi Mistry [Tue, 28 Feb 2017 13:25:45 +0000 (08:25 -0500)]
Remove unused Skia OWNERS files

Context is in https://bugs.chromium.org/p/skia/issues/detail?id=6285

NOTRY=true
BUG=skia:6285

Change-Id: I4d03f7c76acfcf3463e7895f58889a3d1b0e96fb
Reviewed-on: https://skia-review.googlesource.com/9061
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
7 years agoAllow distance field path renderer to store bitmaps at low resolutions
Jim Van Verth [Mon, 27 Feb 2017 23:21:16 +0000 (18:21 -0500)]
Allow distance field path renderer to store bitmaps at low resolutions

BUG=chromium:682918

Change-Id: I1a0608f7e6394ab05eebc4b78fb7087ca718f617
Reviewed-on: https://skia-review.googlesource.com/8971
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoFix stack-overflow in FuzzCanvas
Kevin Lubick [Mon, 27 Feb 2017 21:45:32 +0000 (16:45 -0500)]
Fix stack-overflow in FuzzCanvas

BUG=skia:

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

7 years agoMove armv7 CPU tests to Nexus 10.
Ben Wagner [Mon, 27 Feb 2017 20:41:17 +0000 (15:41 -0500)]
Move armv7 CPU tests to Nexus 10.

The Android Ones are slow and there aren't enough to keep up.

BUG=skia:

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

7 years agoFuzzCanvas: impl SkPictureShader, SkTypeface, other TextEncodings
Hal Canary [Mon, 27 Feb 2017 18:36:38 +0000 (13:36 -0500)]
FuzzCanvas: impl SkPictureShader, SkTypeface, other TextEncodings

Change-Id: Ie27fbaf6ba9c85f7ec54e8d8251f62a0e193458e
Reviewed-on: https://skia-review.googlesource.com/8996
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoMake the fallback loop very accurate.
Herb Derby [Sat, 25 Feb 2017 21:31:09 +0000 (16:31 -0500)]
Make the fallback loop very accurate.

The summation xs = xs + dx was causing xs to overflow the bounds of the source.
Change the algorithm to eliminate error accumulation. Performance is not a
concern, because the fallback should only be used in the rare cases.

R=mtklein@google.com

BUG=skia:6216

Change-Id: Iff8e55af5eb79606c7b1e693ae825ceaeda44afd
Reviewed-on: https://skia-review.googlesource.com/8975
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
7 years agoFuzz PDF, N32, and Null Canvases
Hal Canary [Tue, 14 Feb 2017 18:35:14 +0000 (13:35 -0500)]
Fuzz PDF, N32, and Null Canvases

run `fuzz --type pdf_canvas` or `fuzz --type null_canvas` or
`fuzz --type n32_canvas`

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

7 years agoRe-land of skslc switch support
Ethan Nicholas [Mon, 27 Feb 2017 18:26:45 +0000 (13:26 -0500)]
Re-land of skslc switch support

This reverts commit 7d975fc200bbbea991ec4c04c08f3a5ea7b847af.

BUG=skia:

Change-Id: I57521f7a291a35cfed58d623ea4f8da29582d2c5
Reviewed-on: https://skia-review.googlesource.com/8993
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoAdd msaa flag and UI to viewer
csmartdalton [Fri, 24 Feb 2017 23:04:47 +0000 (16:04 -0700)]
Add msaa flag and UI to viewer

BUG=skia:

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

7 years agoSkGradientShader: Fix multi-byte-read-stack-use-after-scope
Hal Canary [Mon, 27 Feb 2017 14:59:39 +0000 (09:59 -0500)]
SkGradientShader: Fix multi-byte-read-stack-use-after-scope

BUG=chromium:694098
Change-Id: I9dfd61d1eed123fce33acf55f6f68e80ac41da25
Reviewed-on: https://skia-review.googlesource.com/8985
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoDrop SkRasterPipelineBench N to 15.
Mike Klein [Mon, 27 Feb 2017 14:39:38 +0000 (09:39 -0500)]
Drop SkRasterPipelineBench N to 15.

This highlights overheads and instruction set switch costs.

At time of writing on my HSW laptop,
   N = 16:  76ns
   N = 15: 291ns

BUG=skia:6289

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

7 years agoRoll Recipe DEPS
Eric Boren [Mon, 27 Feb 2017 13:58:13 +0000 (08:58 -0500)]
Roll Recipe DEPS

Yet more upstream breaks

BUG=skia:

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

7 years agoFixes to shared context test API
Brian Osman [Fri, 24 Feb 2017 19:51:44 +0000 (14:51 -0500)]
Fixes to shared context test API

Fixes a bug in Windows shared context creation, and makes the API
less fiddly.

BUG=skia:

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

7 years agobegin to hide details of SkPathEffect
Mike Reed [Sun, 26 Feb 2017 03:34:32 +0000 (22:34 -0500)]
begin to hide details of SkPathEffect

BUG=skia:

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

7 years agoUpdate SKP version
UpdateSKPs [Sun, 26 Feb 2017 07:08:50 +0000 (07:08 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

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

7 years agoRemove iHD530 tests.
Ben Wagner [Sun, 26 Feb 2017 02:46:40 +0000 (21:46 -0500)]
Remove iHD530 tests.

The iHD530 bot is fairly similar to the IntelIris540 bot, and the only open bug for iHD530 (skia:5792) also occurs for IntelIris540.

NOTRY=true

Change-Id: I1f9d753a93efd8a26c11f143fe0b523fab4f29ae
Reviewed-on: https://skia-review.googlesource.com/8886
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoFix bug handling CMYK images without color profiles
Matt Sarett [Fri, 24 Feb 2017 22:22:09 +0000 (17:22 -0500)]
Fix bug handling CMYK images without color profiles

We need the swizzler to convert CMYK->RGB in some
cases where we do have a color xform.

BUG=skia:

Change-Id: Id467ad03df64368fd5a6c3bd5461566582eb492e
Reviewed-on: https://skia-review.googlesource.com/8973
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoAdd onBackendCreated callback to Viewer
Christopher Dalton [Fri, 24 Feb 2017 20:22:53 +0000 (13:22 -0700)]
Add onBackendCreated callback to Viewer

Also removes fWidth and fHeight from Window and instead
calls into WindowContent to get these values.

BUG=skia:

Change-Id: I72ee506004b7da73db9abb607a3bc82edfcf7d43
Reviewed-on: https://skia-review.googlesource.com/8795
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>
7 years agoSet a limit on the size for BMP images
Leon Scroggins III [Fri, 24 Feb 2017 20:33:24 +0000 (15:33 -0500)]
Set a limit on the size for BMP images

This limit matches the limit used by Chromium. I am not aware of any
real world BMPs that are larger than this (or even close to it), but
there are some invalid BMPs that are larger than this, leading to
crashes when we try to read a row.

BUG:34778578
BUG=skia:3617

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

7 years agoRead color space info from raw exif data
Matt Sarett [Fri, 24 Feb 2017 19:51:08 +0000 (14:51 -0500)]
Read color space info from raw exif data

b/35516531

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

7 years agoImprove comment in SkICC.h
Matt Sarett [Fri, 24 Feb 2017 19:56:26 +0000 (14:56 -0500)]
Improve comment in SkICC.h

BUG=skia:

Change-Id: Ib0d30883a9e790bf1c4a85fce74a095a7df708c1
Reviewed-on: https://skia-review.googlesource.com/8908
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoUse construct/init pattern with GrPipeline to replace CreateAt.
Brian Salomon [Fri, 24 Feb 2017 16:01:15 +0000 (11:01 -0500)]
Use construct/init pattern with GrPipeline to replace CreateAt.

Change-Id: Ic6c7432a9a298a143ce4f2431e94c89a0ea79793
Reviewed-on: https://skia-review.googlesource.com/8938
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoFix some viewer crashes when switching color mode
Brian Osman [Fri, 24 Feb 2017 16:57:23 +0000 (11:57 -0500)]
Fix some viewer crashes when switching color mode

The whole idea of immediate mode GUIs is to put your GUI code and the
resulting action close together. Unfortunately, for actions that tear
down the backend (possibly freeing the surfaces we're drawing to), we
can't do that. So defer that action until the next frame (really, the
next idle). Only required when an action might call setDisplayParams.

BUG=skia:

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

7 years agoabs -> abs_ to avoid name conflicts
Mike Klein [Fri, 24 Feb 2017 17:10:47 +0000 (12:10 -0500)]
abs -> abs_ to avoid name conflicts

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Debug-MSAN

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

7 years agoRevert "Add GrExternalTextureData and SkCrossContextImageData"
Brian Osman [Fri, 24 Feb 2017 17:27:52 +0000 (17:27 +0000)]
Revert "Add GrExternalTextureData and SkCrossContextImageData"

This reverts commit 9ad1f92e2fceea33215c0f13cee42a679fb88d44.

Reason for revert: Breaking lots of bots

Original change's description:
> Add GrExternalTextureData and SkCrossContextImageData
>
> GrExternalTextureData is an API for exporting the backend-specific
> information about a texture in a type-safe way, and without pointing
> into the GrTexture. The new detachBackendTexture API lets us release
> ownership of a texture to the client.
>
> SkCrossContextImageData is the public API that lets clients upload
> textures on one thread/GrContext, then safely transfer ownership to
> another thread and GrContext for rendering.
>
> Only GL is implemented/supported right now. Vulkan support requires
> that we add thread-safe memory pools, or otherwise transfer the
> actual memory block containing the texture to the new context.
>
> BUG=skia:
>
> Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca
> Reviewed-on: https://skia-review.googlesource.com/8529
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

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

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

7 years agoSkJumper: perspective matrix
Mike Klein [Fri, 24 Feb 2017 16:51:36 +0000 (11:51 -0500)]
SkJumper: perspective matrix

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

7 years agoAdd SkTypeface::getVariationDesignPosition.
Ben Wagner [Fri, 24 Feb 2017 16:15:26 +0000 (11:15 -0500)]
Add SkTypeface::getVariationDesignPosition.

Allow users to query a typeface's position in variation design space.

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

7 years agoSkJumper: tiling modes
Mike Klein [Fri, 24 Feb 2017 16:04:50 +0000 (11:04 -0500)]
SkJumper: tiling modes

Slight changes to clamp to make it look more like the other two.

Mirror gets a fun new SSE/AVX abs() that requires no constants:

    abs(v) = v & (0-v)

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

7 years agoRemove the skip-draw xp optimization
Brian Salomon [Fri, 24 Feb 2017 15:37:15 +0000 (10:37 -0500)]
Remove the skip-draw xp optimization

This seems like extra complexity for a impractical case. Also, if this is important a lot more work could be saved by catching this upstack (e.g. SkCanvas or SkPaintToGrPaint).

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

7 years agoAdd GrExternalTextureData and SkCrossContextImageData
Brian Osman [Thu, 23 Feb 2017 22:06:10 +0000 (17:06 -0500)]
Add GrExternalTextureData and SkCrossContextImageData

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

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

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

BUG=skia:

Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca
Reviewed-on: https://skia-review.googlesource.com/8529
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoheaders: forward declare SkDOM, and include SkClipOp
Hal Canary [Thu, 23 Feb 2017 18:24:49 +0000 (13:24 -0500)]
headers: forward declare SkDOM, and include SkClipOp

Change-Id: I38041cd2c71a89604f35832415287e2356592efd
Reviewed-on: https://skia-review.googlesource.com/8925
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoImGui color space controls
Brian Osman [Fri, 24 Feb 2017 14:49:14 +0000 (09:49 -0500)]
ImGui color space controls

Adds radio buttons for switching among legacy, sRGB and F16.
Also adds a list of primaries you can pick from, as well as
a gamut diagram showing the primaries. The primaries can be
dragged around to alter the working space.

BUG=skia:

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

7 years agogn_to_bp to recurse deps.
Ben Wagner [Thu, 23 Feb 2017 23:00:06 +0000 (18:00 -0500)]
gn_to_bp to recurse deps.

Currently gn_to_bp GrabDependentSrcs only grabs the top level deps of
a target. In a proposed change there are more levels of deps to
clarify the real dependencies. To make this work well, a number of
lists are now sets to avoid including the same file multiple times.

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

7 years agoSkJumper: a8
Mike Klein [Fri, 24 Feb 2017 14:05:14 +0000 (09:05 -0500)]
SkJumper: a8

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

7 years agoFix a confusing typo in a comment about MSAA
Brian Osman [Fri, 24 Feb 2017 14:31:16 +0000 (09:31 -0500)]
Fix a confusing typo in a comment about MSAA

BUG=skia:

Change-Id: I8d35862fc5f8ff2b511d716d30c734a2f0e92442
Reviewed-on: https://skia-review.googlesource.com/8946
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoWrap cached GrTextures in GrTextureProxies (e.g., blur profiles, nine-patch blurs...
Robert Phillips [Fri, 24 Feb 2017 13:37:13 +0000 (08:37 -0500)]
Wrap cached GrTextures in GrTextureProxies (e.g., blur profiles, nine-patch blurs, etc.)

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

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

7 years agoSkJumper: scales and lerps
Mike Klein [Fri, 24 Feb 2017 13:21:18 +0000 (08:21 -0500)]
SkJumper: scales and lerps

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

7 years agoRevert "Revert "removed flags for g3""
Mike Reed [Fri, 24 Feb 2017 11:26:03 +0000 (11:26 +0000)]
Revert "Revert "removed flags for g3""

This reverts commit a6e431b2c1baa564d2619bdc2a51a3b5bfa7e276.

Reason for revert: g3 updated

Original change's description:
> Revert "removed flags for g3"
>
> This reverts commit 319ca08ba27d4582d716ce21b290eeb3f997394e.
>
> Reason for revert: missed some callers (drawARGB at least)
>
> Original change's description:
> > removed flags for g3
> >
> > BUG=skia:
> >
> > Change-Id: I2b1f748c23f2a5cd8d25f5f74f175f0d3beec75d
> > Reviewed-on: https://skia-review.googlesource.com/8896
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> >
>
> TBR=reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Change-Id: Ic1d03407da436fa4024643d8fce869541fea13b9
> Reviewed-on: https://skia-review.googlesource.com/8897
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

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

7 years agoGrTessellator (AA): simplify boundary extraction.
Stephen White [Thu, 23 Feb 2017 21:50:47 +0000 (16:50 -0500)]
GrTessellator (AA): simplify boundary extraction.

Perform boundary simplification and meshing inline with extraction.

Removed EdgeList::fNext (don't need to concatenate edge lists).
Removed new_contour() (don't need to heap-allocate them either).

BUG=skia:

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

7 years agoOne-liner fix that allows Viewer to switch between Raster and OpenGL
Chet Haase [Thu, 23 Feb 2017 01:28:41 +0000 (17:28 -0800)]
One-liner fix that allows Viewer to switch between Raster and OpenGL

A previous change to Viewer removed a key setTag() call that
meant that the logic to replace the SurfaceView on a toggle
between OpenGL/Raster was not able to execute, making the app
useless after that toggle was performed.

BUG=skia:

Change-Id: Idddb7612209ce83d3461155c59f451407118e1d5
Reviewed-on: https://skia-review.googlesource.com/8789
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chet Haase <chet@google.com>

7 years agoRevert "Add SkTypeface::getVariationDesignPosition."
Ben Wagner [Thu, 23 Feb 2017 20:48:43 +0000 (20:48 +0000)]
Revert "Add SkTypeface::getVariationDesignPosition."

This reverts commit 0f3d0c37dbcaf4ec271d5fe847becc9b1aa6f537.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Add SkTypeface::getVariationDesignPosition.
>
> Allow users to query a typeface's position in variation design space.
>
> Change-Id: I173ee9eefdddee6b2613435ebcc6b08c25b382ed
> Reviewed-on: https://skia-review.googlesource.com/8684
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>

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

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

7 years agoSkJumper: 565
Mike Klein [Thu, 23 Feb 2017 18:03:57 +0000 (13:03 -0500)]
SkJumper: 565

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

7 years agoSkJumper: portable round() was truncating...
Mike Klein [Thu, 23 Feb 2017 18:49:06 +0000 (13:49 -0500)]
SkJumper: portable round() was truncating...

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

7 years agoAdd SkTypeface::getVariationDesignPosition.
bungeman [Fri, 17 Feb 2017 23:03:49 +0000 (18:03 -0500)]
Add SkTypeface::getVariationDesignPosition.

Allow users to query a typeface's position in variation design space.

Change-Id: I173ee9eefdddee6b2613435ebcc6b08c25b382ed
Reviewed-on: https://skia-review.googlesource.com/8684
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoSkPDF: Stop using SkRasterClip/SkRegion
Hal Canary [Wed, 22 Feb 2017 22:16:59 +0000 (17:16 -0500)]
SkPDF: Stop using SkRasterClip/SkRegion

All test PDFs render the same now.

Change-Id: Ia912fd3adc1e1285cbd27f6deb5861df8396e44d
Reviewed-on: https://skia-review.googlesource.com/8906
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoFix Chrome iOS no GPU build and block includes from src/gpu on our NoGpu bot.
Brian Salomon [Thu, 23 Feb 2017 17:23:47 +0000 (12:23 -0500)]
Fix Chrome iOS no GPU build and block includes from src/gpu on our NoGpu bot.

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

7 years agoFix memory leak: adopt rather than ref GrTexture* in GrTextureStripAtlas
Robert Phillips [Thu, 23 Feb 2017 16:32:32 +0000 (11:32 -0500)]
Fix memory leak: adopt rather than ref GrTexture* in GrTextureStripAtlas

This was introduced in: https://skia-review.googlesource.com/c/8881/ (Switch GrTextureStripAtlas over to GrTextureProxies)

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

7 years agoDon't use mixed samples if NVPR is disabled
csmartdalton [Thu, 23 Feb 2017 06:16:23 +0000 (23:16 -0700)]
Don't use mixed samples if NVPR is disabled

BUG=skia:

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

7 years agoGrTessellator (AA): sorting and comparison performance improvements.
Stephen White [Thu, 23 Feb 2017 16:10:01 +0000 (11:10 -0500)]
GrTessellator (AA): sorting and comparison performance improvements.

Change comparison functions to perform the common case first (a.fX > b.fX),
and the uncommon case (a.fX == b.fX) after the short-circuit.

Change Comparator to switch on a direction enum instead of using function
pointers.

Inline sorted_merge() and front_back_split() into merge_sort(), and template
it on the comparator function, so it instantiates two versions. This
is even faster (but costs us some code bloat of course).

BUG=skia:

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

7 years agoSkJumper: fill in AVX f16 stages, turn on AVX
Mike Klein [Thu, 23 Feb 2017 16:01:52 +0000 (11:01 -0500)]
SkJumper: fill in AVX f16 stages, turn on AVX

As far as I can tell, this draws identically to the SSE4.1 backend.

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

7 years agoBlacklist test on Vulkan Ubuntu Intel caused by driver bug
Greg Daniel [Thu, 23 Feb 2017 15:11:48 +0000 (10:11 -0500)]
Blacklist test on Vulkan Ubuntu Intel caused by driver bug

BUG=skia:6280

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

7 years agoMake shadow_utils GM use its own SkResourceCache
Brian Salomon [Thu, 23 Feb 2017 14:34:03 +0000 (09:34 -0500)]
Make shadow_utils GM use its own SkResourceCache

This should stabilize the replay testing on the bots.

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

7 years agoRevert "skslc switch support"
Ethan Nicholas [Thu, 23 Feb 2017 16:18:54 +0000 (16:18 +0000)]
Revert "skslc switch support"

This reverts commit 2b1e468dabd2ac7bea7ec17740275f4f4aad30c3.

Reason for revert: bot breakage

Original change's description:
> skslc switch support
>
> BUG=skia:
>
> Change-Id: Ida7f9e80139aa1e4f43804cafbcac640e47fab25
> Reviewed-on: https://skia-review.googlesource.com/8771
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
>

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

Change-Id: Iaaa35d10a15704279c6883d4d68f6d4ad5078320
Reviewed-on: https://skia-review.googlesource.com/8792
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoDo not throw away the savelayer if kDontClipToLayer_PrivateSaveLayerFlag is set
Yuqian Li [Thu, 23 Feb 2017 15:28:33 +0000 (10:28 -0500)]
Do not throw away the savelayer if kDontClipToLayer_PrivateSaveLayerFlag is set

This affects the Android CTS test
android.uirendering.cts.testclasses.LayerTests#testSaveLayerUnclippedWithAlpha

BUG=skia:

Change-Id: Idae150e7e4f7ed9a1a225c382ba0b40d3f840937
Reviewed-on: https://skia-review.googlesource.com/8892
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Yuqian Li <liyuqian@google.com>

7 years agoMove around GL dependencies.
Mike Klein [Thu, 23 Feb 2017 15:31:13 +0000 (10:31 -0500)]
Move around GL dependencies.

  :gpu gets GL and GLU
  :gpu_tool_utils gets X11
  :views gets GL and X11

{shared,static}x{gpu,no-gpu} all seem to link.
May not be perfect, but it's a start.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-GCC-x86_64-Debug-NoGPU,Build-Ubuntu-GCC-x86_64-Release-Shared

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

7 years agoremove no longer used links from directory
Heather Miller [Thu, 23 Feb 2017 16:04:00 +0000 (11:04 -0500)]
remove no longer used links from directory

BUG=skia:

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

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

7 years agoskslc switch support
Ethan Nicholas [Wed, 22 Feb 2017 22:20:11 +0000 (17:20 -0500)]
skslc switch support

BUG=skia:

Change-Id: Ida7f9e80139aa1e4f43804cafbcac640e47fab25
Reviewed-on: https://skia-review.googlesource.com/8771
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
7 years agoIn Vulkan make sure resolve is sent to GPU when preparing msaa RenderTarget for exter...
Greg Daniel [Thu, 23 Feb 2017 14:44:02 +0000 (09:44 -0500)]
In Vulkan make sure resolve is sent to GPU when preparing msaa RenderTarget for external IO

In GrDrawingManager, when preparing for I/O we first flush the GPU then call resolve. However,
in Vulkan the resolve lives in a command buffer that needs to be flushed to the GPU as well.

This is most likely the cause we were seeing in Viewer app where first frame was always black
since the actually resolve command buffer was not flushed to the gpu before presenting. All
future frames would then typically show one frame behind.

BUG=skia:

Change-Id: Iaf492f88680b998be0087637279cc78d5a38ec50
Reviewed-on: https://skia-review.googlesource.com/8903
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoSwitch GrTextureStripAtlas over to GrTextureProxies
Robert Phillips [Wed, 22 Feb 2017 20:28:38 +0000 (15:28 -0500)]
Switch GrTextureStripAtlas over to GrTextureProxies

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

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

7 years agoRevert "Revert "Revert[2] "hide deprecated underline and strikethru"""
Mike Reed [Thu, 23 Feb 2017 14:19:35 +0000 (14:19 +0000)]
Revert "Revert "Revert[2] "hide deprecated underline and strikethru"""

This reverts commit cfd3d9ff8f370e3a4a53e2aba84dc4d682501f4c.

Reason for revert: derek is fixing caller

Original change's description:
> Revert "Revert[2] "hide deprecated underline and strikethru""
>
> This reverts commit aab68c56ef8fc88b0d1536f99aa1cc9ae7a0573a.
>
> Reason for revert: android still broken RecordingCanvasTests.cpp
>
> Original change's description:
> > Revert[2] "hide deprecated underline and strikethru"
> >
> > android now updated.
> >
> > This reverts commit e005edd3a5deb602beec59f59cdc8b14d3764d58.
> >
> > BUG=skia:6250
> >
> > Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73
> > Reviewed-on: https://skia-review.googlesource.com/8815
> > Commit-Queue: Mike Reed <reed@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> >
>
> TBR=reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:6250
>
> Change-Id: I954575a0e4b9aca8414e10901a7be03a2d7e6396
> Reviewed-on: https://skia-review.googlesource.com/8900
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

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

7 years agoRevert "Revert[2] "hide deprecated underline and strikethru""
Mike Reed [Thu, 23 Feb 2017 14:06:12 +0000 (14:06 +0000)]
Revert "Revert[2] "hide deprecated underline and strikethru""

This reverts commit aab68c56ef8fc88b0d1536f99aa1cc9ae7a0573a.

Reason for revert: android still broken RecordingCanvasTests.cpp

Original change's description:
> Revert[2] "hide deprecated underline and strikethru"
>
> android now updated.
>
> This reverts commit e005edd3a5deb602beec59f59cdc8b14d3764d58.
>
> BUG=skia:6250
>
> Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73
> Reviewed-on: https://skia-review.googlesource.com/8815
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>

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

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

7 years agoMake GrPipeline::CreateAt take GrRenderTarget and not GrRenderTargetContext
Brian Salomon [Wed, 22 Feb 2017 16:52:36 +0000 (11:52 -0500)]
Make GrPipeline::CreateAt take GrRenderTarget and not GrRenderTargetContext

This is needed in order to create pipelines at flush time.

Change-Id: I0bcd64d503d45c3383dbb932b048e2d7faa07c67
Reviewed-on: https://skia-review.googlesource.com/8849
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoSkJumper: reformat .S files
Mike Klein [Thu, 23 Feb 2017 13:38:31 +0000 (08:38 -0500)]
SkJumper: reformat .S files

Decimal byte encoding makes more horizontal space for comments,
which are the only thing you really want to read.

No code change here.

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

7 years agoAdd AVX to the SkJumper mix.
Mike Klein [Thu, 23 Feb 2017 13:04:49 +0000 (08:04 -0500)]
Add AVX to the SkJumper mix.

AVX is a nice little halfway point between SSE4.1 and HSW, in terms
of instructions available, performance, and availability.

Intel chips have had AVX since ~2011, compared to ~2013 for HSW and
~2007 for SSE4.1.  Like HSW it's got 8-wide 256-bit float vectors,
but integer (and double) operations are essentially still only 128-bit.
It also doesn't have F16 conversion or FMA instructions.

It doesn't look like this is going to be a burden to maintain, and only
adds a few KB of code size.  In exchange, we now run 8x wide on 45% to
70% of x86 machines, depending on the OS.

In my brief testing, speed eerily resembles exact geometric progression:
   SSE4.1:        1x speed (baseline)
      AVX: ~sqrt(2)x speed
      HSW:       ~2x speed

This adds all the basic plumbing for AVX but leaves it disabled.
I'll flip it on once I've implemented the f16 TODOs.

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

7 years agoRevert "removed flags for g3"
Mike Reed [Thu, 23 Feb 2017 04:42:14 +0000 (04:42 +0000)]
Revert "removed flags for g3"

This reverts commit 319ca08ba27d4582d716ce21b290eeb3f997394e.

Reason for revert: missed some callers (drawARGB at least)

Original change's description:
> removed flags for g3
>
> BUG=skia:
>
> Change-Id: I2b1f748c23f2a5cd8d25f5f74f175f0d3beec75d
> Reviewed-on: https://skia-review.googlesource.com/8896
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

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

7 years agoremoved flags for g3
Mike Reed [Thu, 23 Feb 2017 02:33:26 +0000 (21:33 -0500)]
removed flags for g3

BUG=skia:

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

7 years agoabstract access to device-clip-bounds
Mike Reed [Wed, 22 Feb 2017 20:21:35 +0000 (15:21 -0500)]
abstract access to device-clip-bounds

apply this to GpuDevice. Should allow us to switch to per-device-clipping
with minimal change (since we've abstracted how the device sees its
clip-bounds.)

BUG=skia:

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

7 years agoSkPDF: stop using RasterClip for drawAnnotation()
Hal Canary [Wed, 22 Feb 2017 20:55:06 +0000 (15:55 -0500)]
SkPDF: stop using RasterClip for drawAnnotation()

Change-Id: Idc3a4151f1b6bd3cb11b59e39ddb1458af385035
Reviewed-on: https://skia-review.googlesource.com/8891
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoSkPDF: do not use SkRegion in populateGraphicStateEntryFromPaint()
Hal Canary [Wed, 22 Feb 2017 21:32:34 +0000 (16:32 -0500)]
SkPDF: do not use SkRegion in populateGraphicStateEntryFromPaint()

Change-Id: I3eb192426f5b648fe7ad7db3c8dac42771be0197
Reviewed-on: https://skia-review.googlesource.com/8893
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoDon't include GrContextFactory.h from SkCommonFlagsPathRenderer.h
csmartdalton [Wed, 22 Feb 2017 21:29:48 +0000 (14:29 -0700)]
Don't include GrContextFactory.h from SkCommonFlagsPathRenderer.h

BUG=skia:

Change-Id: Ied4d23120cd21542314c45369597f375ca8affcf
Reviewed-on: https://skia-review.googlesource.com/8788
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoUse uintptr_t for masking ptrs.
Herb Derby [Wed, 22 Feb 2017 21:01:27 +0000 (16:01 -0500)]
Use uintptr_t for masking ptrs.

TBR=mtklein@google.com

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

7 years agoRevert[2] "hide deprecated underline and strikethru"
Mike Reed [Wed, 22 Feb 2017 20:51:27 +0000 (15:51 -0500)]
Revert[2] "hide deprecated underline and strikethru"

android now updated.

This reverts commit e005edd3a5deb602beec59f59cdc8b14d3764d58.

BUG=skia:6250

Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73
Reviewed-on: https://skia-review.googlesource.com/8815
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoActually test our ref-counting in release builds
Brian Osman [Wed, 22 Feb 2017 20:37:45 +0000 (15:37 -0500)]
Actually test our ref-counting in release builds

BUG=skia:

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

7 years agoViewer: balance save/restores and draw offscreen to window in src mode
Brian Salomon [Wed, 22 Feb 2017 20:21:11 +0000 (15:21 -0500)]
Viewer: balance save/restores and draw offscreen to window in src mode

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

7 years agoSkPDF: use RasterClip and Region less.
Hal Canary [Wed, 22 Feb 2017 15:45:25 +0000 (10:45 -0500)]
SkPDF: use RasterClip and Region less.

  * GraphicStackState::updateClip() uses device bounds, not region bounds
  * SkPDFDevice::handleInversePath() uses clipstack, not rasterclip

Rendered PDF Changes: unnoticable.

Change-Id: Ibf9c169a5ada828c8fefedf2bcb37f6de34f3528
Reviewed-on: https://skia-review.googlesource.com/8885
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoCheck for bounds intersection when batching MSAAPathOps
Jim Van Verth [Wed, 22 Feb 2017 19:50:52 +0000 (14:50 -0500)]
Check for bounds intersection when batching MSAAPathOps

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

7 years agoAdd the ability to enable/disable GPU path renderers
csmartdalton [Wed, 22 Feb 2017 19:00:42 +0000 (12:00 -0700)]
Add the ability to enable/disable GPU path renderers

Adds a bitfield to GrContextOptions that masks out path renderers.
Adds commandline flags support to set this bitfield in tools apps.
Removes GrGLInterfaceRemoveNVPR since we can now accomplish the same
thing in the context options.

BUG=skia:

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

7 years agoFix SkSemaphore comments.
Mike Klein [Wed, 22 Feb 2017 19:33:12 +0000 (14:33 -0500)]
Fix SkSemaphore comments.

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

7 years agoSkJumper: add mode to help prioritize porting
Mike Klein [Wed, 22 Feb 2017 19:04:38 +0000 (14:04 -0500)]
SkJumper: add mode to help prioritize porting

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

7 years agoSkJumper: set_rgb and swap_rb
Mike Klein [Wed, 22 Feb 2017 19:17:32 +0000 (14:17 -0500)]
SkJumper: set_rgb and swap_rb

swap_rb is a big limiting factor on Windows and Linux.
set_rgb just happened to be nearby and easy.

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

7 years agoUpdate endRecordingAsPicture to finishRecordingAsPicture
Yuqian Li [Wed, 22 Feb 2017 18:12:30 +0000 (13:12 -0500)]
Update endRecordingAsPicture to finishRecordingAsPicture

BUG=skia:

DOCS_PREVIEW= https://skia.org/?cl=8854

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