platform/upstream/libSkiaSharp.git
7 years agoRemove Nexus9 bots
Eric Boren [Tue, 13 Dec 2016 17:32:28 +0000 (12:32 -0500)]
Remove Nexus9 bots

BUG=skia:

Change-Id: I65705a6142a96a476c2d9eae79aeaaa29ade2dde
Reviewed-on: https://skia-review.googlesource.com/5928
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoFix double CMYK->RGBA conversion on swizzled jpeg decodes
Matt Sarett [Tue, 13 Dec 2016 18:29:54 +0000 (13:29 -0500)]
Fix double CMYK->RGBA conversion on swizzled jpeg decodes

BUG=skia:

Change-Id: I4e8c4128f974cc491fcef0bbc1137b5d62b6f967
Reviewed-on: https://skia-review.googlesource.com/5933
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoRevert "Add a deferred copy surface"
Robert Phillips [Tue, 13 Dec 2016 18:48:08 +0000 (18:48 +0000)]
Revert "Add a deferred copy surface"

This reverts commit 4431de6af930a8638c194b072558ea3a4b79d908.

Reason for revert: ANGLE errors (at the very least)

Original change's description:
> Add a deferred copy surface
>
> This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).
>
> There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.
>
> Change-Id: Iab1867668d8146a766201158a251b9174438ee2b
> Reviewed-on: https://skia-review.googlesource.com/5773
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I61408d9e306b9b1ab32f93ab086e95184e12857f
Reviewed-on: https://skia-review.googlesource.com/5938
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoUpdating NVIDIA Shields to "Shield Experience Upgrade 3.3"
Kevin Lubick [Tue, 13 Dec 2016 18:38:10 +0000 (13:38 -0500)]
Updating NVIDIA Shields to "Shield Experience Upgrade 3.3"

https://shield.nvidia.com/support/nvidia-android-tv/release-notes/1
Unfortunately, this does not update the build id, so we have to
link any gold or perf diffs to this whitespace change.

BUG=skia:

Change-Id: I4bb23e44d2cd3621b7c2161d19f214bb48c1e679
Reviewed-on: https://skia-review.googlesource.com/5935
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoadd move semantics to SkTHash*
Mike Klein [Tue, 13 Dec 2016 17:46:05 +0000 (12:46 -0500)]
add move semantics to SkTHash*

The more I look at std::unordered_map and co., the less I like them.
I think we might want to bet on SkTHash*.

As a simple first improvement, add move support.
Next comes shrinking, and then I'll start moving over SkTDynamicHash users.

BUG=skia:6053

Change-Id: Ifdb5d713aab66434ca271c7f18a0cbbb0720099c
Reviewed-on: https://skia-review.googlesource.com/5943
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
7 years agoAdd helper for idenitfying hw GrAATypes.
Brian Salomon [Tue, 13 Dec 2016 15:22:54 +0000 (10:22 -0500)]
Add helper for idenitfying hw GrAATypes.

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

7 years agoAdd a deferred copy surface
Robert Phillips [Tue, 13 Dec 2016 14:01:40 +0000 (09:01 -0500)]
Add a deferred copy surface

This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).

There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.

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

7 years agoFix bug of passing DrawType::kColor instead of kStencilAndColor
Brian Salomon [Sat, 10 Dec 2016 18:24:02 +0000 (13:24 -0500)]
Fix bug of passing DrawType::kColor instead of kStencilAndColor

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

7 years agoFix out of bounds memory write in SkGifCodec
Leon Scroggins III [Tue, 13 Dec 2016 15:57:43 +0000 (10:57 -0500)]
Fix out of bounds memory write in SkGifCodec

Follow on to 5860. When computing left and top, divide by the sample
size directly rather than using get_scaled_dimension, which promotes
0 to 1, potentially moving the area to clear outside the bounds of
the image.

BUG=skia:6046

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

7 years agoDelete SK_SUPPORT_LEGACY_GRADIENT_PREMUL-guarded code
Florin Malita [Wed, 7 Dec 2016 19:57:04 +0000 (14:57 -0500)]
Delete SK_SUPPORT_LEGACY_GRADIENT_PREMUL-guarded code

The flag has been removed from Chromium.

R=reed@google.com,
TBR=

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

7 years agoFix doc typo
Jim Van Verth [Tue, 13 Dec 2016 15:40:29 +0000 (10:40 -0500)]
Fix doc typo

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

Change-Id: I3861a4f56cd325b1bff322613d93c7b697492e75
Reviewed-on: https://skia-review.googlesource.com/5942
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
7 years agoRemove antialias axis from GrPathRendererChain::DrawType
Brian Salomon [Sat, 10 Dec 2016 14:35:48 +0000 (09:35 -0500)]
Remove antialias axis from GrPathRendererChain::DrawType

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

7 years agoAvoid int64 overflow in SkClampRange
Florin Malita [Tue, 13 Dec 2016 14:42:20 +0000 (09:42 -0500)]
Avoid int64 overflow in SkClampRange

Update sk_64_smul_check to detect the numeric_limits<int64_t>::min()
case (which cannot be safely passed to SkTAbs), and fail.

BUG=skia:6019
R=reed@google.com,mtklein@google.com

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

7 years agore-land of added sk_FragCoord support to skslc
Ethan Nicholas [Mon, 12 Dec 2016 20:33:30 +0000 (15:33 -0500)]
re-land of added sk_FragCoord support to skslc

BUG=skia:

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

7 years agoAdd PDFium_SkiaPaths bot
Eric Boren [Tue, 13 Dec 2016 13:48:46 +0000 (08:48 -0500)]
Add PDFium_SkiaPaths bot

BUG=skia:6049

Change-Id: I90d06f9bb3d6180a0921130b9fe523733211e481
Reviewed-on: https://skia-review.googlesource.com/5849
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
7 years agodon't use deprecated api
Mike Reed [Tue, 13 Dec 2016 14:13:31 +0000 (09:13 -0500)]
don't use deprecated api

BUG=skia:

Change-Id: I25886b9cc8df9235b925582f15bea14fffe855db
NOTRY=True
Reviewed-on: https://skia-review.googlesource.com/5940
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoSkGifCodec: intersect frameRect with image size
Leon Scroggins III [Mon, 12 Dec 2016 22:10:46 +0000 (17:10 -0500)]
SkGifCodec: intersect frameRect with image size

When clearing due to SkCodecAnimation::RestoreBGColor_DisposalMethod,
intersect the frameRect with the image size to prevent clearing outside
the bounds of the allocated memory.

Add a test image, created by the fuzzer.

BUG=skia:6046

Change-Id: I43676d28f82abf093ef801752f3a9e881580924c
Reviewed-on: https://skia-review.googlesource.com/5860
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoFix Android overdraw detection
Matt Sarett [Mon, 12 Dec 2016 23:35:43 +0000 (18:35 -0500)]
Fix Android overdraw detection

Now that SkNWayCanvas inherits from SkNoDrawCanvas, we need to
override onDrawDrawable().

BUG=skia:

Change-Id: Id8cf62f5675199202580d3ee94c71a0ae231c81e
Reviewed-on: https://skia-review.googlesource.com/5865
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
7 years agoRoll recipe DEPS
Eric Boren [Mon, 12 Dec 2016 13:42:11 +0000 (08:42 -0500)]
Roll recipe DEPS

BUG=skia:

Change-Id: Ib3e5b53fc0f01ad00cab94e1130324d7b901ed77
Reviewed-on: https://skia-review.googlesource.com/5791
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoremove old clipping flags
Mike Reed [Tue, 13 Dec 2016 12:55:32 +0000 (07:55 -0500)]
remove old clipping flags

BUG=skia:

Change-Id: Ic80d918439af27d22bdd101124b72d3182baddc6
NOTRY=True
Reviewed-on: https://skia-review.googlesource.com/5920
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoDelete swarm_trigger recipe
Eric Boren [Mon, 12 Dec 2016 13:41:34 +0000 (08:41 -0500)]
Delete swarm_trigger recipe

Delete no-longer-used parts of swarming module and add "pragma: no
cover" where applicable.

BUG=skia:

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

7 years agoAdd Gray test color images to bots
Matt Sarett [Mon, 12 Dec 2016 22:53:26 +0000 (17:53 -0500)]
Add Gray test color images to bots

BUG=skia:

Change-Id: I70a92a9f6355f0fbdfd64b528d10bd0c25a9c0a0
Reviewed-on: https://skia-review.googlesource.com/5864
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Robert Aftias <raftias@google.com>
7 years agoAdd a method in SkCanvas to set "hard" clip bounds.
Stan Iliev [Mon, 12 Dec 2016 22:39:55 +0000 (17:39 -0500)]
Add a method in SkCanvas to set "hard" clip bounds.

Add SkCanvas::setBoundRect, which sets the max clip rectangle,
which can be replaced by clipRect, clipRRect and clipPath.

BUG=skia:

Change-Id: Ie39eb1715214971576e7a1dda760c6997a7e0208
Reviewed-on: https://skia-review.googlesource.com/5359
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
7 years agoDecode to sRGB on Android
Matt Sarett [Mon, 12 Dec 2016 21:30:13 +0000 (16:30 -0500)]
Decode to sRGB on Android

I want to land this so we can start testing color space aware
decoding on Android.  In particular, it will be interesting to
see how linear premultiplication will affect existing content.

This will only modify BitmapRegionDecoder behavior.  I'll
follow up with a similar change to BitmapFactory.cpp in Android.

This will cause image diffs on Gold.

BUG=skia:

Change-Id: Iffda5f035447f2608ce26945570b503f8971b735
Reviewed-on: https://skia-review.googlesource.com/5698
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoAdd GMs and benchs for concave Analytic AA
Yuqian Li [Mon, 12 Dec 2016 21:24:47 +0000 (16:24 -0500)]
Add GMs and benchs for concave Analytic AA

BUG=skia:

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

7 years agoUse unsigned arithmetic for SkBitmapProcStateAutoMapper bias
Florin Malita [Mon, 12 Dec 2016 20:43:51 +0000 (15:43 -0500)]
Use unsigned arithmetic for SkBitmapProcStateAutoMapper bias

To avoid undefined int underflow behavior.

BUG=skia:6017
R=mtklein@google.com,reed@google.com

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

7 years agoHide exotic clipops, with a private rename for internal use
Mike Reed [Mon, 12 Dec 2016 20:02:31 +0000 (15:02 -0500)]
Hide exotic clipops, with a private rename for internal use

BUG=skia:

Change-Id: I6c320a8c7fa501771d93c191c4657452cc9f2e03
Reviewed-on: https://skia-review.googlesource.com/5844
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agoSkBitmap::setPixelRef(): less reference churn
Hal Canary [Mon, 12 Dec 2016 18:48:12 +0000 (13:48 -0500)]
SkBitmap::setPixelRef():  less reference churn

BUG=skia:

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

7 years agogen_tasks.go: Assert that all compile tasks are in the JOBS list
Eric Boren [Mon, 12 Dec 2016 19:30:12 +0000 (14:30 -0500)]
gen_tasks.go: Assert that all compile tasks are in the JOBS list

Rather than auto-adding the Job, assert that it's listed. This enforces
that the JOBS list is accurate. Add all missing compile Jobs to the list.

BUG=skia:

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

7 years agofix fuzz
Cary Clark [Mon, 12 Dec 2016 18:57:56 +0000 (13:57 -0500)]
fix fuzz

Don't walk off the end if the loop doesn't
contain the expected value.

R=kjlubick@google.com
BUG=skia:6047

Change-Id: I96815180dc7c92b45691037ae6c4b40beedc009a
Reviewed-on: https://skia-review.googlesource.com/5845
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>

7 years agoJust make Android.bp bpfmt compliant to begin with.
Mike Klein [Mon, 12 Dec 2016 19:09:38 +0000 (14:09 -0500)]
Just make Android.bp bpfmt compliant to begin with.

