platform/upstream/libSkiaSharp.git
7 years agoUpdate libjpeg-turbo to 1.5.1, enable arithmetic decoding
Matt Sarett [Fri, 10 Feb 2017 22:47:51 +0000 (17:47 -0500)]
Update libjpeg-turbo to 1.5.1, enable arithmetic decoding

BUG=skia:4710

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

7 years agoRemove GrFragmentProcessor::computeInvariantOutput
Brian Salomon [Sun, 12 Feb 2017 14:28:54 +0000 (09:28 -0500)]
Remove GrFragmentProcessor::computeInvariantOutput

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

7 years agoInitialize test textures for ProcessorOptimizationValidationTest.
Brian Salomon [Fri, 10 Feb 2017 17:39:26 +0000 (12:39 -0500)]
Initialize test textures for ProcessorOptimizationValidationTest.

Ensure the data in the RGBA texture is premul.

Reenable the "modulation" optimization flag on GrAlphaThresholdFragmentProcessor.

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

7 years agoPixel zoomer in viewer
Brian Osman [Mon, 13 Feb 2017 14:39:57 +0000 (09:39 -0500)]
Pixel zoomer in viewer

Made it a separate ImGui window (rather than part of the debug window).
Bring it up with 'z'. Draggable/resizable. Variable zoom scale. Enjoy.

BUG=skia:

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

7 years agoReplaced all calls to fragmentPosition() with sk_FragCoord
Ethan Nicholas [Thu, 9 Feb 2017 22:01:22 +0000 (17:01 -0500)]
Replaced all calls to fragmentPosition() with sk_FragCoord

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

7 years agoRemove unused/barely-supported compressed GrPixelConfigs
Robert Phillips [Fri, 10 Feb 2017 19:44:58 +0000 (14:44 -0500)]
Remove unused/barely-supported compressed GrPixelConfigs

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

7 years agoOnly use DeviceCM->fNext if the layer doesn't affect the clip
Mike Reed [Sat, 11 Feb 2017 15:18:58 +0000 (10:18 -0500)]
Only use DeviceCM->fNext if the layer doesn't affect the clip

Before this, fNext always pointed at the next (prev) saveLayer in the stack.
Typically each layer is isolated, as it is defined to "consume" the current clip.
Android has an option to not affect/consume the clip, hence the support for looping
through this link-list in updateMC().

The current code always executes this loop, subtracting the current layer's clip from
the global clip, so typically the 2nd iteration will see an empty remaining clip and
draw nothing ... but we still pay for the subtract and the draw-overhead.

This change makes fNext point to the next layer ONLY if the current layer was marked
as non-consuming.

As a side-effect, this change also now detects the "last" restore by looking for
fMCRec == null, rather than fNext == nullptr. fMCRec was always null on the last
layer, so this change is safe, and could have landed independently.

BUG=skia:6214

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

