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

7 years agoadded support for sk_VertexID
Ethan Nicholas [Tue, 7 Feb 2017 19:53:32 +0000 (14:53 -0500)]
added support for sk_VertexID

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

7 years agofixed assertion error when calling matrixCompMult()
Ethan Nicholas [Tue, 7 Feb 2017 19:08:31 +0000 (14:08 -0500)]
fixed assertion error when calling matrixCompMult()

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

7 years agoReland "Respect canvas size and frame offset in webp decoder"
Matt Sarett [Tue, 7 Feb 2017 22:01:16 +0000 (17:01 -0500)]
Reland "Respect canvas size and frame offset in webp decoder"

Original Change Reviewed At:
https://skia-review.googlesource.com/c/7800

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

BUG=skia:6185

Change-Id: I1a7732832d37920545c1775d7c7c65b43ed810f9
Reviewed-on: https://skia-review.googlesource.com/8157
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoAdd one more whitespace.
Tenghui Zhu [Tue, 7 Feb 2017 21:33:29 +0000 (13:33 -0800)]
Add one more whitespace.

Change-Id: I05ba4275c5d5d5d5c096385ed7cf5c8ff43ea973
Reviewed-on: https://skia-review.googlesource.com/8148
Commit-Queue: Tenghui Zhu <ztenghui@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoRemove asTextureRef from SkSpecialImage & update effects accordingly
Robert Phillips [Tue, 7 Feb 2017 16:59:16 +0000 (11:59 -0500)]
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>

7 years agoIn ur code testing my CLs
John Reck [Tue, 7 Feb 2017 20:52:21 +0000 (15:52 -0500)]
In ur code testing my CLs

BUG=skia:

Change-Id: Ie2c41be6626f35231a1d4600f8aef714c648e0f7
Reviewed-on: https://skia-review.googlesource.com/8151
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Commit-Queue: John Reck <jreck@google.com>

7 years agoDisable failing test on NexusPlayer Vk
Matt Sarett [Tue, 7 Feb 2017 19:41:20 +0000 (14:41 -0500)]
Disable failing test on NexusPlayer Vk

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-Android_Vulkan

BUG=skia:6209

Change-Id: Id3c1de249224ebce742bb5abb9d1b17868d91481
Reviewed-on: https://skia-review.googlesource.com/8144
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoOmit nondeterminstic tests on IntelIris540 ANGLE.
Ben Wagner [Tue, 7 Feb 2017 20:01:41 +0000 (15:01 -0500)]
Omit nondeterminstic tests on IntelIris540 ANGLE.

BUG=skia:6103,skia:6141

Change-Id: Ib27aa3fddb907c88c0bc41152ebb90abc0e36fe0
Reviewed-on: https://skia-review.googlesource.com/8146
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoOmit nondeterministic tests on AndroidOne for GPU bot.
Ben Wagner [Tue, 7 Feb 2017 19:25:46 +0000 (14:25 -0500)]
Omit nondeterministic tests on AndroidOne for GPU bot.

These bugs haven't been updated in over a year, so probably not worthwhile to continue to run the tests.

BUG=skia:4697,skia:4704,skia:4694,skia:4705

Change-Id: Ie77cfdf1a4a12a1eb61f90a3f93e479deb0349ab
Reviewed-on: https://skia-review.googlesource.com/5577
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agoTack on ret instructions to each SkSplicer stage.
Mike Klein [Tue, 7 Feb 2017 19:32:25 +0000 (14:32 -0500)]
Tack on ret instructions to each SkSplicer stage.

This is just a warm up refactor to make the existing stages more
amenable to running in place without splicing.  Hopefully the driver
interpreter loop for that will be my next CL.

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

7 years agoUse SkArenaAlloc in the SkAutoBlitterChoose code.
Herb Derby [Tue, 7 Feb 2017 19:25:11 +0000 (14:25 -0500)]
Use SkArenaAlloc in the SkAutoBlitterChoose code.

- Added default implementation of onMakeContext to support use in android.

Searches for uses:
"public SkShader"  package:^chromium$ -file:^src/third_party/skia
package:^aosp.* "public SkShader"  -file:external/skia -file:.*third_party/skia
package:^android$ "public SkShader"  -file:external/skia -file:.*third_party/skia