Change-Id: I0fe833b4af4b68f97fe3feefc76503cb6473eb7b
Reviewed-on: https://skia-review.googlesource.com/5847
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoFix SkGifCodec bugs around truncated data
Leon Scroggins III [Fri, 9 Dec 2016 21:39:33 +0000 (16:39 -0500)]
Fix SkGifCodec bugs around truncated data

Prior to this CL, if a GIF file was truncated before reading the local
color map of a frame, incremental decode would do the wrong thing. In
onStartIncrementalDecode, we would either create a color table based on
the global color map, or we would create a dummy one with only one
color (transparent). The dummy color table is correct if there is
neither a global nor a local color map, and allows us to fill the frame
with transparent. But if more data is provided, and it includes an
actual color map and image data, one of the following can happen:
- If the created color table is smaller than the actual one, the
  decoded data may include indices outside of the range of the created
  color table, resulting in a crash.
- If we get lucky, and the created color table is large enough, it may
  still be the wrong colors (and most likely is).

To solve this, make onStartIncrementalDecode fail if there is a local
color map that has not been read yet. A future call may read more data
and read the correct color map.

This is done by returning kIncompleteInput in
SkGifCodec::prepareToDecode if there is a local color map that has not
yet been read. (It is possible that there is no color map at all, in
which case we still need to support decoding that frame. Skip
attempting to decode in that case.)

In onGetPixels, if prepareToDecode returned kIncompleteInput, return
kInvalidInput. Although the input is technically incomplete, no future
call will provide more data (unlike in incremental decoding), and there
is nothing interesting for the client to draw. This also prevents
SkCodec from attempting to fill the data with an SkSwizzler, which has
not been created. (An alternative solution would be create the dummy
color table and an SkSwizzler, which would keep the current behavior.
But I think the new behavior of returning kInvalidInput makes more
sense.)

Add tests to verify the intended behavior:
- getPixels fails.
- startIncrementalDecode fails, but after providing more data it will
  succeed and incremental decoding matches the image decoded from the
  full stream.
- Both succeed if there is no color table at all.

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

7 years agoRevert "added sk_FragCoord support to skslc"
Greg Daniel [Mon, 12 Dec 2016 17:20:42 +0000 (17:20 +0000)]
Revert "added sk_FragCoord support to skslc"

This reverts commit ce33f10677630e34187b661a02161378d8304d68.

Reason for revert: Breaking many gpu bots

Change-Id: I94c813ed6a9311458c872f74bb1b0792f46ff414
Reviewed-on: https://skia-review.googlesource.com/5737
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoUpdated the get_images_from_skps tool to check for ICC profile support
raftias [Thu, 8 Dec 2016 15:53:24 +0000 (10:53 -0500)]
Updated the get_images_from_skps tool to check for ICC profile support

Tool will now check for and output all unsuccessfully parsed ICC
profiles in input sksp images if --testColorCorrectionSupported is set
as a flag. All ICC-aware codecs had to be slightly modified in order to
expose this information, as the logic for accessing the ICC profiles is
all within the codecs. If --writeFailedImages is set, it will also
output all images whoses ICC profiles were not supported.

TBR=reed@google.com

BUG=skia:

Change-Id: Ic310d82bdebf92f8d3bc0ad3dcc688136b6de377
Reviewed-on: https://skia-review.googlesource.com/5355
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Robert Aftias <raftias@google.com>

7 years agoDisable flaky GSStoreTest
Eric Boren [Mon, 12 Dec 2016 15:38:45 +0000 (10:38 -0500)]
Disable flaky GSStoreTest

BUG=skia:6048

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

7 years agoadded sk_FragCoord support to skslc
Ethan Nicholas [Fri, 9 Dec 2016 22:22:59 +0000 (17:22 -0500)]
added sk_FragCoord support to skslc

BUG=skia:

Change-Id: If78a4d08121699f87659f0d2e35f3edbf1867401
Reviewed-on: https://skia-review.googlesource.com/5408
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoRemove dependency on NDK cpufeatures.
Mike Klein [Mon, 12 Dec 2016 15:29:38 +0000 (10:29 -0500)]
Remove dependency on NDK cpufeatures.

Instead of relying on cpu-features.c, just do what it does.

Good reading: http://man7.org/linux/man-pages/man3/getauxval.3.html

While it's nice to use the headers when possible, should either of these headers not be available, we can fall back to doing it all manually:

  extern "C" uint32_t getauxval(uint32_t)
  static const int AT_HWCAP = 16;
  static const int HWCAP_CRC32 = (1<<7);

To keep things simple I've slimmed cpu feature detection down to just the features we actually make use of.  This removes all runtime feature detection for ARMv7... we expect NEON to be globally available, and so far we haven't used the other FMA/FP16 bits on ARMv7.  ARMv8 feature dection remains the same, CRC32 before, CRC32 after.  x86 (cpuid-based detection) and MIPS (nothing) are untouched.

We need to keep //third_party/cpu-features for //third_party/libwebp.

Change-Id: I6c96df9a09ae68c8c0e54c1152aa177ba9bafc83
Reviewed-on: https://skia-review.googlesource.com/5800
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agofunnel f16 through standard load/store/gather
Mike Klein [Sun, 11 Dec 2016 16:42:07 +0000 (11:42 -0500)]
funnel f16 through standard load/store/gather

This is a precursor to using mask load, mask store, and gather instructions for f16.  This is a slight performance win too, through slightly simpler code generation.  Having done this, it now makes sense to give a name to f16->f32 conversion, from_f16().

Finally, while we're at this, also send store_f32 through store(), so that now all formats use load, gather, and store uniformly.

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

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

7 years agochange SkClipOp to a class enum
Mike Reed [Mon, 12 Dec 2016 15:02:12 +0000 (10:02 -0500)]
change SkClipOp to a class enum

BUG=skia:

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

7 years agoproposed gn_to_bp fixes
Mike Klein [Mon, 12 Dec 2016 14:03:56 +0000 (09:03 -0500)]
proposed gn_to_bp fixes