7 years agoUpdate SKP version
UpdateSKPs [Sun, 12 Feb 2017 07:07:06 +0000 (07:07 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

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

7 years agoRefactor without turning on sse2/sse41.
Mike Klein [Sat, 11 Feb 2017 16:58:38 +0000 (11:58 -0500)]
Refactor without turning on sse2/sse41.

This is another slice of https://skia-review.googlesource.com/c/8230/.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug,Test-Win10-MSVC-Golo-GPU-GT610-x86_64-Release

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

7 years agoMake Win before_loop/after_loop SSE compatible.
Mike Klein [Sat, 11 Feb 2017 16:09:56 +0000 (11:09 -0500)]
Make Win before_loop/after_loop SSE compatible.

This is one little slice of https://skia-review.googlesource.com/c/8230/.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug,Test-Win10-MSVC-Golo-GPU-GT610-x86_64-Release

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

7 years agoRevert "Generate sse2/sse4.1 splices, use them."
Mike Klein [Sat, 11 Feb 2017 14:01:52 +0000 (14:01 +0000)]
Revert "Generate sse2/sse4.1 splices, use them."

This reverts commit 1fe55dc9fa47a73d470438d6298dc3fa959e4528.

Reason for revert: breaking Win GPU bots?

Original change's description:
> Generate sse2/sse4.1 splices, use them.
>
> While we're at it, tidy up build_stages.py a bit.
> Redirecting stdout seems a lot easier than print >>f all over the place.
>
> TODO: non-VEX-encoded before_loop() and after_loop()
>
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug
>
> Change-Id: I3f38e55f081670dd598c6050435466d9f394e5be
> Reviewed-on: https://skia-review.googlesource.com/8230
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Herb Derby <herb@google.com>
>

TBR=mtklein@chromium.org,herb@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug

Change-Id: Iba1905c54cb2dc42a880b9e6a8093835ffd530a2
Reviewed-on: https://skia-review.googlesource.com/8347
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRevert "IWYU"
Robert Phillips [Sat, 11 Feb 2017 01:25:00 +0000 (01:25 +0000)]
Revert "IWYU"

This reverts commit 2aeae78a2ce3b036f0401fd0381d6fd6e2a7a1fc.

Reason for revert: It looks like this is breaking the android roll

out/target/product/angler/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_graphics_Canvas.o frameworks/base/core/jni/android_graphics_Canvas.cpp"
frameworks/base/core/jni/android_graphics_Canvas.cpp:178:15: error: incomplete type 'SkRegion' named in nested name specifier

Original change's description:
> IWYU
>
> BUG=skia:
>
> Change-Id: Ib6b4d52841dbe3fa69a86ddb6b97d6a5d0f004ee
> Reviewed-on: https://skia-review.googlesource.com/8231
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

Change-Id: If979c3dd9dc3fe08ac450ced113b3d1e9a86f02a
Reviewed-on: https://skia-review.googlesource.com/8346
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRevert "More non-invertible shader local matrix guards"
Robert Phillips [Sat, 11 Feb 2017 01:19:30 +0000 (01:19 +0000)]
Revert "More non-invertible shader local matrix guards"

This reverts commit 368af4605db18f7197ed3289d2ebdc93bbb5879b.

Reason for revert: checking to see if this is breaking the Chrome DEPS roll
Original change's description:
> More non-invertible shader local matrix guards
>
> Change-Id: Ida9a300420ff1d883e617cdaadb80e88c99ad226
> Reviewed-on: https://skia-review.googlesource.com/8333
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
>

TBR=brianosman@google.com,fmalita@chromium.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Id0a771342b9be27c85d91f511d814297b8c3e0b8
Reviewed-on: https://skia-review.googlesource.com/8345
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoDelete legacy named color space API
Matt Sarett [Fri, 10 Feb 2017 20:11:12 +0000 (15:11 -0500)]
Delete legacy named color space API

BUG=skia:

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

7 years agoAdd GrGLSLShaderBuilder::declareGlobal
csmartdalton [Thu, 9 Feb 2017 14:47:21 +0000 (09:47 -0500)]
Add GrGLSLShaderBuilder::declareGlobal

BUG=skia:

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

7 years agoEnable threaded SkTaskGroup in Viewer
csmartdalton [Fri, 10 Feb 2017 22:05:14 +0000 (17:05 -0500)]
Enable threaded SkTaskGroup in Viewer

BUG=skia:

Change-Id: I7f467c094fb0bcb983bd86d07cb9bd7be34666b3
Reviewed-on: https://skia-review.googlesource.com/8332
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRemove unused field, and use official size.
Herb Derby [Fri, 10 Feb 2017 21:57:57 +0000 (16:57 -0500)]
Remove unused field, and use official size.

TBR=reed@google.com

Change-Id: I15fd225651142eefb0eb94a4f1dde55b13abe0aa
Reviewed-on: https://skia-review.googlesource.com/8343
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoRe-enable ProcessorOptimizationValidationTest on iOS.
Brian Salomon [Fri, 10 Feb 2017 21:16:21 +0000 (16:16 -0500)]
Re-enable ProcessorOptimizationValidationTest on iOS.

Change-Id: I05aae2e86cd7a219ab98e882bb6041263b4aca71
Reviewed-on: https://skia-review.googlesource.com/8318
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoUpdate codesearch docs.
Ben Wagner [Fri, 10 Feb 2017 16:44:55 +0000 (11:44 -0500)]
Update codesearch docs.

BUG=skia:

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

Change-Id: Ia8c87fbb3b2380c18d27bffbbd060a0d77194f7d
Reviewed-on: https://skia-review.googlesource.com/8321
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoRevert "Use SDF path miplevels based on the original path's size."
Jim Van Verth [Fri, 10 Feb 2017 21:45:43 +0000 (21:45 +0000)]
Revert "Use SDF path miplevels based on the original path's size."

This reverts commit 6e83b13c226246041a33dc7bf0e92626581b5e79.

Reason for revert: Fractional path sizes are causing asserts on the bots.

Original change's description:
> Use SDF path miplevels based on the original path's size.
>
> Should produce sharper results than arbitrary fixed sizes.
> Adds a new test to pathfill GM.
>
> BUG=chromium:682918
>
> Change-Id: I5a394098665d01e995a244fde278236f1471e6c9
> Reviewed-on: https://skia-review.googlesource.com/8328
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
>

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

Change-Id: I4a52df808ef3f769d0e6f75785148d46936a6747
Reviewed-on: https://skia-review.googlesource.com/8342
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
7 years agoUse SDF path miplevels based on the original path's size.
Jim Van Verth [Fri, 10 Feb 2017 20:24:39 +0000 (15:24 -0500)]
Use SDF path miplevels based on the original path's size.

Should produce sharper results than arbitrary fixed sizes.
Adds a new test to pathfill GM.

BUG=chromium:682918

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

7 years agoMore non-invertible shader local matrix guards
Florin Malita [Fri, 10 Feb 2017 20:34:27 +0000 (15:34 -0500)]
More non-invertible shader local matrix guards

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

7 years agoGenerate sse2/sse4.1 splices, use them.
Mike Klein [Thu, 9 Feb 2017 03:53:41 +0000 (22:53 -0500)]
Generate sse2/sse4.1 splices, use them.

While we're at it, tidy up build_stages.py a bit.
Redirecting stdout seems a lot easier than print >>f all over the place.

TODO: non-VEX-encoded before_loop() and after_loop()

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug

Change-Id: I3f38e55f081670dd598c6050435466d9f394e5be
Reviewed-on: https://skia-review.googlesource.com/8230
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years ago'gasp' to control symmetric rendering on Windows.
Ben Wagner [Thu, 9 Feb 2017 18:41:45 +0000 (13:41 -0500)]
'gasp' to control symmetric rendering on Windows.

Currently Skia tries hard to use symmetric rendering with DirectWrite
as often as possible. However, particularly on Windows 7 with CJK fonts,
thin horizontal strokes can be rendered without sufficient contrast
because the font was relying on the 6x1 oversampling for what is
effecitvely drop-out control. This change will only allow symmetric
rendering if the font allows it in the 'gasp' table.

BUG=chromium:645055

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

7 years agoUse new fragment processor optimization queries.
Brian Salomon [Fri, 10 Feb 2017 19:29:38 +0000 (14:29 -0500)]
Use new fragment processor optimization queries.

This doesn't yet delete the old virtuals.

It still uses the color and component flags model for the pipeline input and blended output but I'm planning to change those as well.

Change-Id: I64e2ec0fe9ed9fae3aabf1ca8c9bc0582fc7565a
Reviewed-on: https://skia-review.googlesource.com/7760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoIWYU
Mike Reed [Fri, 10 Feb 2017 18:11:53 +0000 (13:11 -0500)]
IWYU

BUG=skia:

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

7 years agoIntegrate the ImGui library with viewer
Brian Osman [Fri, 10 Feb 2017 18:36:16 +0000 (13:36 -0500)]
Integrate the ImGui library with viewer

Code and docs are at: https://github.com/ocornut/imgui

ImGui is an open source immediate mode GUI library that's
lightweight and fairly simply to integrate. Widget functions
return their state, and the library emits vertex and index
data to render everything. It's got a huge set of built-in
widgets and really robust layout control.

For the initial integration, I had to fix up event handling
in the viewer's app framework (to get mouse wheel and more
keys, etc...).

The new viewer 'Debug' window is toggled with the space bar.
For this change, I've added one feature to that window: the
slide picker. It's got a list of all slides, with filtering
support, and the ability to click to switch slides.

I also included the ImGui 'Demo' window (toggled with 'g').
This is nicely laid out, and includes examples of pretty
much everything the library can do. It also serves as good
documentation - find something that looks like what you want,
and then go look at the corresponding code (all of it is in
imgui_demo.cpp).

I have other CLs with other features (like directly editing
the primaries of the working color space), but I wanted to
land this chunk first, then start adding more features.

Other than adding new debugging features, there are few
more outstanding work items:

1) Raster doesn't render the GUI correctly, due to non-
invertible pos -> UV matrices. Florin is working on that.
2) Touch inputs aren't being routed yet, so the GUI isn't
usable on Android yet. Might also be tough to work with,
given the size.
3) ImGui has clipboard integration (that's why it wants
the C, X, and V keys), but we need to wire it up to the
OS' clipboard functions.
4) Draw commands can carry a void* payload to support
drawing images (using whatever mechanism the engine has).
I'd like to set that up (probably using SkImage*), which
makes it really easy to add visualization of off-screen
images in GMs, etc...