... shows that no subclass overrides onCreateContext.

TBR=reed@google.com
TBR=mtklein@google.com

Change-Id: I8bd5f57a79534574e344b165d31dccee41c31767
Reviewed-on: https://skia-review.googlesource.com/8140
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoSkColorSpace: remove named API, add gamut API
Matt Sarett [Tue, 7 Feb 2017 18:56:11 +0000 (13:56 -0500)]
SkColorSpace: remove named API, add gamut API

Reland from: https://skia-review.googlesource.com/c/8021/

BUG=skia:

Change-Id: I18985f130587b15fccbc86b76b2bb5c49ba5ba8a
Reviewed-on: https://skia-review.googlesource.com/8136
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoRemove Perf upload ACL
Eric Boren [Tue, 7 Feb 2017 17:56:57 +0000 (12:56 -0500)]
Remove Perf upload ACL

BUG=skia:6070

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

7 years agofix tools/git-sync-deps
Hal Canary [Tue, 7 Feb 2017 17:05:47 +0000 (12:05 -0500)]
fix tools/git-sync-deps

Change-Id: I8755fd7a316d284627e25f88e02b69e2f67f9622
Reviewed-on: https://skia-review.googlesource.com/8126
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoAddress feedback on makeTextureImage
Brian Osman [Tue, 7 Feb 2017 17:31:02 +0000 (12:31 -0500)]
Address feedback on makeTextureImage

BUG=skia:

Whitespace change in public API.

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

7 years agoFix infratests
Eric Boren [Tue, 7 Feb 2017 18:00:46 +0000 (13:00 -0500)]
Fix infratests

BUG=skia:

Change-Id: I19ff5750e12bbd66ba6c43fe8d6c3234f9bb1372
Reviewed-on: https://skia-review.googlesource.com/8132
Reviewed-by: Eric Boren <borenet@google.com>
7 years agoRevert "Use SkArenaAlloc instead of SkSmallAllocator in the SkAutoBlitterChoose code."
Robert Phillips [Tue, 7 Feb 2017 17:28:15 +0000 (17:28 +0000)]
Revert "Use SkArenaAlloc instead of SkSmallAllocator in the SkAutoBlitterChoose code."

This reverts commit 2b57b7f7a7fc97db57f190b5a8ebcf68e177ee2d.

Reason for revert: Android compile failing

Original change's description:
> Use SkArenaAlloc instead of SkSmallAllocator in the SkAutoBlitterChoose code.
>
>
> TBR=reed@google.com
> Change-Id: Iefb044bf7657fbf982f23aa91a3f4d013ce2c626
> Reviewed-on: https://skia-review.googlesource.com/7786
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
>

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

Change-Id: Id09c35377dddae0811d998b7d0c34c422325a5bc
Reviewed-on: https://skia-review.googlesource.com/8129
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRevert "SkColorSpace: remove named API, add gamut API"
Matt Sarett [Tue, 7 Feb 2017 17:06:09 +0000 (17:06 +0000)]
Revert "SkColorSpace: remove named API, add gamut API"

This reverts commit ecaaf6f1c156e5690200322fc2636380c1f63dd8.

Reason for revert: Breaks everything

Original change's description:
> SkColorSpace: remove named API, add gamut API
>
> BUG=skia:
>
> Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6
> Reviewed-on: https://skia-review.googlesource.com/8021
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

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

Change-Id: Ief5a0a4eeabe75a21f7512e23fc15309151066c4
Reviewed-on: https://skia-review.googlesource.com/8127
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoSkColorSpace: remove named API, add gamut API
Matt Sarett [Mon, 6 Feb 2017 17:59:48 +0000 (12:59 -0500)]
SkColorSpace: remove named API, add gamut API

BUG=skia:

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

7 years agoBring back SkImage::makeTextureImage
Brian Osman [Tue, 7 Feb 2017 16:23:28 +0000 (11:23 -0500)]
Bring back SkImage::makeTextureImage

Ensures that an image is GPU backed on the passed-in GrContxt. The new
version requires a destination color space (intended usage of the image),
so we can make a proper decision about decoded format.