in response to 5784

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

7 years agoMake subset param to texture generation API non-optional
Brian Osman [Fri, 9 Dec 2016 21:51:55 +0000 (16:51 -0500)]
Make subset param to texture generation API non-optional

We were always already supplying this, makes it simpler

BUG=skia:

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

7 years agoConvert image width and height (used by tiling) to float once.
Mike Klein [Fri, 9 Dec 2016 22:00:32 +0000 (17:00 -0500)]
Convert image width and height (used by tiling) to float once.

The storage cost is the same, so might as well do this when building the pipeline instead of when running it.  This also avoids the awkward cvtsi2ss instruction that screws with register renaming.

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

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

7 years agoUpdate SKP version
UpdateSKPs [Sun, 11 Dec 2016 07:04:41 +0000 (07:04 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

Change-Id: Ia66acb6f21804c51661a3d51812c6cd91b1abb61
Reviewed-on: https://skia-review.googlesource.com/5788
Reviewed-by: update-skps <update-skps@skia.org>
Commit-Queue: Ravi Mistry <rmistry@google.com>

7 years agoAdd documentation for being a Android RoboCop.
Derek Sollenberger [Mon, 12 Dec 2016 13:32:43 +0000 (08:32 -0500)]
Add documentation for being a Android RoboCop.

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

Change-Id: I6172c9edfcac63855b3f7c2b120bac44760a24a5
Reviewed-on: https://skia-review.googlesource.com/5759
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>

7 years agoAdd documentation for Viewer
Jim Van Verth [Thu, 8 Dec 2016 17:13:28 +0000 (12:13 -0500)]
Add documentation for Viewer

BUG=skia:5488

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

Change-Id: I635468f6a17576e990e159f7f02ba2f1946317ab
Reviewed-on: https://skia-review.googlesource.com/5682
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoMake *OpList::recordOp functions take sk_sp<GrOp> not GrOp*
Brian Salomon [Fri, 9 Dec 2016 21:32:23 +0000 (16:32 -0500)]
Make *OpList::recordOp functions take sk_sp<GrOp> not GrOp*

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

7 years agoRename testingOnly_drawBatch to testingOnly_addDrawOp and sk_sp
Brian Salomon [Fri, 9 Dec 2016 21:07:12 +0000 (16:07 -0500)]
Rename testingOnly_drawBatch to testingOnly_addDrawOp and sk_sp

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

7 years agobicubic, attempt gazillion
Mike Klein [Fri, 9 Dec 2016 21:25:44 +0000 (16:25 -0500)]
bicubic, attempt gazillion

    - explicitly separate bilinear_ stages in x and y too

BUG=skia:

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

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

7 years agoMake GrRenderTargetOpList::addDrawOp use sk_sp
Brian Salomon [Fri, 9 Dec 2016 21:01:53 +0000 (16:01 -0500)]
Make GrRenderTargetOpList::addDrawOp use sk_sp

Change-Id: I1b3aee2c16075bc481d96052a82f3b3da82061fe
Reviewed-on: https://skia-review.googlesource.com/5699
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoFix comment formatting for GrRenderTargetContext::drawArc
Brian Salomon [Fri, 9 Dec 2016 20:51:31 +0000 (15:51 -0500)]
Fix comment formatting for GrRenderTargetContext::drawArc

Change-Id: I23c946ff42964613a925b98c4ce5cf674b3b61a8
Reviewed-on: https://skia-review.googlesource.com/5705
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agotools and docs: clean up gyp-specific things
Hal Canary [Fri, 9 Dec 2016 20:38:13 +0000 (15:38 -0500)]
tools and docs: clean up gyp-specific things

BUG=skia:

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

Change-Id: Iadc436a68cbf7ec0d1dd3c019072eb28bf589bb6
Reviewed-on: https://skia-review.googlesource.com/5770
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRelandx2 "Remove antialiasing control from GrPaint."
Brian Salomon [Fri, 9 Dec 2016 20:10:07 +0000 (15:10 -0500)]
Relandx2 "Remove antialiasing control from GrPaint."

Fixes a bad merge.

This reverts commit 073285c0595d46205d1482cc19af2d7d891bfeae.

Change-Id: I5e92339d9b33d3a6dc58b9fcd2a1b3a5684e8f8a
Reviewed-on: https://skia-review.googlesource.com/5774
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoremove Building with Skia Tutorial
Mike Klein [Fri, 9 Dec 2016 17:43:41 +0000 (12:43 -0500)]
remove Building with Skia Tutorial

It's mostly "How to Effectively Fight with GYP", which is no longer interesting.

BUG=skia:6043

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

Change-Id: I760e8d9c6577846b34d8f1f0d2e37b5a3c553ccf
Reviewed-on: https://skia-review.googlesource.com/5761
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoPlumb dst color space in many places, rather than "mode"
Brian Osman [Fri, 9 Dec 2016 19:51:59 +0000 (14:51 -0500)]
Plumb dst color space in many places, rather than "mode"

This is less to type in most cases, and gives us more information
(for things like picture-backed images, where we need to know all
about the destination surface).

Additionally, strip out the plumbing entirely for bitmap sources,
where we don't need to know anything.

BUG=skia:

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

7 years agoRevert "Reland "Remove antialiasing control from GrPaint.""
Brian Salomon [Fri, 9 Dec 2016 20:02:08 +0000 (20:02 +0000)]
Revert "Reland "Remove antialiasing control from GrPaint.""

This reverts commit 3944484020d98ff8f386378296106c321279482b.

Reason for revert: Merges badly with a recent change. Will rebase and reland.

Original change's description:
> Reland "Remove antialiasing control from GrPaint."
>
> This contains fixes for GLPrograms test and mixed samples rendering.
>
> This reverts commit 419d81eed4a010e6080db199795117cbedf9e6e4.
>
> BUG=skia:
>
> Change-Id: If8f002fbfaaaab6d1607403f2b15ccc7f1e17e87
> Reviewed-on: https://skia-review.googlesource.com/5763
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>

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

Change-Id: Iff9657041e28604a845bc5a9acec7c9b248c53bd
Reviewed-on: https://skia-review.googlesource.com/5772
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoReland "Remove antialiasing control from GrPaint."
Brian Salomon [Fri, 9 Dec 2016 19:06:38 +0000 (14:06 -0500)]
Reland "Remove antialiasing control from GrPaint."

This contains fixes for GLPrograms test and mixed samples rendering.

This reverts commit 419d81eed4a010e6080db199795117cbedf9e6e4.

BUG=skia:

Change-Id: If8f002fbfaaaab6d1607403f2b15ccc7f1e17e87
Reviewed-on: https://skia-review.googlesource.com/5763
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRemove SkImage::makeTextureImage
Brian Osman [Mon, 5 Dec 2016 21:12:48 +0000 (16:12 -0500)]
Remove SkImage::makeTextureImage

No one (other than test code) was using this API, and it lacks the context
to do the right thing. Specifically, if this forces a decode of an encoded
image, we don't know the intended use (re: color spaces) to determine how
we should decode.

BUG=skia:

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

7 years agoDifferent approach to fixing gpu blurs on platforms that "useDrawInsteadOfClear"
Robert Phillips [Fri, 9 Dec 2016 18:35:02 +0000 (13:35 -0500)]
Different approach to fixing gpu blurs on platforms that "useDrawInsteadOfClear"

This CL reverts https://skia-review.googlesource.com/c/5148/ (Fix gpu blurring on platforms that "useDrawInsteadOfClear") (all the worstCaseWidth/Height stuff) and adds a new GrRenderTargetContext entry point (absClear) to specify clears that can't be discarded or altered.

BUG=skia:

Change-Id: I18b1373ecf4a153ca8c0f290ab8b1d00770426da
Reviewed-on: https://skia-review.googlesource.com/5484
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoMove 6p arm64 CPU tests to Pixel C
Kevin Lubick [Fri, 9 Dec 2016 16:11:33 +0000 (11:11 -0500)]
Move 6p arm64 CPU tests to Pixel C

We have much more capacity on the Pixel Cs.

BUG=skia:

Change-Id: I65e136d5e2f44ec4bef9c168a86e706537878532
Reviewed-on: https://skia-review.googlesource.com/5755
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoMake command buffer sRGB mip-mapping more predictable
Brian Osman [Fri, 9 Dec 2016 15:55:23 +0000 (10:55 -0500)]
Make command buffer sRGB mip-mapping more predictable

BUG=chrome:655247

Change-Id: I1c987939ac224075cdd385c879dd091fb0efd82a
Reviewed-on: https://skia-review.googlesource.com/5753
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoRevert "SkImageEncoder::* going away"
Herb Derby [Fri, 9 Dec 2016 17:07:10 +0000 (17:07 +0000)]
Revert "SkImageEncoder::* going away"

Breaks 5 compiles on google3.

This reverts commit 3489b2b727bfb725d45208049e82309280b79ad8.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> SkImageEncoder::* going away
>
> Approval from https://review.skia.org/5006
> TBR=reed@google.com
>
> Change-Id: Ib5fb1b624594598e2316f9247069ecd207d7a974
> Reviewed-on: https://skia-review.googlesource.com/5751
> Reviewed-by: Hal Canary <halcanary@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>
>

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

Change-Id: I0c0b863056c90435374769e85fb08c1b2f5113a2
Reviewed-on: https://skia-review.googlesource.com/5760
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoRun bin/fetch-gn as a gclient hook.
Mike Klein [Fri, 9 Dec 2016 16:31:28 +0000 (11:31 -0500)]
Run bin/fetch-gn as a gclient hook.

Seems like the bots don't run hooks.  That's okay, even ideal.
They'll keep getting GN via recipes.

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

Change-Id: I000bad3390dddaeb4548972f29c96b8b3288ea6c
Reviewed-on: https://skia-review.googlesource.com/5725
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
7 years agoclean up old Makefiles
Hal Canary [Fri, 9 Dec 2016 15:57:39 +0000 (10:57 -0500)]
clean up old Makefiles

BUG=skia:

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

7 years agodocs: Use the new floating ment on skpaint.md
Joe Gregorio [Fri, 9 Dec 2016 16:27:30 +0000 (11:27 -0500)]
docs: Use the new floating ment on skpaint.md

Screenshot:
  https://screenshot.googleplex.com/C3E0hpuNwdu.png
  https://screenshot.googleplex.com/vdfQMRc24Nv.png

BUG=skia:

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

Change-Id: I00b1bb01cab05592d19f020f3190576bf7907aa2
Reviewed-on: https://skia-review.googlesource.com/5757
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>

7 years agoSkImageEncoder::* going away
Hal Canary [Fri, 9 Dec 2016 15:10:27 +0000 (10:10 -0500)]
SkImageEncoder::* going away

Approval from https://review.skia.org/5006
TBR=reed@google.com

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

7 years ago[SVGDom] Clipped clipPath support
Florin Malita [Thu, 8 Dec 2016 21:04:24 +0000 (16:04 -0500)]
[SVGDom] Clipped clipPath support

ClipPaths can be clipped too, e.g.:

  <clipPath id="clip1" clip-path="url(#clip2)">...</clipPath>

Since we're not really drawing clips but resolving their geometry,
asPath() needs to take composed clipping into account (and intersect as
needed).

R=reed@google.com,robertphillips@google.com,stephana@google.com

Change-Id: I25959e22fe50f72042147cfe6b416b6b9ac20cd4
Reviewed-on: https://skia-review.googlesource.com/5720
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoupdate Win/Android toolchain setup after rolling GN
Mike Klein [Fri, 9 Dec 2016 15:32:28 +0000 (10:32 -0500)]
update Win/Android toolchain setup after rolling GN

The new GN doesn't like "ar = ar + ...", etc.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Win-Clang-arm64-Release-Android

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

7 years agoDon't compile the Skia tools for PDK builds.
Derek Sollenberger [Fri, 9 Dec 2016 14:35:50 +0000 (09:35 -0500)]
Don't compile the Skia tools for PDK builds.

Change-Id: I9d64a065bf05d76e131b2d0ab73d136ebbae263f
Reviewed-on: https://skia-review.googlesource.com/5746
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>

7 years agoCommit Queue: Add NoGPU build bot.
Hal Canary [Fri, 9 Dec 2016 15:03:54 +0000 (10:03 -0500)]
Commit Queue: Add NoGPU build bot.

BUG=skia:6040

Change-Id: Iaf0684b844234c6331f6ca8d97769abf566c18d7
Reviewed-on: https://skia-review.googlesource.com/5749
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoDo not create SkGifCodec if true size is not known
Leon Scroggins III [Thu, 8 Dec 2016 16:54:04 +0000 (11:54 -0500)]
Do not create SkGifCodec if true size is not known

If there is enough data in the stream to read the reported canvas size,
but not enough to read the first image's header, we do not know the
true canvas size, since we may expand it to fit the first frame. In
that case, return nullptr from NewFromStream.

Add a test.

SkGifCodec.cpp:
Correct a comment - parse returns false if there is a fatal error.
parse() returning true does not guarantee that the size was found.
Instead of checking the width and height, check to see whether the
first frame exists and has its header defined. If not, we do not yet
know the true canvas size. Assert that the canvas size is non-zero,
which is a fatal error from parse.

SkGifImageReader.cpp:
Move the code to set the header defined before the SkGIFSizeQuery exit
condition. This allows SkGifCodec to check the first frame's header to
determine whether the size is known.

GifTest.cpp:
Add a test which truncates the file just before the image header (and
after the global header). Prior to the other changes, this would create
an SkCodec. For an image that needs its canvas size expanded, the
SkCodec would have an incorrect size.

CodecPartialTest.cpp:
randPixels.gif now needs more than half of its data to create an
SkCodec, so set a minimum for test_partial.

Change-Id: I40482f524128b2f1fe59b8f27dd64c7cbe793079
Reviewed-on: https://skia-review.googlesource.com/5701
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoRevert "Revert "Add antialiasing to SkDropShadowImageFilter's shadow draw""
Robert Phillips [Fri, 9 Dec 2016 14:39:35 +0000 (14:39 +0000)]
Revert "Revert "Add antialiasing to SkDropShadowImageFilter's shadow draw""

This reverts commit 45aac57ac6195880930441656a0988453f16c3db.

Reason for revert:

Pixel test suppression has landed in Chrome:
https://codereview.chromium.org/2559213002 (Add suppression for GPU Pixel test in preparation for Skia CL)

Original change's description:
> Revert "Add antialiasing to SkDropShadowImageFilter's shadow draw"
>
> This reverts commit 78e8165ec3a408a88c394095bfbc43df2051449d.
>
> Reason for revert: Chrome pixel test
>
> Original change's description:
> > Add antialiasing to SkDropShadowImageFilter's shadow draw
> >
> > A BW draw in the SkDropShadowImageFilter can lead to unexpected popping of the shadow when the dest rect lies on half pixel boundaries.
> >
> > Change-Id: Ibc59dacc79bca8955981ec2889e79facd7d2de83
> > Reviewed-on: https://skia-review.googlesource.com/5669
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> >
>
> TBR=bsalomon@google.com,robertphillips@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I0b0073cd8d9f1502daaa452c2153af029c11e52a
> Reviewed-on: https://skia-review.googlesource.com/5652
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>

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

Change-Id: I7d844c486fd6db57d3df60a32c12699f2d85ad16
Reviewed-on: https://skia-review.googlesource.com/5747
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRevert[2] "remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS"
Mike Reed [Fri, 9 Dec 2016 14:00:50 +0000 (09:00 -0500)]
Revert[2] "remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS"

This reverts commit a129dfef2aaab0b5995cdf1ab7b2cdd41c29cf72.

BUG=skia:

Change-Id: I717de6e5fcd4516aa684b014b1414b0f82ac2b91
Reviewed-on: https://skia-review.googlesource.com/5722
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
7 years agoRoll GN
Mike Klein [Fri, 9 Dec 2016 14:01:53 +0000 (09:01 -0500)]
Roll GN

Mostly to get
    5d7f4ce [GN] Fix generate Xcode project for macOS to work with Xcode 8.

After this lands, gclient sync && python bin/fetch-gn to get the new GN.

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

7 years agoRevert "remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS"
Mike Reed [Fri, 9 Dec 2016 13:14:25 +0000 (13:14 +0000)]
Revert "remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS"

This reverts commit 8e7432b7f98dd592e529a0c8bb038d73ebfb0478.

Reason for revert: <INSERT REASONING HERE>

external/skia/bench/../tools/android/SkAndroidSDKCanvas.h:103:36: error: C++ requires a type specifier for all declarations
    void onClipRect(const SkRect&, ClipOp, ClipEdgeStyle) override;

Original change's description:
> remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS
>
>
> switch over to SkClipOps now that SK_SUPPORT_LEGACY_CLIP_REGIONOPS is gone
>
> BUG=skia:
>
> Change-Id: Ifdc8b3746d508348a40cc009a4e529a1cb3c405d
> Reviewed-on: https://skia-review.googlesource.com/5714
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>

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

Change-Id: If26ea91d7464615e43c1d3d2f726e337ff56b55c
Reviewed-on: https://skia-review.googlesource.com/5721
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoAdd the ability to use different mallocs.
Herb Derby [Fri, 9 Dec 2016 00:00:40 +0000 (19:00 -0500)]
Add the ability to use different mallocs.

gn gen --args='malloc="tcmalloc"'
gn gen --args='malloc="jemalloc"'

or if the library is in a non-standard directory
gn gen --args='malloc="tcmalloc" extra_ldflags="-L<path-to-library>"'

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

7 years agofix fuzzers
Cary Clark [Thu, 8 Dec 2016 21:17:56 +0000 (16:17 -0500)]
fix fuzzers

Two crashes and a hang. Abort and return false
in these cases.

TBR=kjlubick@google.com
BUG=skia:5983

Change-Id: I41ac3e56d47ee423b634b2f4886085b9caada76b
Reviewed-on: https://skia-review.googlesource.com/5716
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>

7 years agoremove SK_SUPPORT_LEGACY_CLIP_REGIONOPS
Mike Reed [Thu, 8 Dec 2016 21:06:37 +0000 (16:06 -0500)]
remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS

switch over to SkClipOps now that SK_SUPPORT_LEGACY_CLIP_REGIONOPS is gone

BUG=skia:

Change-Id: Ifdc8b3746d508348a40cc009a4e529a1cb3c405d
Reviewed-on: https://skia-review.googlesource.com/5714
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoRemove documentation about emboss.
Joe Gregorio [Thu, 8 Dec 2016 16:58:52 +0000 (11:58 -0500)]
Remove documentation about emboss.

BUG=skia:

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

Change-Id: Iac133df3778061509f5754aa6a742cebc2ab6ba6
Reviewed-on: https://skia-review.googlesource.com/5708
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>

7 years agosimplify bug
Cary Clark [Thu, 8 Dec 2016 19:36:32 +0000 (14:36 -0500)]
simplify bug

The path contains a cubic with a very tight curve.
Split the cubic into pieces so that the individual
curves are better behaved.

Use both inflections and max curvature to
potentially split cubics. Since this may require
a bit of work, preflight to ignore cubics that
monotonically change in x and y.

Only one of the three tests referred to by the bug
below repro'd. Use path.dumpHex() instead of
path.dump() to capture the crashing data.

TBR=reed@google.com
BUG=skia:6041

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

7 years agoremove SK_SUPPORT_LEGACY_CLIP_REGIONOPS flag
Mike Reed [Thu, 8 Dec 2016 20:01:33 +0000 (15:01 -0500)]
remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS flag

BUG=skia:

Change-Id: I57871d008d3e630369edcef5473a1f1d1f0c0822
NOTRY=True
Reviewed-on: https://skia-review.googlesource.com/5715
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoremove SK_SUPPORT_LEGACY_REFENCODEDDATA_NOCTX flag
Mike Reed [Thu, 8 Dec 2016 18:41:10 +0000 (13:41 -0500)]
remove SK_SUPPORT_LEGACY_REFENCODEDDATA_NOCTX flag

BUG=skia:

Change-Id: I51b7778db8b596b2633b6be9488af984cee2af70
Reviewed-on: https://skia-review.googlesource.com/5713
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agoRemoved non-Identity matrix in non-PCSXYZ Input check for ICC profiles
raftias [Thu, 8 Dec 2016 16:56:34 +0000 (11:56 -0500)]
Removed non-Identity matrix in non-PCSXYZ Input check for ICC profiles

The presence seems to be disallowed in the specs (10.8/10.9), but two
test images on the ICC website have them, and fail if we abort. Replaced
the failure with a print warning.

BUG=skia:

Change-Id: I463f1a8861eaa0eb62081c3213017dba9012c890
Reviewed-on: https://skia-review.googlesource.com/5658
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Robert Aftias <raftias@google.com>

7 years agoRevert "Remove antialiasing control from GrPaint."
Brian Salomon [Thu, 8 Dec 2016 16:57:38 +0000 (16:57 +0000)]
Revert "Remove antialiasing control from GrPaint."

This reverts commit 9f549358b3ac9f61e78b194e39d6ac6eb322e35e.

Reason for revert: hitting asserts

Change-Id: I542d34edc05ecf72b7646263f25736a0950c78e7
Reviewed-on: https://skia-review.googlesource.com/5707
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agolibviewer.so on Android, delete hello_skia_app
Mike Klein [Thu, 8 Dec 2016 14:49:39 +0000 (09:49 -0500)]
libviewer.so on Android, delete hello_skia_app

This spins off parts of 5620 to bake while we work through how to do the rest of libviewer.so -> viewer.apk.

Change-Id: I1cbf135cc952eeb7593e80a5a752dcadaa2dbb00
Reviewed-on: https://skia-review.googlesource.com/5656
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoRemove antialiasing control from GrPaint.
Brian Salomon [Thu, 8 Dec 2016 15:35:19 +0000 (10:35 -0500)]
Remove antialiasing control from GrPaint.

This adds an additional param (of new enum type GrAA) to draws that can antialias and a new enum GrAAType to indicate the AA technique (none, fragment shader computed coverage, msaa).

Some GMs change due to this:
1) In some places we weren't disabling MSAA when the draw was supposed to be unantialiased.
2) Some bounding rect draws that use GrFragmentProcessors were unnecessarily turning on antialiasing, by disabling it a very small number of pixel LSBs change.