BUG=skia:

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

7 years agoCompile SkJpegCodec on bzl iOS build
Matt Sarett [Fri, 10 Feb 2017 14:42:54 +0000 (09:42 -0500)]
Compile SkJpegCodec on bzl iOS build

BUG=skia:

Change-Id: I7ffb33bc4b215874821d6797e7795e8dd59467ee
Reviewed-on: https://skia-review.googlesource.com/8312
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoMarker for driver upgrade.
Ben Wagner [Fri, 10 Feb 2017 16:57:58 +0000 (11:57 -0500)]
Marker for driver upgrade.

After https://skia-review.googlesource.com/c/8267/, I accidentally downgraded the driver on HD Graphics 4600. This CL marks reverting to the previous driver.

BUG=skia:
NOTRY=true

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

7 years agoRemove declaration of non-existent constructor
Brian Osman [Fri, 10 Feb 2017 17:10:54 +0000 (12:10 -0500)]
Remove declaration of non-existent constructor

BUG=skia:

Change-Id: If60588d5b6e960f2fb89cc24296cea7606fa189a
Reviewed-on: https://skia-review.googlesource.com/8324
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoRemove SkTextureCompressor.
Herb Derby [Fri, 10 Feb 2017 16:47:58 +0000 (11:47 -0500)]
Remove SkTextureCompressor.

This is the ultimate state of what it looks like to remove
SkTextureCompressor.

This end result will result from the following steps.

1) Remove Skia dep on ktx (done)
2) Move format over to ktx (done)
3) Remove all SkTexture compressor code

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

Change-Id: I3ad7a6abbea006a3034d95662c652d6db90b86ef
Reviewed-on: https://skia-review.googlesource.com/8272
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoAdd support for RG float textures
csmartdalton [Wed, 8 Feb 2017 21:14:11 +0000 (16:14 -0500)]
Add support for RG float textures

Adds kRG_float_GrPixelConfig.

Also removes default labels from switches on GrPixelConfig, in order
to help guide future enumerals to handle them properly.

BUG=skia:

Change-Id: Ie80b9413b4002b666df3ef1a7a8ea4c9c29ce43b
Reviewed-on: https://skia-review.googlesource.com/8226
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agoAdd GM to test ETC1
Robert Phillips [Fri, 10 Feb 2017 15:45:59 +0000 (10:45 -0500)]
Add GM to test ETC1

I don't think ETC1 currently gets tested any other way.

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

7 years agoFix size of vertices GM to show all content
Brian Salomon [Fri, 10 Feb 2017 15:48:15 +0000 (10:48 -0500)]
Fix size of vertices GM to show all content

Change-Id: Ib0c567da03fe9373cdfeb23291c1f448571668b3
Reviewed-on: https://skia-review.googlesource.com/8317
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoFixed3232 overflow in LinearGradientContext::shadeSpan()
Florin Malita [Fri, 10 Feb 2017 15:42:49 +0000 (10:42 -0500)]
Fixed3232 overflow in LinearGradientContext::shadeSpan()

Speculative fix for TAP ubsan failures.

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

7 years agoDisable processor optimization on iOS
Brian Salomon [Fri, 10 Feb 2017 15:13:50 +0000 (10:13 -0500)]
Disable processor optimization on iOS

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

7 years agoStrip dead code on all Release builds.
Mike Klein [Fri, 10 Feb 2017 12:59:39 +0000 (07:59 -0500)]
Strip dead code on all Release builds.

Today we do this only on Windows (/OPT:REF).

This extends to Mac-likes (-dead_strip) and non-Macs
(-ffunction-sections, -fdata-sections, -Wl,--gc-sections).

Should be no harm passing -ffunction-sections and -fdata-sections on Mac too.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-Mini

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