This reverts commit d263413a2a92cafe3fd3b051c67d00206c9a0e4d.

BUG=skia:

Change-Id: Ibccddbafc301779559592045ed5a5fa9264e7432
Reviewed-on: https://skia-review.googlesource.com/8116
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoRevert "Reland "Respect canvas size and frame offset in webp decoder""
Matt Sarett [Tue, 7 Feb 2017 16:39:23 +0000 (16:39 +0000)]
Revert "Reland "Respect canvas size and frame offset in webp decoder""

This reverts commit 604971e39a20392fd4c74a56bcdc187311cf86dc.

Reason for revert: Strange vk failures

Original change's description:
> Reland "Respect canvas size and frame offset in webp decoder"
>
> Original Change Reviewed At:
> https://skia-review.googlesource.com/c/7800
>
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN
>
> BUG=skia:6185
>
> Change-Id: I92baa9070e15ef3c62dd347c08c906c2715dda10
> Reviewed-on: https://skia-review.googlesource.com/8050
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

TBR=msarett@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6185
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

Change-Id: Ice93b62c55ea13fce83140567be16225ff0e2fdb
Reviewed-on: https://skia-review.googlesource.com/8123
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoTear down 32-bit iOS test/perf bots.
Mike Klein [Tue, 7 Feb 2017 15:22:43 +0000 (10:22 -0500)]
Tear down 32-bit iOS test/perf bots.

The 64-bit bots look fine.  We're only testing GPU on iOS, so it's not
super critical to have 32-bit iOS testers.  I'll keep the builders.

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

7 years agoRemove _lowp SkSplicer experiment for now.
Mike Klein [Tue, 7 Feb 2017 15:11:52 +0000 (10:11 -0500)]
Remove _lowp SkSplicer experiment for now.

SkSplicer is an experiment, and _lowp SkSplicer is an experiment^2.
It's not that it's a bad idea... it just makes working on the main
SkSplicer experiment more complicated.

While not live at head, it'll live on in my heart.

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

7 years agoharfbuzz 1.3.0 → 1.4.2
Hal Canary [Fri, 27 Jan 2017 19:12:32 +0000 (14:12 -0500)]
harfbuzz 1.3.0 → 1.4.2

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

7 years agoAnother workaround for libstdc++ unique_ptr
Brian Salomon [Tue, 7 Feb 2017 15:46:33 +0000 (10:46 -0500)]
Another workaround for libstdc++ unique_ptr

Change-Id: Ic08bf6f23e2509db332fcc0f6cab577189c2f558
Reviewed-on: https://skia-review.googlesource.com/8115
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoUse SkArenaAlloc instead of SkSmallAllocator in the SkAutoBlitterChoose code.
Herb Derby [Mon, 6 Feb 2017 20:26:09 +0000 (15:26 -0500)]
Use SkArenaAlloc instead of SkSmallAllocator in the SkAutoBlitterChoose code.

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

7 years agoFix canvas size of new tiled bitmap GM
Brian Osman [Tue, 7 Feb 2017 14:19:17 +0000 (09:19 -0500)]
Fix canvas size of new tiled bitmap GM

Copy-paste error.

BUG=skia:

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

7 years agoUse SkVertices for tessellated spot and ambient shadow rendering.
Brian Salomon [Mon, 6 Feb 2017 20:47:44 +0000 (15:47 -0500)]
Use SkVertices for tessellated spot and ambient shadow rendering.

Change-Id: Ia81e7a771d345286533752708e4304c1ae3b97c9
Reviewed-on: https://skia-review.googlesource.com/8042
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stan Iliev <stani@google.com>

7 years agogen_tasks.go: Add --builder_name_schema flag
Eric Boren [Tue, 7 Feb 2017 14:16:30 +0000 (09:16 -0500)]
gen_tasks.go: Add --builder_name_schema flag

BUG=skia:6070

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

7 years agoShadowUtils: Fix umbra inset calculation when determining if umbra is fully occluded.
Brian Salomon [Mon, 6 Feb 2017 19:23:53 +0000 (14:23 -0500)]
ShadowUtils: Fix umbra inset calculation when determining if umbra is fully occluded.