Change-Id: I7d8d8793dda70bcd373d09055beb9949c1a8a4d0
Reviewed-on: https://skia-review.googlesource.com/5608
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoOn mips64el, use -B instead of linking .o manually.
Mike Klein [Thu, 8 Dec 2016 15:29:27 +0000 (10:29 -0500)]
On mips64el, use -B instead of linking .o manually.

These .o are only appropriate for linking executables; others would be used if we link an .so.

-B turns out to be the flag we really wanted here anyway, adding that directory to the search path for all these .o files, letting Clang pick the right one.  The existing comment is now correct for both the lib_dirs and ldflags +=.

Change-Id: I66d9aada12477756142726828cf66c142ca76a48
Reviewed-on: https://skia-review.googlesource.com/5657
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agoAdded some named gamma recognition to lutnType ICC profile parsing
raftias [Mon, 5 Dec 2016 19:21:45 +0000 (14:21 -0500)]
Added some named gamma recognition to lutnType ICC profile parsing

Most CMYK images I tested had linear gamma specified as tables, which
is easily recognized and when present allows an entire SkRasterPipeline
stage to be avoided for every single channel. This is likely due to the
fact that gamma tables are required in lutntype A2B0 profiles.

BUG=skia:

Change-Id: I82b65848c4099035d61098abb66e9afe0b080930
Reviewed-on: https://skia-review.googlesource.com/5388
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Robert Aftias <raftias@google.com>