7 years agoChange the Sprite portion of SkBlitter use SkArenaAlloc.
Herb Derby [Thu, 9 Feb 2017 22:25:43 +0000 (17:25 -0500)]
Change the Sprite portion of SkBlitter use SkArenaAlloc.

The semantics of createT and make are the same with respect to
dtors, so it just a simple replacement of calls.

TBR=reed@google.com

Change-Id: Ib7d071d214edb44ea5c5466ce81252e9374b6eb7
Reviewed-on: https://skia-review.googlesource.com/8301
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoFix GrRenderTargetContext::drawArc's abandoned Context handling
Robert Phillips [Fri, 10 Feb 2017 14:31:01 +0000 (09:31 -0500)]
Fix GrRenderTargetContext::drawArc's abandoned Context handling

This was causing a crash in --preAbandonGpuContext mode

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

7 years agoMarker for Win Intel driver update.
Ben Wagner [Thu, 9 Feb 2017 18:16:48 +0000 (13:16 -0500)]
Marker for Win Intel driver update.

BUG=skia:

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

7 years agoFix new_texture_image in "preAbandonGpuContext" mode
Robert Phillips [Fri, 10 Feb 2017 13:04:06 +0000 (08:04 -0500)]
Fix new_texture_image in "preAbandonGpuContext" mode

This fixes a valgrind complaint

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

7 years agoRevert "Roll minimum picture version up to 44."
Robert Phillips [Fri, 10 Feb 2017 12:32:08 +0000 (12:32 +0000)]
Revert "Roll minimum picture version up to 44."

This reverts commit e037d12625b1dbb7952ae8a6553d6830e8b3ebbf.

Reason for revert: Checking to see if this broke the Chrome DEPS roll

Original change's description:
> Roll minimum picture version up to 44.
>
> This is the version produced by Chrome M54.  M56 is stable now.
>
> I am most interested in deleting SkBitmapSourceDeserializer,
> because it awkwardly calls from core into effects (SkImageSource).
>
> Change-Id: I58b8b990017ba43372ab3333a4ef8312e75abc61
> Reviewed-on: https://skia-review.googlesource.com/8286
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>

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

Change-Id: I9202591c7945c9421f335e544bf12461e38acdc6
Reviewed-on: https://skia-review.googlesource.com/8305
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoAdd a -Mini build bot to build the smallest Skia possible.
Mike Klein [Thu, 9 Feb 2017 20:22:53 +0000 (15:22 -0500)]
Add a -Mini build bot to build the smallest Skia possible.

This bot wants everything possible to turn off turned off.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-Mini

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

7 years agoMake header files self-sufficient
Hal Canary [Tue, 7 Feb 2017 19:09:38 +0000 (14:09 -0500)]
Make header files self-sufficient

Change-Id: Ice7d761b1023da77e50e5d6aa597964f7d9aa1d8
Reviewed-on: https://skia-review.googlesource.com/8302
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoFix CopyPixels() bug
Matt Sarett [Thu, 9 Feb 2017 23:35:14 +0000 (18:35 -0500)]
Fix CopyPixels() bug

BUG=skia:

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

7 years agoReplace kCTFontXXXOrientation with kCTFontOrientationXXX.
bungeman [Thu, 9 Feb 2017 22:15:59 +0000 (17:15 -0500)]
Replace kCTFontXXXOrientation with kCTFontOrientationXXX.

English has a quite complex order of adjectives, and adjectives come
before the noun.  However, this order often clashes with the desire for
clear hierarchy in naming. In the kingdom of nouns the nouns come first.
A great eye at Apple noticed a lack of dicipline in the naming of the
orientation constants and ranamed them to conform, deprecating the
original names. To avoid warnings which become errors, Skia must now
use the new names for these constants.

BUG=chromium:408571

Change-Id: I5ccce4a3353157e1e8780c3a169099cec76b7637
Reviewed-on: https://skia-review.googlesource.com/8300
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
7 years agoRoll minimum picture version up to 44.
Mike Klein [Thu, 9 Feb 2017 21:16:08 +0000 (16:16 -0500)]
Roll minimum picture version up to 44.

This is the version produced by Chrome M54.  M56 is stable now.

I am most interested in deleting SkBitmapSourceDeserializer,
because it awkwardly calls from core into effects (SkImageSource).

Change-Id: I58b8b990017ba43372ab3333a4ef8312e75abc61
Reviewed-on: https://skia-review.googlesource.com/8286
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoFix int64 overflow in SkClampRange::init()
Florin Malita [Thu, 9 Feb 2017 21:41:34 +0000 (16:41 -0500)]
Fix int64 overflow in SkClampRange::init()

BUG=skia:5915,skia:6219

Change-Id: Ic849bf9dc90e623fc1d6269cd245a2e3eca05d1d
Reviewed-on: https://skia-review.googlesource.com/8290
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoSkSVGCanvas and co. depend on expat.
Mike Klein [Thu, 9 Feb 2017 21:38:15 +0000 (16:38 -0500)]
SkSVGCanvas and co. depend on expat.

SkSVGCanvas depends on SkSVGDevice which depends on SkXMLWriter.cpp
which depends on expat.  So don't build any of this if we don't have
expat.

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

7 years agoRefactor pixel conversion: premul and unpremul
Matt Sarett [Thu, 9 Feb 2017 21:22:39 +0000 (16:22 -0500)]
Refactor pixel conversion: premul and unpremul

Just going for simpler and more code sharing.

BUG=skia:

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

7 years agoRemove dep from ktx to SkTextureCompressor.
Herb Derby [Thu, 9 Feb 2017 19:50:17 +0000 (14:50 -0500)]
Remove dep from ktx to SkTextureCompressor.

If this breaks anything in google3 revert it.

Change-Id: I35eb588e753a6fad78c1255556daae145533c801
Reviewed-on: https://skia-review.googlesource.com/8275
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>