Change-Id: Id0db49ad45b341d39abf7ee532ecc0799a832192
Reviewed-on: https://skia-review.googlesource.com/8079
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
7 years agoAdd GM to exercise some of the darker corners of SkMagnifierImageFilter
Robert Phillips [Mon, 6 Feb 2017 17:32:55 +0000 (12:32 -0500)]
Add GM to exercise some of the darker corners of SkMagnifierImageFilter

An upcoming CL (https://skia-review.googlesource.com/c/7995/ (Remove asTextureRef from SkSpecialImage & update effects accordingly)) modifies some untested portions of the SkMagnifierImageFilter.

This adds a test to prevents regressions.

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

7 years agoAdd 64-bit iOS bots.
Mike Klein [Tue, 7 Feb 2017 00:30:51 +0000 (19:30 -0500)]
Add 64-bit iOS bots.

Because it's 2017.

CQ_INCLUDE_TRYBOTS=skia.primary:Perf-iOS-Clang-iPadMini4-GPU-GX6450-arm64-Debug,Perf-iOS-Clang-iPadMini4-GPU-GX6450-arm64-Release,Test-iOS-Clang-iPadMini4-GPU-GX6450-arm64-Debug,Test-iOS-Clang-iPadMini4-GPU-GX6450-arm64-Release

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

7 years agoAdd a fast case for copying vertices in GrDrawVerticesOp.
Brian Salomon [Tue, 7 Feb 2017 00:06:22 +0000 (19:06 -0500)]
Add a fast case for copying vertices in GrDrawVerticesOp.

Uses Sk2f to apply a translation-only matrix when the vertex attributes contain only positions and colors.

We should look at how to generalize this for other draw vertices cases and other ops.

Change-Id: I5eb692982dc216b1c0a71209c969672b0562143c
Reviewed-on: https://skia-review.googlesource.com/8103
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoFix rounding error with tiled bitmap draws
Brian Osman [Mon, 6 Feb 2017 21:48:57 +0000 (16:48 -0500)]
Fix rounding error with tiled bitmap draws

We were snapping the top-left of the destination rectangle to integers,
but using the original (fractional) size. This led to us losing rows or
columns of pixels at the first tile boundary.

Also added a GM that demonstrates the bug (now renders correctly).

BUG=skia:

Change-Id: I50629dab9dd90fedad2c7e3393a1b1d1c7a8d45e
Reviewed-on: https://skia-review.googlesource.com/8102
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoGrTessellator (AA): improve antialiasing of thin shapes.
Stephen White [Mon, 6 Feb 2017 14:50:27 +0000 (09:50 -0500)]
GrTessellator (AA): improve antialiasing of thin shapes.

(Long description, but actually quite a small change.)

This is the first change inspired by the "straight skeleton" algorithm.
This algorithm gives us a mental model to describe the edge-antialiasing
problem: consider the shape as walls of a house, the outer alpha
geometry is a 45-degree "roof" up to a flat top at a height of 1.0
(the filled interior).  The faces of the sloping roof join at the
bisectors between the inner and outer points.

When the shape being drawn is sufficiently thin, there should be no flat
roof, and the sloping roof meets at an edge (the straight skeleton).

This patch detects cases where an edge inverts on stroking, which
indicates that the flat roof has turned inside out, and should be
reduced to a point instead. The model above describes what to do:
follow down the "roof" along the bisectors to their intersection.
This is the point to which an inverted edge should be collapsed.
Fortunately, the bisector edges are easy to compute: they're the
connector edges joining inner and outer points. Linearly interpolating
the distance from the top to the bottom point gives the alpha we
should use to approximate coverage.

Now that we are correctly handling inversions, bevelling outer edges
is no longer necesary, since pointy outer edges won't cause nasty
opaque artifacts.

A couple of other quality improvements: on intersection, always lerp
the alpha of connector edge, even if the opposite edge is an inner edge
(later, when these edges are collapsed, we need this value to compute
the correct alpha). Fix the case where an intruding outer vertex
intersects exactly with an inner edge by maxing its alpha with the
computed value in check_for_intersection(). Finally, we also no longer
round off the intersections produced by Line::intersect(), since it
introduces a loss of quality with no measurable performance benefit.

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