7 years agoFix bitmap-image srgb gm
Matt Sarett [Thu, 8 Dec 2016 13:32:44 +0000 (08:32 -0500)]
Fix bitmap-image srgb gm

This changed behavior when asLegacyBitmap() was modified to always
initiate a decode in legacy mode.

This fixes the gm to work as originally intended.

BUG=skia:

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

7 years agoAdded clamps in SkRasterPipeline's gamma stages.
raftias [Mon, 5 Dec 2016 21:30:41 +0000 (16:30 -0500)]
Added clamps in SkRasterPipeline's gamma stages.

Clamping stages were also removed from SkColorSpace_A2B as they are now
not needed.

BUG=skia:

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

Change-Id: I24e2e411e12b463854e980cb10c0e6bafb4a7c42
Reviewed-on: https://skia-review.googlesource.com/5546
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Robert Aftias <raftias@google.com>

7 years agoRoll third_party/externals/freetype 4d3f7ca8cedb..ffd8f622360
Ben Wagner [Wed, 7 Dec 2016 20:43:03 +0000 (20:43 +0000)]
Roll third_party/externals/freetype 4d3f7ca8cedb..ffd8f622360

https://skia.googlesource.com/third_party/freetype2.git/+log/4d3f7ca8cedb..ffd8f622360