7 years agoProperly create CTFontDescriptor from SkFontStyle.
bungeman [Thu, 9 Feb 2017 19:23:46 +0000 (14:23 -0500)]
Properly create CTFontDescriptor from SkFontStyle.

There has been a long standing TODO about adding weight, width, and slant
properly to created CTFontDescriptors. Now that the correct mappings are known,
add these values to the descriptors.

Change-Id: I37c3b892c2eb9dc3bb63399d14b535737c4fafb3
Reviewed-on: https://skia-review.googlesource.com/8273
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agoMove C effects into effects.
Mike Klein [Thu, 9 Feb 2017 20:52:11 +0000 (15:52 -0500)]
Move C effects into effects.

Change-Id: If5fb69781425260004a9782f8e92ea3d981bb0ed
Reviewed-on: https://skia-review.googlesource.com/8283
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRemove inner/outer threshold restriction on SkAlphaThresholdFilter.
Brian Salomon [Thu, 9 Feb 2017 21:09:47 +0000 (16:09 -0500)]
Remove inner/outer threshold restriction on SkAlphaThresholdFilter.

Chrome pixel tests are relying on this being a valid configuration.

Change-Id: Ib67e3168b72c15d014fae50faff4eb34fcc50a0d
Reviewed-on: https://skia-review.googlesource.com/8284
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoPrevent waiting for NexusPlayers indefinitely
Kevin Lubick [Thu, 9 Feb 2017 21:13:10 +0000 (16:13 -0500)]
Prevent waiting for NexusPlayers indefinitely

Also, I noticed that sometimes the NexusPlayers would come back up such
that adb would recognize them, but not such that the sys.boot_completed
was set to 1.  This was usually fixed by rebooting the devices again.

This code will reboot them up to three times in total before giving
up and killing the device.

BUG=skia:
TBR=borenet,rmistry
NOTREECHECKS=true
NOTRY=true

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

7 years ago[4fGradient] Relax interval checks for SkGradientShaderBase also
Florin Malita [Thu, 9 Feb 2017 20:05:15 +0000 (15:05 -0500)]
[4fGradient] Relax interval checks for SkGradientShaderBase also

Similar to https://skia-review.googlesource.com/8270, treat intervals
as closed at both extremities in the 4f gradient fallback impl also.

BUG=skia:6212

Change-Id: I7f164868202ae6a0f76cbcdbcbf8e62db12a1bd4
Reviewed-on: https://skia-review.googlesource.com/8277
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoexclude _none.cpp in G3 build
Mike Klein [Thu, 9 Feb 2017 20:28:53 +0000 (15:28 -0500)]
exclude _none.cpp in G3 build

Change-Id: Ic744d983ff095b979514fa7d033f72b3edae606d
Reviewed-on: https://skia-review.googlesource.com/8281
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
7 years agore-land of skslc type constructor cleanups
Ethan Nicholas [Thu, 9 Feb 2017 18:57:14 +0000 (13:57 -0500)]
re-land of skslc type constructor cleanups

BUG=skia:

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

7 years agoTemporarily don't mark alpha threshold fp as modulating
Brian Salomon [Thu, 9 Feb 2017 20:17:52 +0000 (15:17 -0500)]
Temporarily don't mark alpha threshold fp as modulating

Change-Id: I4b2b4f69f1d68cb55ca65d046355a5ea2dc34e36
Reviewed-on: https://skia-review.googlesource.com/8279
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoDon't build sksl if we're not building Ganesh.
Mike Klein [Thu, 9 Feb 2017 16:57:32 +0000 (11:57 -0500)]
Don't build sksl if we're not building Ganesh.

No point linking sksl into libskia if we won't use it, right?

Change-Id: Iafd3d14ccd7ae0bc360cc928ba809e935fa5d55b
Reviewed-on: https://skia-review.googlesource.com/8258
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoPixel conversion refactors: use raster pipeline for 565 and gray
Matt Sarett [Thu, 9 Feb 2017 18:50:45 +0000 (13:50 -0500)]
Pixel conversion refactors: use raster pipeline for 565 and gray

I'm trying not to do too much in one CL.  But, in general, I hope
to drop (non-performance important/optimized) special cases and
use the pipeline.

BUG=skia:

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

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

7 years agoMake src/effects explicitly optional.
Mike Klein [Thu, 9 Feb 2017 17:24:07 +0000 (12:24 -0500)]
Make src/effects explicitly optional.

This adds a GN argument to disable src/effects, which can cut about 1M
off libskia.  It's not the first place you'd go to trim code size, but
after turning off easy big things like Ganesh, it starts looking big.

I tested that fiddle builds and links.  It uses Skia but not effects.
Most of our test apps use effects and can't build in this new mode.

Change-Id: I9b5d6e9289a87bc08eedf6d202d0eabe754da41a
Reviewed-on: https://skia-review.googlesource.com/8263
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoadded support for sk_ClipDistance
Ethan Nicholas [Thu, 9 Feb 2017 15:15:25 +0000 (10:15 -0500)]
added support for sk_ClipDistance

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

7 years agoRe-enable processor optimization test with some fixes.
Brian Salomon [Thu, 9 Feb 2017 16:16:46 +0000 (11:16 -0500)]
Re-enable processor optimization test with some fixes.

Enables on GL (for now)

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

7 years ago[4fGradient] Relax interval checks
Florin Malita [Thu, 9 Feb 2017 18:46:55 +0000 (13:46 -0500)]
[4fGradient] Relax interval checks

We're currently considering intervals open at one extremity, in order to
ensure that a given value is always contained in a single interval.

This creates problems with synthetic clamp intervals [1, +inf), for
t == +inf (no interval can contain it).

Treat intervals as closed at both extremities instead.  This introduces
some ambiguitiy for overlapping values (contained in both adjacent
intervals), but solves the more serious problem above.

BUG=skia:6213

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

7 years agoRemove last use of ktx.h
Herb Derby [Thu, 9 Feb 2017 17:24:55 +0000 (12:24 -0500)]
Remove last use of ktx.h

If this breaks something in Google3, revert it.

Change-Id: Id719a87b6ca95c41d06f44f05ee1fdd430d4e0a2
Reviewed-on: https://skia-review.googlesource.com/8262
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoFix simple-magnification GM in "--preAbandonGpuContext" mode
Robert Phillips [Thu, 9 Feb 2017 17:22:21 +0000 (12:22 -0500)]
Fix simple-magnification GM in "--preAbandonGpuContext" mode

Change-Id: Ia225464e9c58a0aeb2f63b7ca5d5025fc6891598
Reviewed-on: https://skia-review.googlesource.com/8260
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoDon't batch circles and circular rrects beyond index limit
Jim Van Verth [Thu, 9 Feb 2017 16:36:37 +0000 (11:36 -0500)]
Don't batch circles and circular rrects beyond index limit

BUG=skia:6158, chromium:690144, chromium:688582, chromium:684112

Change-Id: I7a6d1fb73cbe6cb4328848acd153ff2505b5fea2
Reviewed-on: https://skia-review.googlesource.com/8256
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoImprove viewer stats collection and display
Brian Osman [Thu, 9 Feb 2017 17:10:20 +0000 (12:10 -0500)]
Improve viewer stats collection and display

Measure the time taken for animation and flush. Exclude UI and stats logic
from the timing. Use stacked bars to visualize the breakdown of time
within a frame.

BUG=skia:

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

7 years agoLog fuzzer linear gradient params in verbose mode
Florin Malita [Thu, 9 Feb 2017 16:31:32 +0000 (11:31 -0500)]
Log fuzzer linear gradient params in verbose mode

Useful for quickly importing the data into regression tests.

Change-Id: Icf4fa03f26dcc7f707dbdaf19be8cdc057aabb55
Reviewed-on: https://skia-review.googlesource.com/8255
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoFix viewer on Android
Brian Osman [Thu, 9 Feb 2017 16:22:57 +0000 (11:22 -0500)]
Fix viewer on Android

We need libandroid in all scenarios, not just vulkan.
Also, the logic for making an off-screen surface was
wrong - causing us to try and make one in legacy mode.

BUG=skia:

Change-Id: I5ef2e3e2d46de96e9824f6a12a13f6310ea04f81
Reviewed-on: https://skia-review.googlesource.com/8252
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoRevert "skslc type constructor cleanups"
Ethan Nicholas [Thu, 9 Feb 2017 17:04:23 +0000 (17:04 +0000)]
Revert "skslc type constructor cleanups"

This reverts commit 6f223283661c1ddc4a5334d2464804c6b6ba3ffa.

Reason for revert: bot breakage

Original change's description:
> skslc type constructor cleanups
>
> BUG=skia:
>
> Change-Id: I87108b5e107419d99c996ef032eda512a68451ab
> Reviewed-on: https://skia-review.googlesource.com/8117
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
>

TBR=egdaniel@google.com,ethannicholas@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: I1c9a8c4c62c7dd0f724f22000507112641d25e3b
Reviewed-on: https://skia-review.googlesource.com/8259
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
7 years agoReboot NexusPlayers with adb and shut them down if install fails
Kevin Lubick [Thu, 9 Feb 2017 15:08:13 +0000 (10:08 -0500)]
Reboot NexusPlayers with adb and shut them down if install fails

BUG=skia:6045

Change-Id: Ibd31e4cc44b71633377b05ad33c1bdab9024f78c
Reviewed-on: https://skia-review.googlesource.com/8152
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoInclude correct header in SkFontMgr_custom_empty_factory.cpp.
Ben Wagner [Thu, 9 Feb 2017 15:05:28 +0000 (10:05 -0500)]
Include correct header in SkFontMgr_custom_empty_factory.cpp.

The SkFontMgr_New_Custom_Empty function used to be declared in
SkFontMgr_custom.h, but is now declared in SkFontMgr_empty.h.

7 years agoRevert "added support for sk_ClipDistance"
Ethan Nicholas [Thu, 9 Feb 2017 14:59:44 +0000 (14:59 +0000)]
Revert "added support for sk_ClipDistance"

This reverts commit 8b8c76506a9a3b07246e6c2770e35dfc413da97a.

Reason for revert: breaks Vulkan

Original change's description:
> added support for sk_ClipDistance
>
> Change-Id: I14fd921cace23ab37a1e5e9d5da94d92d3688680
> Reviewed-on: https://skia-review.googlesource.com/8225
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
>

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

Change-Id: I84d6bc75738eb9a8e090aa60e6421f2437a027b2
Reviewed-on: https://skia-review.googlesource.com/8246
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
7 years agoSplit custom font managers.
Ben Wagner [Wed, 8 Feb 2017 22:29:33 +0000 (17:29 -0500)]
Split custom font managers.

Some users would like to use the empty font manager, but the directory
gont manager brings in extra dependencies to work which would otherwise
be unneeded. Allow these users to build just the bits of code they
actually need.

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

7 years agoskslc type constructor cleanups
Ethan Nicholas [Tue, 7 Feb 2017 22:28:31 +0000 (17:28 -0500)]
skslc type constructor cleanups

BUG=skia:

Change-Id: I87108b5e107419d99c996ef032eda512a68451ab
Reviewed-on: https://skia-review.googlesource.com/8117
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoFix -Shared bot.
Mike Klein [Thu, 9 Feb 2017 14:35:57 +0000 (09:35 -0500)]
Fix -Shared bot.