Change-Id: Ia9d8af09253d0aff343c2310f5eb8c934b2ebbda
Reviewed-on: https://skia-review.googlesource.com/5685
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

7 years agoAdd .clang-format file to include/gpu src/gpu
Brian Salomon [Thu, 8 Dec 2016 14:21:00 +0000 (09:21 -0500)]
Add .clang-format file to include/gpu src/gpu

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

7 years ago[SVGDom] ClipPath support
Florin Malita [Thu, 8 Dec 2016 14:26:47 +0000 (09:26 -0500)]
[SVGDom] ClipPath support

  * clip-path attribute handling
  * clipPath container element
  * asPath() SkSVGNode virtual for capturing subtree geometry

R=robertphillips@google.com,stephana@google.com

Change-Id: I9597534fe3047b631da6309eafac055dff5696e9
Reviewed-on: https://skia-review.googlesource.com/5650
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>

7 years agoAdd fuzzing for decoding animated images
Leon Scroggins III [Thu, 8 Dec 2016 14:07:56 +0000 (09:07 -0500)]
Add fuzzing for decoding animated images

Add a new mode to decode all frames of an animated image. Use
incremental decoding, rather than getPixels, since the primary client
uses incremental decoding.

Do not decode animated as index 8, which is only supported for the
first frame.