It's building a static library today.  By turning on is_component_build,
it should make an .so.

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

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

7 years agoUpdates to viewer gradle scripts
Greg Daniel [Tue, 7 Feb 2017 18:46:27 +0000 (13:46 -0500)]
Updates to viewer gradle scripts

BUG=skia:

Change-Id: Ib847e5ae89d2ac3f496507f69f82f5bac4914f36
Reviewed-on: https://skia-review.googlesource.com/8133
Reviewed-by: Chris Dalton <csmartdalton@google.com>
7 years agoadded support for sk_ClipDistance
Ethan Nicholas [Wed, 8 Feb 2017 20:49:56 +0000 (15:49 -0500)]
added support for sk_ClipDistance

Change-Id: I14fd921cace23ab37a1e5e9d5da94d92d3688680
Reviewed-on: https://skia-review.googlesource.com/8225
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years ago[4fLinearGradient] Avoid NaNs for degenerate perspectives
Florin Malita [Wed, 8 Feb 2017 22:03:56 +0000 (17:03 -0500)]
[4fLinearGradient] Avoid NaNs for degenerate perspectives

BUG=skia:6211

Change-Id: I92148497b29860b3844fe35c2985070a197e4085
Reviewed-on: https://skia-review.googlesource.com/8229
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoAdd integer vectors to GrSLType
csmartdalton [Wed, 8 Feb 2017 19:56:27 +0000 (14:56 -0500)]
Add integer vectors to GrSLType

BUG=skia:

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

7 years agoAdd a basic constructor to GrPipeline
csmartdalton [Wed, 8 Feb 2017 19:41:05 +0000 (14:41 -0500)]
Add a basic constructor to GrPipeline

Adds a simple constructor for when we just need to set up basic
internal rendering.

BUG=skia:

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

7 years agoSkRasterPipelineBlitter doesn't need an SkArenaAlloc.
Mike Klein [Tue, 7 Feb 2017 17:05:10 +0000 (12:05 -0500)]
SkRasterPipelineBlitter doesn't need an SkArenaAlloc.

Change-Id: Ie4f8bb1c05dee4639a075c100abbc5262e521fc4
Reviewed-on: https://skia-review.googlesource.com/8128
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
7 years ago[4fGradient] Fix degenerate vertical gradient assert
Florin Malita [Wed, 8 Feb 2017 20:35:42 +0000 (15:35 -0500)]
[4fGradient] Fix degenerate vertical gradient assert

For vertical gradients, we rely on LinearIntervalProcessor to yield a
fAdvX == +inf, thanks to division by dx (== +/-0).

But certain degenerate values may cause the numerator to also collapse
to 0, resulting in fAdvX == NaN.

Instead or relying on float semantics, pin fAdvX to +inf explicitly for
vertical gradients.

BUG=skia:5912

Change-Id: Ia8007b99802a6b1e0b22f5618a0ca8959b0cfbb2
Reviewed-on: https://skia-review.googlesource.com/8223
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoRemove use of SkSmallAllocator from all Loopers.
Herb Derby [Wed, 8 Feb 2017 20:12:19 +0000 (15:12 -0500)]
Remove use of SkSmallAllocator from all Loopers.

R=reed@google.com

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

7 years agoSkSplicer: begin on sse2/sse4.1 support
Mike Klein [Wed, 8 Feb 2017 17:50:17 +0000 (12:50 -0500)]
SkSplicer: begin on sse2/sse4.1 support

This lets us target older machines with SkSplicer.
SSE2 and SSE4.1 are the sweet spots if we're going to pick two more.

Nothing too interesting here except maybe the f16<->f32 code.

I rearranged a little to keep things consistent across platforms.

Next CL will get this into _generated.h and use it when appropriate.

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

7 years agoSimplify SkCpu.cpp preprocessor guards.
Mike Klein [Tue, 7 Feb 2017 23:03:15 +0000 (18:03 -0500)]
Simplify SkCpu.cpp preprocessor guards.

We have a couple ways to detect CPU features on ARM:
  - on ARMv8, getauxval(AT_HWCAP)
  - on ARMv7, getauxval(AT_HWCAP) and cpu-features.h

This guards each of these methods with preprocessor guards to match
exactly when we can use them.  Today they're sort of a mix of that and
higher level expectations about particular build and operating systems.

I'm looking into doing this directly by reading CPU registers,
much like we do for x86 further up the file.

None of this is super important right now, so as long as we don't decide
that we have these features when we don't, things will be fine.  It's no
big deal for now if we fail to detect them.

Change-Id: I3b7768483086d0f3f4f6516b754c3ea5ec2d03e5
Reviewed-on: https://skia-review.googlesource.com/8182
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRemove exec bit from source files.
Ben Wagner [Wed, 8 Feb 2017 19:09:08 +0000 (14:09 -0500)]
Remove exec bit from source files.

Ran:
find src include \( -name '*.cpp' -o -name '*.h' \) -executable -exec chmod -x {} \;

BUG=skia:

Change-Id: I04a4adbfcea9fd9860ab83d43734dc5158d3a884
Reviewed-on: https://skia-review.googlesource.com/8220
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
7 years agoTweak shadow sample for demos.
Jim Van Verth [Mon, 6 Feb 2017 19:36:01 +0000 (14:36 -0500)]
Tweak shadow sample for demos.

BUG=skia:6119

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

7 years agoUpdate valgrind suppressions
Robert Phillips [Wed, 8 Feb 2017 18:04:30 +0000 (13:04 -0500)]
Update valgrind suppressions

It appears that the top-level function named has switched to just "main"

Change-Id: I33a18a8d433867e759312d09e5b258f934f495a4
Reviewed-on: https://skia-review.googlesource.com/8194
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoSimplify viewer's handling of backbuffer surface and color space
Brian Osman [Wed, 8 Feb 2017 15:47:28 +0000 (10:47 -0500)]
Simplify viewer's handling of backbuffer surface and color space

WindowContext still supports color spaces, but not other color
types. Any off-screen rendering is the app's responsibility.

This change also adds (working) F16 support to viewer. Note that
the previous 10-bit and FP16 support in WindowContext was broken.
There was no code to push the off-screen canvas to the window.
If you ever made it to the unreachable off-screen code path in
createSurface, it would have simply stopped drawing.

The decision to limit the window's gamut to sRGB is mostly driven
by my desire to add real-time editing of gamut. This design lets
us do that, without tearing down and rebuilding the window for
every change. An application could still supply a different gamut
via setDisplayParams and render directly to the back buffer with
proper color correction.

BUG=skia:

Change-Id: I94df35c7a42faee396009acc83683e40bb3c284d
Reviewed-on: https://skia-review.googlesource.com/8153
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>

7 years agoRemove double free in GM and Bench.
Herb Derby [Wed, 8 Feb 2017 16:45:29 +0000 (11:45 -0500)]
Remove double free in GM and Bench.

Since the SkArenaAlloc handles calling the dtor, it is not longer needed
in the test.

Change-Id: I70a09be7bd0e71bf1e3d55ef08b5e87742e0bd18
Reviewed-on: https://skia-review.googlesource.com/8191
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoFix whitespace.txt
Chris Craik [Tue, 7 Feb 2017 20:39:43 +0000 (15:39 -0500)]
Fix whitespace.txt

Change-Id: Ia627030d3a5d622b94cc576ea3679daf68f9e635
Reviewed-on: https://skia-review.googlesource.com/8149
Commit-Queue: Chris Craik <ccraik@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoadd virtuals in prep for device-clipping
Mike Reed [Wed, 8 Feb 2017 15:07:53 +0000 (10:07 -0500)]
add virtuals in prep for device-clipping

Build flag available for backends to begin testing their impl.

Need to formalize save/restore, and how to forward these to device but not on picture canvases.

BUG=skia:6214

Change-Id: Ic5c0afba3e8c84fcf124567e63fe2f5880b623e7
Reviewed-on: https://skia-review.googlesource.com/8183
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoAdd a blend-wrong mode to SkRasterPipelineBlitter.
Mike Klein [Tue, 7 Feb 2017 16:57:27 +0000 (11:57 -0500)]
Add a blend-wrong mode to SkRasterPipelineBlitter.

This keeps correct linear blending as the only option exericsed,
but it should be easy to see how to turn on blend-wrong mode.

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

7 years agoRevert "Revert "Disallow readPixels() conversions from untagged srcs to tagged dsts""
Matt Sarett [Tue, 7 Feb 2017 21:52:07 +0000 (21:52 +0000)]
Revert "Revert "Disallow readPixels() conversions from untagged srcs to tagged dsts""

This reverts commit 8461506c8b025522eb89cd754c63fb5dbf0cb7f1.

Reason for revert: Fixed some Chrome code, let's try this again.

Original change's description:
> Revert "Disallow readPixels() conversions from untagged srcs to tagged dsts"
>
> This reverts commit ccfd1083a7b9d546735ddd1037f3240635cce72d.
>
> Reason for revert: Roll is failing.
>
> Original change's description:
> > Disallow readPixels() conversions from untagged srcs to tagged dsts
> >
> > This might break the roll into Chrome.  But let's see how.
> >
> > BUG=skia:6021
> >
> > Change-Id: I2698b5d6fe72d01bed0dc64703b592a03d441a80
> > Reviewed-on: https://skia-review.googlesource.com/7127
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Matt Sarett <msarett@google.com>
> >
>
> TBR=msarett@google.com,brianosman@google.com,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:6021
>
> Change-Id: I4b62178fd7c23f43cf69ca69fc14526ecd503956
> Reviewed-on: https://skia-review.googlesource.com/7205
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Matt Sarett <msarett@google.com>
>

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

Change-Id: I3f3f33fe6b84fbd5c537b60ed5c8b9201d529a6a
Reviewed-on: https://skia-review.googlesource.com/8156
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoRevert "Remove asTextureRef from SkSpecialImage & update effects accordingly"
Robert Phillips [Wed, 8 Feb 2017 12:49:00 +0000 (12:49 +0000)]
Revert "Remove asTextureRef from SkSpecialImage & update effects accordingly"

This reverts commit e88cf6b7aa5deaeaa9dab18ada7d9d11e1e4be12.

Reason for revert: See if breaking DEPS roll

Original change's description:
> Remove asTextureRef from SkSpecialImage & update effects accordingly
>
> This CL also renames SkSpecialImage::asTextureProxy to asTextureProxyRef
>
> Change-Id: I5ed8e475bb9688453b825ae4500ed0e8d324b5ac
> Reviewed-on: https://skia-review.googlesource.com/7995
> 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: I227cbd5fcaf7e2f86e858331d9ec7ff7a5f203ca
Reviewed-on: https://skia-review.googlesource.com/8184
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoReduce stack usage for tests.
Herb Derby [Tue, 7 Feb 2017 22:57:47 +0000 (17:57 -0500)]
Reduce stack usage for tests.

TBR=mtklein@google.com

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

7 years agoSkFontHost_mac.cpp#create_descriptor to handle nullptr familyName.
bungeman [Mon, 6 Feb 2017 18:21:33 +0000 (13:21 -0500)]
SkFontHost_mac.cpp#create_descriptor to handle nullptr familyName.

Currently create_descriptor will crash if handed a familyName which is
nullptr. Instead it should simply create a descriptor without a family name
and allow CoreText to resolve a default font. This further simplifies
default font handling on Mac.

BUG=skia:6196

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