Change-Id: I5d7ed1a81c1ef37df3701c483486d4beff0f62a7
Reviewed-on: https://skia-review.googlesource.com/5679
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoMake sure all the convolve functions are defined.
Mike Klein [Thu, 8 Dec 2016 02:36:49 +0000 (21:36 -0500)]
Make sure all the convolve functions are defined.

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

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

7 years agoadd missing []
Mike Klein [Thu, 8 Dec 2016 02:10:37 +0000 (21:10 -0500)]
add missing []

BUG=skia:6039

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

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

7 years agoAdd AVX2 version of ConvolveVertically
xiangze.zhang [Thu, 8 Dec 2016 01:54:04 +0000 (17:54 -0800)]
Add AVX2 version of ConvolveVertically

ConvolveVertically time is reduced about 60% using haswell cpu.
Nanobench results:
                             before    after
bitmap_scale_filter_64_256    611us    302us
bitmap_scale_filter_80_90     101us    64.9us
bitmap_scale_filter_30_90    82.3us    51.4us
bitmap_scale_filter_10_90    73.6us    42.4us

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2526733002
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Review-Url: https://codereview.chromium.org/2526733002

7 years agoRevert "Add antialiasing to SkDropShadowImageFilter's shadow draw"
Robert Phillips [Thu, 8 Dec 2016 00:16:21 +0000 (00:16 +0000)]
Revert "Add antialiasing to SkDropShadowImageFilter's shadow draw"

This reverts commit 78e8165ec3a408a88c394095bfbc43df2051449d.

Reason for revert: Chrome pixel test

Original change's description:
> Add antialiasing to SkDropShadowImageFilter's shadow draw
>
> A BW draw in the SkDropShadowImageFilter can lead to unexpected popping of the shadow when the dest rect lies on half pixel boundaries.
>
> Change-Id: Ibc59dacc79bca8955981ec2889e79facd7d2de83
> Reviewed-on: https://skia-review.googlesource.com/5669
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>

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

Change-Id: I0b0073cd8d9f1502daaa452c2153af029c11e52a
Reviewed-on: https://skia-review.googlesource.com/5652
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRename GrBatchFlushState to GrOpFlushState
Brian Salomon [Wed, 7 Dec 2016 22:06:19 +0000 (17:06 -0500)]
Rename GrBatchFlushState to GrOpFlushState

Change-Id: I1a8052c61d7624929caf45ba44e2a465cd0dc1c2
Reviewed-on: https://skia-review.googlesource.com/5649
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoRename GrRTC::drawBatch to addDrawOp and local vars in GrRTC.cpp
Brian Salomon [Wed, 7 Dec 2016 21:44:58 +0000 (16:44 -0500)]
Rename GrRTC::drawBatch to addDrawOp and local vars in GrRTC.cpp

Change-Id: Ic8b896d7779844de5f82f9f0e630508578a8f61d
Reviewed-on: https://skia-review.googlesource.com/5647
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agono need for SK_SUPPORT_LEGACY_CANVAS_IS_REFCNT anymore
Mike Reed [Wed, 7 Dec 2016 21:52:58 +0000 (16:52 -0500)]
no need for SK_SUPPORT_LEGACY_CANVAS_IS_REFCNT anymore

BUG=skia:

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