platform/upstream/libSkiaSharp.git
6 years agoAdd drawImageNine and drawBitmapNine to the C API
Matthew Leibowitz [Thu, 30 Nov 2017 07:52:07 +0000 (09:52 +0200)]
Add drawImageNine and drawBitmapNine to the C API

6 years agoAdded a member to swizzle the R and B
Matthew Leibowitz [Thu, 2 Nov 2017 22:04:04 +0000 (00:04 +0200)]
Added a member to swizzle the R and B

6 years agoAdding support for watchOS
Matthew Leibowitz [Thu, 31 Aug 2017 01:38:31 +0000 (03:38 +0200)]
Adding support for watchOS

6 years agoUpdated the python to work on non-Windows
Matthew Leibowitz [Tue, 29 Aug 2017 14:09:04 +0000 (16:09 +0200)]
Updated the python to work on non-Windows

6 years agoreturn an error if no VS or MSVC is found
Matthew Leibowitz [Mon, 28 Aug 2017 20:57:06 +0000 (22:57 +0200)]
return an error if no VS or MSVC is found

6 years agowe can't assume a version of MSVC
Matthew Leibowitz [Mon, 28 Aug 2017 20:35:30 +0000 (22:35 +0200)]
we can't assume a version of MSVC

6 years agoBetter build scripts for VS2017 and VS2015 support
Matthew Leibowitz [Mon, 28 Aug 2017 16:38:29 +0000 (18:38 +0200)]
Better build scripts for VS2017 and VS2015 support

6 years agoAdded the conversion member
Matthew Leibowitz [Mon, 21 Aug 2017 19:58:19 +0000 (21:58 +0200)]
Added the conversion member

6 years agoAdded bindings for SkPixelSerializer
Matthew Leibowitz [Mon, 21 Aug 2017 18:33:56 +0000 (20:33 +0200)]
Added bindings for SkPixelSerializer

6 years agoReplace log2 with SkNextLog2
Brian Osman [Fri, 11 Aug 2017 17:34:02 +0000 (13:34 -0400)]
Replace log2 with SkNextLog2

log2 didn't exist on Android until API 18, and it's doing double
precision math. I think this integer version is what we want?

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

6 years agoWe have to use portable code with SkJumper on tvOS
Matthew Leibowitz [Fri, 11 Aug 2017 12:16:10 +0000 (14:16 +0200)]
We have to use portable code with SkJumper on tvOS

6 years agoA few more type changes...
Matthew Leibowitz [Thu, 10 Aug 2017 23:56:19 +0000 (01:56 +0200)]
A few more type changes...

6 years agoThe C++ now compiles
Matthew Leibowitz [Thu, 10 Aug 2017 23:44:24 +0000 (01:44 +0200)]
The C++ now compiles

6 years agoThese files appear to have been mis-merged
Matthew Leibowitz [Thu, 10 Aug 2017 23:06:38 +0000 (01:06 +0200)]
These files appear to have been mis-merged

6 years agoMerge branch 'chrome/m60' into update-m60
Matthew Leibowitz [Thu, 10 Aug 2017 22:58:50 +0000 (00:58 +0200)]
Merge branch 'chrome/m60' into update-m60

6 years agoClip FreeType glyph bitmap to mask.
Ben Wagner [Thu, 15 Jun 2017 14:43:17 +0000 (10:43 -0400)]
Clip FreeType glyph bitmap to mask.

Skia has for some time assumed that when using FT_Render_Glyph with one
of the LCD render modes that one extra pixel would be applied to each
side of the resulting bitmap. FreieType has changed to make this more
conservative when possible, so the pre-allocated SkMask and the generated
FT_Bitmap may no longer agree on the size and origin.

This change ensures the SkMask and FT_Bitmap are the same size and their
origins align. This is not an ideal long term fix, but is both simple and
localized for easy and quick back-porting, should that become necessary.

BUG=skia:6663

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

BUG=chromium:726631

Change-Id: I9740bc7df544b402720caaf97244ff1fb05f3b81
Cherry-Pick: 6cdb5f2ad7684302a8a66217462d2aef4c5f4632
Approval: https://crbug.com/726631#c69
Reviewed-on: https://skia-review.googlesource.com/28185
Reviewed-by: Ben Wagner <bungeman@google.com>
7 years agoCheck first deserialized verb of path is a move.
Ben Wagner [Tue, 11 Jul 2017 18:39:36 +0000 (14:39 -0400)]
Check first deserialized verb of path is a move.

SkPathRef::Iter::next and several other bits of code depend on the first
verb of a path always being a move. Contructors and builders currently
enforce this, so the deserializer must do so also.

BUG=chromium:740789

Reviewed-on: https://skia-review.googlesource.com/22216
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: I1b02b35ac9f741057c026c241cf17cab04f0d239
Cherry-pick: 52e4fd98b5c6b296e4598f3243a891bc76715590
Approval: https://crbug.com/740789#c12
Reviewed-on: https://skia-review.googlesource.com/24123
Reviewed-by: Ben Wagner <bungeman@google.com>
7 years agoAdditional colorspace APIs
Matthew Leibowitz [Tue, 11 Jul 2017 19:57:16 +0000 (21:57 +0200)]
Additional colorspace APIs

7 years agoWinRT ARM does not have the macro assembler
Matthew Leibowitz [Mon, 10 Jul 2017 22:34:31 +0000 (00:34 +0200)]
WinRT ARM does not have the macro assembler

7 years agomake sure the ml command is correct
Matthew Leibowitz [Mon, 10 Jul 2017 22:14:40 +0000 (00:14 +0200)]
make sure the ml command is correct

7 years agoUndo change
Matthew Leibowitz [Mon, 10 Jul 2017 22:12:18 +0000 (00:12 +0200)]
Undo change

7 years agoMerge branch 'xamarin-mobile-bindings' into update-m59
Matthew Leibowitz [Mon, 10 Jul 2017 20:54:45 +0000 (22:54 +0200)]
Merge branch 'xamarin-mobile-bindings' into update-m59

7 years agoMerge branch 'chrome/m59' into update-m59
Matthew Leibowitz [Mon, 10 Jul 2017 19:18:07 +0000 (21:18 +0200)]
Merge branch 'chrome/m59' into update-m59

7 years agoLoad FreeType glyph bitmap before emboldening.
Ben Wagner [Mon, 26 Jun 2017 16:47:33 +0000 (12:47 -0400)]
Load FreeType glyph bitmap before emboldening.

If a bitmap glyph was loaded with FT_LOAD_BITMAP_METRICS_ONLY then the
glyph must be re-loaded without this flag before accessing the bitmap.

BUG=chromium:725975

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

Cherry-Pick: c3aef18419c1bb16951370e11758c7ef131fa10b
Approval: https://crbug.com/725975#c24

7 years ago[M60 cherry pick] Suppress rendererability of kAlpha8 GL_CHROMIUM_framebuffer_multisa...
Robert Phillips [Thu, 22 Jun 2017 17:52:50 +0000 (13:52 -0400)]
[M60 cherry pick] Suppress rendererability of kAlpha8 GL_CHROMIUM_framebuffer_multisample for ANGLE D3D9

For ANGLE D3D9 ES2 we're seeing GL_CHROMIUM_framebuffer_multisample but not GL_ANGLE_framebuffer_multisample.
The same occurs for ANGLE D3D11 ES2 but kAlpha8 is renderable in that case.

TBR=bsalomon@google.com

No-Tree-Checks: true
No-Try: true
No-Presubmit: true
Bug: 730082
Change-Id: I2b1ca8da85428426ccdfd2c31d1aa0fd59acb8f9
Reviewed-on: https://skia-review.googlesource.com/20513
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoReland DeferredTextureImageData low-bit-depth/dithering support
Eric Karl [Fri, 16 Jun 2017 16:08:15 +0000 (09:08 -0700)]
Reland DeferredTextureImageData low-bit-depth/dithering support

Merge to M60

Cause DeferredTextureImageData functionality to support low bit depth
(4444, 565) image formats (with dithering).

Updated to handle colorspace + 4444 colortype correctly.

No-Tree-Checks: true
No-Try: true
No-Presubmit: true
Bug: 720105
Change-Id: Ib7e14d937849f4f6b08fda6992a240bb203d0089
Reviewed-On: https://skia-review.googlesource.com/19094
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-By: Brian Salomon <bsalomon@google.com>
Reviewed-on: https://skia-review.googlesource.com/20128

7 years agoFix use of uninitialized value in SkColor4Shader::CreateProc
Mike Reed [Fri, 16 Jun 2017 15:18:23 +0000 (11:18 -0400)]
Fix use of uninitialized value in SkColor4Shader::CreateProc

cherry-picking fix 2e425ebd95dd97f788f7f8a3b8529d77d69b4f61

No-Tree-Checks: true
No-Try: true
No-Presubmit: true
Bug: chromium:727678
Change-Id: I4c59d9222d47b866b3c30408322ec456f304aa53
Reviewed-On: https://skia-review.googlesource.com/18938
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-By: Mike Klein <mtklein@chromium.org>
Reviewed-on: https://skia-review.googlesource.com/20147
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years ago[M60 cherry-pick] Disable deferred proxies for M60 branch
Robert Phillips [Mon, 5 Jun 2017 15:04:56 +0000 (11:04 -0400)]
[M60 cherry-pick] Disable deferred proxies for M60 branch

No-Tree-Checks: true
No-Try: true
No-Presubmit: true
Bug: 720325
Change-Id: I215af7db2536a27c941f5f1ff6f2af8cf41f4189
Reviewed-on: https://skia-review.googlesource.com/18592
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years ago[M60 cherry pick] Initialize rects in SkValidatingReadBuffer readRect & readIRect...
Robert Phillips [Wed, 31 May 2017 13:59:34 +0000 (09:59 -0400)]
[M60 cherry pick] Initialize rects in SkValidatingReadBuffer readRect & readIRect on failure

TBR=reed@google.com

No-Tree-Checks: true
No-Try: true
No-Presubmit: true
Bug: 726199
Change-Id: Ibaf5391d01565a522d3230cd6ac066cc522ad739
Reviewed-on: https://skia-review.googlesource.com/18226
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoGrTessellator: fix for three edges becoming collinear after splitting.
Stephen White [Tue, 30 May 2017 22:04:09 +0000 (18:04 -0400)]
GrTessellator: fix for three edges becoming collinear after splitting.

In rare cases, a single edge can become collinear with two adjacent
neighbour edges after it's split. The solution is to continue to merge
until no collinear edges are found.

BUG=722000

[Cherry-pick of 6eca90fea6548bfb2f5c30f391cc0caa6b1de04f to the chrome/m60 branch.]

No-Tree-Checks: true
No-Try: true
No-Presubmit: true
Change-Id: Ia5dd212b7acfb40ed1d6c74ebfa9e4a4746fe40a
Reviewed-On: https://skia-review.googlesource.com/17963
Reviewed-By: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-on: https://skia-review.googlesource.com/18161
Reviewed-by: Stephen White <senorblanco@chromium.org>
7 years ago[m59] dither when converting to 4444
Matt Sarett [Thu, 25 May 2017 22:53:02 +0000 (18:53 -0400)]
[m59] dither when converting to 4444
NOTREECHECKS=true
NOTRY=true
NOPRESUBMIT=true
Bug: 720105
Change-Id: I2a3b8a56795403077151ccebed978a94f2350def

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

7 years agoRevert "Clear atlas textures at creation in Chrome"
Brian Salomon [Thu, 25 May 2017 20:28:19 +0000 (16:28 -0400)]
Revert "Clear atlas textures at creation in Chrome"

This reverts commit 8785df15fe5a57651597d138d3c5aea0ffe3f661.

Reason for revert: Chrome bug
Bug: chromium:726226

Original change's description:
> Clear atlas textures at creation in Chrome
>
> Bug: chromium:656320
> Change-Id: Ia65274aa733f199be188579821e745920493aefc
> Reviewed-on: https://skia-review.googlesource.com/17824
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>

TBR=bsalomon@google.com,robertphillips@google.com
Bug: chromium:656320

No-Tree-Checks: true
No-Try: true
No-Presubmit: true
Change-Id: Ibc4dd7f184866b58481f2dc7e7e88da9169e7adc
Reviewed-On: https://skia-review.googlesource.com/17988
Reviewed-By: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-on: https://skia-review.googlesource.com/17991

7 years agoInitialize blit framebuffer in GL even if not doing msaa
Greg Daniel [Thu, 25 May 2017 18:02:01 +0000 (14:02 -0400)]
Initialize blit framebuffer in GL even if not doing msaa

No-Tree-Checks: true
No-Try: true
No-Presubmit: true
Bug: skia:
Change-Id: I6b7290485e0c3123c62a50ec156738862e9ad18c
Reviewed-On: https://skia-review.googlesource.com/17926
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-By: Brian Salomon <bsalomon@google.com>
Reviewed-on: https://skia-review.googlesource.com/17980
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoadd stage for gaussian alpha to rgba for shadows
Mike Reed [Wed, 24 May 2017 20:45:34 +0000 (16:45 -0400)]
add stage for gaussian alpha to rgba for shadows

speeds up GM:shadow_utils 20%

Bug: skia:
Change-Id: If52dd5e2c76ace82d06351af1419e0663a3a634f
Reviewed-on: https://skia-review.googlesource.com/17844
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRevert "Add animated webp images to DM testing"
Leon Scroggins [Wed, 24 May 2017 21:23:58 +0000 (21:23 +0000)]
Revert "Add animated webp images to DM testing"

This reverts commit 6ecc373cde276ecf19d9599f7502b79ebf575936.

Reason for revert: skbug.com/6682

Original change's description:
> Add animated webp images to DM testing
>
> Change-Id: Idb6f95574136cbcb4fb45784a5bf1db3fa97ab32
> Reviewed-on: https://skia-review.googlesource.com/17832
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>
>

TBR=borenet@google.com,msarett@google.com,scroggo@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I6674dbb66a24e425b3432309a8f37e19cf484d48
Reviewed-on: https://skia-review.googlesource.com/17846
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoRevert "SkShaderBase"
Florin Malita [Wed, 24 May 2017 21:15:46 +0000 (21:15 +0000)]
Revert "SkShaderBase"

This reverts commit 58a756435ca3700d9766a4580bb0771a9774f603.

Reason for revert: g3, Android borkage.

Original change's description:
> SkShaderBase
>
> Introduce a private base class (SkShaderBase), to hide
> implementation details from the public interface (SkShader).
>
> Change-Id: If3ec26ca6abc9da20e3f139c11fdc023bdd85176
> Reviewed-on: https://skia-review.googlesource.com/17241
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
>

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

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

7 years agoEnable chromecast gpu perf
Kevin Lubick [Wed, 24 May 2017 19:30:35 +0000 (15:30 -0400)]
Enable chromecast gpu perf

The new #ifndef account for what the chromecast sdk
cannot handle (e.g. posix).

Bug: skia:6581
Change-Id: I3d64d25980d80185f8b95c05badee5f665d97cd3
Reviewed-on: https://skia-review.googlesource.com/13811
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoReduce absolute paths in generated ninja files in skia
Wei-Yin Chen (陳威尹) [Wed, 24 May 2017 07:59:19 +0000 (00:59 -0700)]
Reduce absolute paths in generated ninja files in skia

BUG=chromium:723856

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

7 years agoSkShaderBase
Florin Malita [Wed, 24 May 2017 19:33:28 +0000 (15:33 -0400)]
SkShaderBase

Introduce a private base class (SkShaderBase), to hide
implementation details from the public interface (SkShader).

Change-Id: If3ec26ca6abc9da20e3f139c11fdc023bdd85176
Reviewed-on: https://skia-review.googlesource.com/17241
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoAllow for non opaque colors for src-over lcd fallback case in gpu
Greg Daniel [Wed, 24 May 2017 19:27:46 +0000 (15:27 -0400)]
Allow for non opaque colors for src-over lcd fallback case in gpu

Since skia is currently requiring the dst to be opaque for lcd draws this
change is safe to make in terms of correctly. It will also be faster than
the current shader based blending.

Bug: chromium:725879
Change-Id: I0c14b80eb5ab819500afc55030df83d5ddbef94a
Reviewed-on: https://skia-review.googlesource.com/17840
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

7 years agoSkStream: DynamicMemoryWStream gets writeToAndReset
Hal Canary [Tue, 23 May 2017 15:47:05 +0000 (11:47 -0400)]
SkStream: DynamicMemoryWStream gets writeToAndReset

This is similar to copyToAndReset().

Also use this in SkPDF, for minor memory savings:
Single-threaded DM's peak RSS drops from 239MB
to 228MB.

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

7 years agoSkSTArenaAlloc
Florin Malita [Wed, 24 May 2017 18:53:44 +0000 (14:53 -0400)]
SkSTArenaAlloc

Syntactic sugar, gets rid of some boilerplate.

Change-Id: Ibdb28b7a8f1d5e4a4e18c12d423b987d7194e340
Reviewed-on: https://skia-review.googlesource.com/17837
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoUse rasterpipeline for drawVertices
Mike Reed [Wed, 24 May 2017 17:53:36 +0000 (13:53 -0400)]
Use rasterpipeline for drawVertices

Bug: skia:
Change-Id: If6da119ee98f26981cef9373162ddb526db77be5
Reviewed-on: https://skia-review.googlesource.com/17422
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
7 years agoalso run srgb config on SK_FORCE_RASTER_PIPELINE_BLITTER bot
Mike Klein [Wed, 24 May 2017 18:08:33 +0000 (14:08 -0400)]
also run srgb config on SK_FORCE_RASTER_PIPELINE_BLITTER bot

This helps make srgb triage easier.

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

7 years agobetter extend: alloc once, no recursion
Mike Klein [Wed, 24 May 2017 15:37:52 +0000 (11:37 -0400)]
better extend: alloc once, no recursion

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

7 years agoinline SkArenaAlloc::allocObject()
Mike Klein [Wed, 24 May 2017 16:19:02 +0000 (12:19 -0400)]
inline SkArenaAlloc::allocObject()

Call overhead does appear to be showing up on our profiles.

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

7 years agoAdd animated webp images to DM testing
Leon Scroggins III [Wed, 24 May 2017 15:39:51 +0000 (11:39 -0400)]
Add animated webp images to DM testing

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

7 years agoUpdate the SKP repository used by the CT bots
Ravi Mistry [Wed, 24 May 2017 13:18:03 +0000 (09:18 -0400)]
Update the SKP repository used by the CT bots

The SKP repository was updated in skbug.com/6666

The CT bots are:
* Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-CT_BENCH_1k_SKPs
* Perf-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Release-CT_BENCH_1k_SKPs
* Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_DM_100k_SKPs
* Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_IMG_DECODE_100k_SKPs
* Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_DM_1m_SKPs

BUG=skia:6676

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

7 years agoAdd GrContext API to report the number of purgeable bytes in the cache.
Derek Sollenberger [Wed, 24 May 2017 15:41:33 +0000 (11:41 -0400)]
Add GrContext API to report the number of purgeable bytes in the cache.

Change-Id: I1457eec9831736f386e3b3b80d9eac8dbb337a9b
Reviewed-on: https://skia-review.googlesource.com/17829
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>

7 years agoClear atlas textures at creation in Chrome
Brian Salomon [Wed, 24 May 2017 14:07:30 +0000 (10:07 -0400)]
Clear atlas textures at creation in Chrome

Bug: chromium:656320
Change-Id: Ia65274aa733f199be188579821e745920493aefc
Reviewed-on: https://skia-review.googlesource.com/17824
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoAdd cumulative fps to SampleApp
Yuqian Li [Wed, 24 May 2017 13:58:07 +0000 (09:58 -0400)]
Add cumulative fps to SampleApp

In some samples (whose frame time is really really small),
the fps number jumps so fast that I can hardly see even
the first digit of the number. This problem will become
more severe for threaded backend which substantially lowers
the frame time. Taking an average over  a long time would
give me a much more stable fps number.

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

7 years agoadd a bulk shader path through SkRasterPipelineBlitter
Mike Klein [Tue, 23 May 2017 19:06:17 +0000 (15:06 -0400)]
add a bulk shader path through SkRasterPipelineBlitter

Change-Id: I76f1f0c29b3408bffb7732ee1afb8337c478605e
Reviewed-on: https://skia-review.googlesource.com/17768
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoblacklist failing Chromecast tests
Ethan Nicholas [Wed, 24 May 2017 14:33:05 +0000 (10:33 -0400)]
blacklist failing Chromecast tests

Bug: skia:6581
Change-Id: Iaaada6efda4737db5f7ad81c20da1b1323bad17a
Reviewed-on: https://skia-review.googlesource.com/17825
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

7 years agoSkRasterPipeline in SkArenaAlloc
Mike Klein [Wed, 24 May 2017 11:53:00 +0000 (07:53 -0400)]
SkRasterPipeline in SkArenaAlloc

Bug: skia:6673

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

7 years agoUpdate go to 1.8.2
Kevin Lubick [Wed, 24 May 2017 13:11:42 +0000 (09:11 -0400)]
Update go to 1.8.2

Since we cache the cipd files in isolate to save a lot of speed on RPIs,
it is no longer necessary to stop compressing our cipd packages.
It only saved us a few seconds on extracting anyway, which is now likely
lost because of the extra download times.
(https://skia-review.googlesource.com/c/16490)

Bug: skia:
NOTRY=true
Change-Id: Ib9b1a29088cddc8790a685935995b0fce07d864f
Reviewed-on: https://skia-review.googlesource.com/17799
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoMark SkGifImageReader destructors with override
Kevin Lubick [Wed, 24 May 2017 12:34:16 +0000 (08:34 -0400)]
Mark SkGifImageReader destructors with override

Very new versions of Clang (5.0 TOT) call out this problem.

Bug: skia:
Change-Id: If90f658f258ca52ebb21e2352fbf3180c41008bd
Reviewed-on: https://skia-review.googlesource.com/17795
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoPremultiply in DM before drawing unpremul f16
Leon Scroggins III [Tue, 23 May 2017 20:58:09 +0000 (16:58 -0400)]
Premultiply in DM before drawing unpremul f16

We special case N32, but need to also handle f16

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

7 years agomove all details for dashing into impl
Mike Reed [Wed, 24 May 2017 03:00:14 +0000 (23:00 -0400)]
move all details for dashing into impl

Bug: skia:
Change-Id: I035603ad75158d9984cce7807bef6a668d9eb014
Reviewed-on: https://skia-review.googlesource.com/17793
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoadd image variant to patch gm
Mike Reed [Wed, 24 May 2017 01:27:59 +0000 (21:27 -0400)]
add image variant to patch gm

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

7 years agoUpdated workaround for Intel 6xxx clear to 0/1 bug
Brian Salomon [Wed, 24 May 2017 00:21:23 +0000 (20:21 -0400)]
Updated workaround for Intel 6xxx clear to 0/1 bug

The previous workaround only handled the glClearColor(0,0,0,1) case,
it turns out we need to work around any glClearColor made up of entirely
0s and 1s.

R=bsalomon@google.com
Bug: 710443
Change-Id: I78a75559fc11811ad9a218436231354d66d2ad51
Reviewed-on: https://skia-review.googlesource.com/17327
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Eric Karl <ericrk@chromium.org>

Workaround for Intel 6xxx clear to opaque black bug
NOTREECHECKS=true
NOTRY=true
NOPRESUBMIT=true
Bug: skia:
Change-Id: Id5e29b483c2b6f698219abfc5bbb2d858c4fc117
Reviewed-On: https://skia-review.googlesource.com/16427
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-By: Brian Osman <brianosman@google.com>
Reviewed-on: https://skia-review.googlesource.com/17790
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoRevert "Revert "Add a flag to GrSurfaceFlags that requires the texture to be cleared...
Brian Salomon [Tue, 23 May 2017 20:53:47 +0000 (16:53 -0400)]
Revert "Revert "Add a flag to GrSurfaceFlags that requires the texture to be cleared upon creation. ""

This reverts commit a9e795eab5f59a52d96b8fdc39351452835f5eb9.

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

7 years agoLegacy raster still doesn't handle transparent LCD
Brian Osman [Tue, 23 May 2017 21:09:19 +0000 (17:09 -0400)]
Legacy raster still doesn't handle transparent LCD

Bug: skia:6655
Change-Id: I1431fb5bcf955dd32c15dad9d24a6a7a7aa626f0
Reviewed-on: https://skia-review.googlesource.com/17788
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoUse Gerrit style format for footers in Presubmit
Ravi Mistry [Tue, 23 May 2017 18:24:08 +0000 (14:24 -0400)]
Use Gerrit style format for footers in Presubmit

This also fixes a bug where CQ keywords were added multiple times because it was
looking for them in the wrong place (new_description_lines instead of the footers).

Bug: skia:6667
Change-Id: I91232297343145884b3fe7c2e923373679cf029e
Reviewed-on: https://skia-review.googlesource.com/17704
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>

7 years agoAdd ship.png for DrawShip sample
Jim Van Verth [Tue, 23 May 2017 18:35:46 +0000 (14:35 -0400)]
Add ship.png for DrawShip sample

Bug: skia:5526
Change-Id: I12bd44c7dabd72f215a34ce9e733bb7a29d3fc68
Reviewed-on: https://skia-review.googlesource.com/17763
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoUpdate documentation to specify the new Gerrit style CQ keywords
Ravi Mistry [Tue, 23 May 2017 18:35:35 +0000 (14:35 -0400)]
Update documentation to specify the new Gerrit style CQ keywords

BUG=skia:6667

NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=17762
Change-Id: I440b5565589102ae6026b5da4716fd43d4a48d6a
Reviewed-on: https://skia-review.googlesource.com/17762
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>

7 years agoFix flag collision in GrDrawVerticesOp
Brian Osman [Tue, 23 May 2017 19:03:18 +0000 (15:03 -0400)]
Fix flag collision in GrDrawVerticesOp

We were setting a flag meant for Mesh.fFlags on the Op's fFlags. Switch
the Mesh's flags to be a pair of bools, to avoid this in the future.

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

7 years agoMake SkPictureImageFilter::drawPictureAtLocalResolution use color xform
Christopher Cameron [Tue, 23 May 2017 06:12:01 +0000 (23:12 -0700)]
Make SkPictureImageFilter::drawPictureAtLocalResolution use color xform

This creates a temporary SkCanvas, which needs to be wrapped in a color
xform canvas to behave appropriately.

bug:725372
Change-Id: I572437770f271b7fb813519c0966cd3177b9eeaf
Reviewed-on: https://skia-review.googlesource.com/17658
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Christopher Cameron <ccameron@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoFix alpha in webp bug introduced with animation
Leon Scroggins III [Tue, 23 May 2017 19:28:46 +0000 (15:28 -0400)]
Fix alpha in webp bug introduced with animation

Prior to 557fbbe05ba48bcc20be684d11fe0edfc24c87ba, if there was a
colorXform, we told libwebp to decode to unpremul, since
premultiplication is handled by the colorXform. In that CL, I handled
this in the case where the dst color type was not 8888 or when blending
with the prior frame, but not in the 8888/not blending with the prior
frame case.

Rearrange the code so we always tell libwebp to use BGRA_8888 unpremul
if there is a colorXform.

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

7 years agoReally disable srgb on nexus player vulkan
Greg Daniel [Tue, 23 May 2017 19:21:02 +0000 (15:21 -0400)]
Really disable srgb on nexus player vulkan

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

7 years agoDither copies when decreasing precision below 32-bit.
Mike Klein [Fri, 19 May 2017 23:15:55 +0000 (19:15 -0400)]
Dither copies when decreasing precision below 32-bit.

Same GM diffs as the last attempt in 8888.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Release-Android,Test-Win2k8-MSVC-GCE-CPU-AVX2-x86-Release,Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-Android

BUG=chromium:720105

Still looking at why readpixels and readpixelspicture are so weird
(lots of black) when drawing into sRGB 8888.  Will follow up.

Change-Id: I223e3b74e567aea1acaffa8db6b24fbf22d98c97
Reviewed-on: https://skia-review.googlesource.com/17443
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoRevert "Add a flag to GrSurfaceFlags that requires the texture to be cleared upon...
Brian Salomon [Tue, 23 May 2017 19:02:57 +0000 (19:02 +0000)]
Revert "Add a flag to GrSurfaceFlags that requires the texture to be cleared upon creation. "

This reverts commit 45e5068a6d10f4e4fd4658824310f8871f02ccf7.

Reason for revert: :'(

Original change's description:
> Add a flag to GrSurfaceFlags that requires the texture to be cleared upon creation.
>
> Bug: chromium:656320
>
> Change-Id: I940bfa24540516ab83a2ed52f761b96eb6ad19f1
> Reviewed-on: https://skia-review.googlesource.com/17391
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Bug: chromium:656320

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

7 years agoadd default arg so android can bulid
Mike Reed [Tue, 23 May 2017 18:19:45 +0000 (14:19 -0400)]
add default arg so android can bulid

Bug: skia:
Change-Id: I2bb10edba9a39f20691398a2a0a01b1da2709fcd
Reviewed-on: https://skia-review.googlesource.com/17761
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoRevert "add knob to turn off fancy SkJumper features"
Mike Klein [Tue, 23 May 2017 18:14:01 +0000 (18:14 +0000)]
Revert "add knob to turn off fancy SkJumper features"

This reverts commit 5373609d90d8f84b75718b15f3522f9d2f4226cb.

Reason for revert: doesn't look like we'll need this.

Original change's description:
> add knob to turn off fancy SkJumper features
>
> This is a new public API for testing (layout tests).
>
> Change-Id: I10345231bad373c741b1e9656e546000538121b3
> Reviewed-on: https://skia-review.googlesource.com/17712
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>

Change-Id: Ieed2576d7fc06528384b7476508610e0e29b894f
Reviewed-on: https://skia-review.googlesource.com/17719
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoDisable srgb on vulkan nexus player
Greg Daniel [Tue, 23 May 2017 17:58:01 +0000 (13:58 -0400)]
Disable srgb on vulkan nexus player

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

7 years agoAdd Material Design shadow reference sample
Jim Van Verth [Tue, 23 May 2017 17:50:58 +0000 (13:50 -0400)]
Add Material Design shadow reference sample

Change-Id: I889a3f508407178c457f675c321880d869caf9ea
Reviewed-on: https://skia-review.googlesource.com/17717
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoAdd a flag to GrSurfaceFlags that requires the texture to be cleared upon creation.
Brian Salomon [Tue, 23 May 2017 14:43:51 +0000 (10:43 -0400)]
Add a flag to GrSurfaceFlags that requires the texture to be cleared upon creation.

Bug: chromium:656320

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

7 years agoDon't pass uniform arrays in GrGLNonlinearColorSpaceXformEffect
Christopher Cameron [Mon, 22 May 2017 23:46:36 +0000 (16:46 -0700)]
Don't pass uniform arrays in GrGLNonlinearColorSpaceXformEffect

This avoids a problem where passing a uniform array as a function
array sometimes gets lost.

Instead of passing the uniform array as an argument to the
transfer function evaluation function, create two separate
transfer function evaluation functions that read the uniforms
directly.

BUG=723133

Change-Id: Ib46b99efdbc04ce0201644ebbc1dfd4cb27e9276
Reviewed-on: https://skia-review.googlesource.com/17293
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agomove sk_memset?? to SkOpts
Mike Klein [Tue, 23 May 2017 16:20:38 +0000 (12:20 -0400)]
move sk_memset?? to SkOpts

This lets the compiler generate AVX versions with wider writes.

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

7 years agoadd knob to turn off fancy SkJumper features
Mike Klein [Tue, 23 May 2017 15:31:14 +0000 (11:31 -0400)]
add knob to turn off fancy SkJumper features

This is a new public API for testing (layout tests).

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

7 years agocolor-correct patch
Mike Reed [Tue, 23 May 2017 15:22:56 +0000 (11:22 -0400)]
color-correct patch

Key work is to correctly convert SkColor corners into linear floats,
then interpolate, then (correctly) convert back to SkColors.

Bug: skia:6659
Change-Id: Iaf0ab842d7a4f8f3481e609903cec83814e5a749
Reviewed-on: https://skia-review.googlesource.com/17533
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoAdd animation support to SkWebpCodec
Leon Scroggins III [Tue, 23 May 2017 13:37:21 +0000 (09:37 -0400)]
Add animation support to SkWebpCodec

TBR=reed@google.com
(No change to the public API, but changed a header file)

SkWebpCodec:
- Implement onGetFrameCount, onGetFrameInfo, and onGetRepetitionCount
- Respect the alpha reported by libwebp. Although the spec states that
  it is only a hint, the libwebp encoder uses it properly. Respecting
  allows us to draw opaque images faster and decode them to 565. This
  also matches other SkCodecs (and Chromium).
- onGetPixels:
  - Decode the frame requested, recursively decoding required frame if
    necessary
  - When blending with a prior frame, use SkRasterPipeline

SkCodec:
- Move check for negative index to getFrameInfo
- Reset the colorXform if one is not needed

SkCodecAnimation:
- Add new blend enum, for WebP's (and APNG's) non-blending option

SkFrameHolder:
- New base classes for frames and the owner of the frames, allowing
  code sharing between SkWebpCodec and SkGifCodec (particularly for
  determining whether a frame has alpha and what frame it depends on)
- When moving items from SkGIFFrameContext, use Skia conventions (i.e.
  int instead of unsigned)
- Rename "delay time" to "duration", to match e.g. SkFrameInfo::
  fDuration

SkGifImageReader:
- Move pieces to SkFrameHolder, and adapt to changes made in the
  process
- Make setAlphaAndRequiredFrame (now on the base class SkFrameHolder)
  more general to support webp, and add support for frames that do not
  blend
- Change SkGIFFrameContext from a struct to a class, to match how we
  use the distinction elsewhere (i.e. struct is a small object with
  public fields)
- Rework hasTransparentPixel (now hasTransparency, since it returns true
  in some cases where there is not a transparent pixel) to better fit
  with the modified setAlphaAndRequiredFrame. Also be more consistent
  when there is no transparent pixel but no color map.
- Simplify an if condition that was previously simplified in 2d61e717
  but accidentally got reverted in a4db9be6

CodecAnimTest:
- Test new animated webp files
- Rearrange the test to more cleanly print alpha type mismatches for
  the first frame

resources:
- webp-animated.webp
  - animated webp from Chromium
- blendBG.webp
  - new webp file using bits of webp-animated-semitransparent4.webp
    from Chromium
  - tests required frame and alpha when using the non-blending mode
  - frames have the following properties:
    - Frame 0: no alpha, fills screen
    - Frame 1: alpha, fills screen
    - Frame 2: no alpha, fills screen
    - Frame 3: alpha, fills screen, blendBG
    - Frame 4: no alpha, fills screen, blendBG
    - Frame 5: alpha, blendBG
    - Frame 6: covers 4, has alpha, blendBG
  - also used to test decoding to 565 if the new frame data has alpha
    but blends onto an opaque frame

DM.cpp:
- Test animated images to non-native 8888 and unpremul

DMSrcSink.cpp:
- Do not test non-native 8888 decodes to f16 dst
- Test unpremul decodes to f16
- Copy a frame of an animated image prior to drawing, since in unpremul
  mode, the DM code will premultiply first.

Bug: skia: 3315
Change-Id: I4e55ae2ee5bc095b37a743bdcfac644be603b980
Reviewed-on: https://skia-review.googlesource.com/16707
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agosimpler portable round()
Mike Klein [Tue, 23 May 2017 13:53:36 +0000 (09:53 -0400)]
simpler portable round()

Calling out lrintf() is probably kind of extreme...
adding half and truncating should be just fine.

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

7 years agoadd gm to test alpha in drawPatch
Mike Reed [Tue, 23 May 2017 13:53:37 +0000 (09:53 -0400)]
add gm to test alpha in drawPatch

Bug: skia:
Change-Id: I79d0b0707b09a3eedeeaee940d6dafbbbdbe2fe2
Reviewed-on: https://skia-review.googlesource.com/17707
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoFix TSAN error for shadow cache
Jim Van Verth [Tue, 23 May 2017 13:40:02 +0000 (09:40 -0400)]
Fix TSAN error for shadow cache

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

7 years agoRevert "sk_fgetsize to not use ftell."
Leon Scroggins [Tue, 23 May 2017 13:29:14 +0000 (13:29 +0000)]
Revert "sk_fgetsize to not use ftell."

This reverts commit eefa289a214ea3917e5e00554f231adb5ad6f712.

Reason for revert: Causing failures in BitmapFactoryTest. b/38233042

Original change's description:
> sk_fgetsize to not use ftell.
>
> The previous version of sk_fgetsize used ftell and fseek to compute
> the size of a file. There are so many issues with this that it is called
> out by securecoding.cert.org as FIO19-C as a thing not to do. We already
> have correct code for computing the size of a file in the mmap code, so
> use that instead.
>
> Change-Id: I1d771124989d0ec1523f6d858814ee563263213a
> Reviewed-on: https://skia-review.googlesource.com/9860
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
>

TBR=bungeman@google.com,scroggo@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ie9392dde8747ae7c74ebfa00153705e316e841a2
Reviewed-on: https://skia-review.googlesource.com/17705
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoRemove compressed (ETC1) texture support from Ganesh (take 2)
Robert Phillips [Tue, 23 May 2017 11:43:48 +0000 (07:43 -0400)]
Remove compressed (ETC1) texture support from Ganesh (take 2)

Reland of https://skia-review.googlesource.com/c/17456/ (Remove compressed (ETC1) texture support from Ganesh) but w/o removing third_part\etc1 files

TBR=bsalomon@google.com
Change-Id: I8ec4b7e3ddf47d213cb24c382731c050ffb8847f
Reviewed-on: https://skia-review.googlesource.com/17700
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoremove min from repeat and mirror generally
Mike Klein [Tue, 23 May 2017 12:07:43 +0000 (08:07 -0400)]
remove min from repeat and mirror generally

I don't think they do anything anymore after the inclusive/exclusive
refactoring.

Change-Id: I63f2e010a00953b5b6415de002bcb51ec2b73458
Reviewed-on: https://skia-review.googlesource.com/17490
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoretry tilers against 1
Mike Klein [Tue, 23 May 2017 11:52:01 +0000 (07:52 -0400)]
retry tilers against 1

These weren't the Valgrind problem.

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

7 years agoadd bench for patchutils
Mike Reed [Tue, 23 May 2017 02:45:05 +0000 (22:45 -0400)]
add bench for patchutils

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

7 years agoFix TSAN bot
Jim Van Verth [Mon, 22 May 2017 21:48:28 +0000 (17:48 -0400)]
Fix TSAN bot

Bug: skia:
Change-Id: I5626e4e4277255b1c0c10f912829ac2cd2ed1a8c
Reviewed-on: https://skia-review.googlesource.com/17600
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

7 years agoRemove setting of alpha coverage in text ops when in LCD mode
Greg Daniel [Mon, 22 May 2017 20:34:34 +0000 (16:34 -0400)]
Remove setting of alpha coverage in text ops when in LCD mode

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

7 years agoCache ambient and spot shadows at a canonical position
Jim Van Verth [Mon, 22 May 2017 19:52:21 +0000 (15:52 -0400)]
Cache ambient and spot shadows at a canonical position

Change-Id: I1f80931513f7d2268b358fb38c86dd331f32f064
Reviewed-on: https://skia-review.googlesource.com/17394
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoFix to lcd blending in ganesh
Greg Daniel [Mon, 22 May 2017 19:56:22 +0000 (15:56 -0400)]
Fix to lcd blending in ganesh

This fixes the bug where a src color may originally be opaque but after
blending it is no longer opaque. We need to know the opacity after the
blend so this restricts us on which blend modes even work this way.

Bug: skia:
Change-Id: Ib3208887d718e5f25272ed7b0bf44683d04884d7
Reviewed-on: https://skia-review.googlesource.com/17488
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoRevert "Revert "mark SkRasterPipelineBlitter final""
Mike Klein [Mon, 22 May 2017 20:15:17 +0000 (20:15 +0000)]
Revert "Revert "mark SkRasterPipelineBlitter final""

This reverts commit b5b26a9d2999825ba8f405b8c37d33d49a529369.

Reason for revert: this one's probably fine too

Original change's description:
> Revert "mark SkRasterPipelineBlitter final"
>
> This reverts commit 317a1857f80ffc18d591dd6b1ac0988184b1ed2b.
>
> Reason for revert: Valgrind requires reverting ancestor commit.
>
> Original change's description:
> > mark SkRasterPipelineBlitter final
> >
> > This devirtualizes the call from blitAntiH to blitH,
> > and makes sure no future self calls will be virtual.
> >
> > Change-Id: I2a277bbc1450a96e07794791792d59e5f806bde0
> > Reviewed-on: https://skia-review.googlesource.com/17418
> > Commit-Queue: Mike Klein <mtklein@chromium.org>
> > Reviewed-by: Mike Klein <mtklein@chromium.org>
> >
>
> TBR=mtklein@chromium.org,herb@google.com,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: Ic726fd6b9bf18c397812ecc256353ab4a0a336c5
> Reviewed-on: https://skia-review.googlesource.com/17522
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
>

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

Change-Id: Ic27fbfaab9d040a1ef49d596350649096b908ea3
Reviewed-on: https://skia-review.googlesource.com/17528
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>

7 years agoRevert "Remove compressed (ETC1) texture support from Ganesh"
Brian Osman [Mon, 22 May 2017 20:14:41 +0000 (20:14 +0000)]
Revert "Remove compressed (ETC1) texture support from Ganesh"

This reverts commit ee26363aaae62db2a851f2873e2405a9cf7f995a.

Reason for revert: Failing Google 3 roll.

Original change's description:
> Remove compressed (ETC1) texture support from Ganesh
>
> Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667
> Reviewed-on: https://skia-review.googlesource.com/17456
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

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

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

7 years agoRevert "Revert "fix ubsan warning""
Brian Osman [Mon, 22 May 2017 19:45:09 +0000 (19:45 +0000)]
Revert "Revert "fix ubsan warning""

This reverts commit b03d69f0709f5da09a5237922d208e587b12a06a.

Reason for revert: This is the good CL I meant to re-land.

Original change's description:
> Revert "fix ubsan warning"
>
> This reverts commit 4d1c5d676eb32ed304ee4aa410cebbc6467b59c2.
>
> Reason for revert: Valgrind requires reverting ancestor commit.
>
> Original change's description:
> > fix ubsan warning
> >
> > CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN
> >
> > Change-Id: Ic8c5d95fdb899cb5293b2bc456f61b1637ec3aed
> > Reviewed-on: https://skia-review.googlesource.com/17489
> > Reviewed-by: Mike Klein <mtklein@chromium.org>
> > Commit-Queue: Mike Klein <mtklein@chromium.org>
> >
>
> TBR=mtklein@chromium.org,herb@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN
>
> Change-Id: Idbfdc4773756aa475829c1421d10d6f341081d7b
> Reviewed-on: https://skia-review.googlesource.com/17521
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
>

TBR=mtklein@chromium.org,herb@google.com,reviews@skia.org,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN

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

7 years agoRevert "fix ubsan warning"
Brian Osman [Mon, 22 May 2017 19:31:36 +0000 (19:31 +0000)]
Revert "fix ubsan warning"

This reverts commit 4d1c5d676eb32ed304ee4aa410cebbc6467b59c2.

Reason for revert: This one was fine (and fixes ASAN).

Original change's description:
> fix ubsan warning
>
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN
>
> Change-Id: Ic8c5d95fdb899cb5293b2bc456f61b1637ec3aed
> Reviewed-on: https://skia-review.googlesource.com/17489
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>

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

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

7 years agoRevert "We can mask load and store with just AVX."
Brian Osman [Mon, 22 May 2017 19:25:36 +0000 (19:25 +0000)]
Revert "We can mask load and store with just AVX."

This reverts commit 139e463dc6f965fdaed854efcb20c6cafbb6dbdc.

Reason for revert: Crashes on Valgrind bots.

Original change's description:
> We can mask load and store with just AVX.
>
> Previously we were using AVX2 instructions to generate the masks,
> and AVX2 instructions for the mask load and stores themselves.
>
> AVX came with float mask loads and stores, which will work perfectly
> fine.  I don't really get what the point of the 32-bit int loads and
> stores are in AVX2, beyond maybe syntax sugar?
>
> Change-Id: I81fa55fb09daea4f5546f8c9ebbc886015edce51
> Reviewed-on: https://skia-review.googlesource.com/17452
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Ravi Mistry <rmistry@google.com>
>

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

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

7 years agoRevert "add tilers against 1"
Brian Osman [Mon, 22 May 2017 19:25:05 +0000 (19:25 +0000)]
Revert "add tilers against 1"

This reverts commit 8110b849d60455d6fb594f26919f0f38c3ec9925.

Reason for revert: Valgrind requires reverting ancestor commit.

Original change's description:
> add tilers against 1
>
> Change-Id: I2482972a43cb89a93cbfb9e708614e0334002e53
> Reviewed-on: https://skia-review.googlesource.com/17483
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>

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

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

7 years agoRevert "mark SkRasterPipelineBlitter final"
Brian Osman [Mon, 22 May 2017 19:24:47 +0000 (19:24 +0000)]
Revert "mark SkRasterPipelineBlitter final"

This reverts commit 317a1857f80ffc18d591dd6b1ac0988184b1ed2b.

Reason for revert: Valgrind requires reverting ancestor commit.

Original change's description:
> mark SkRasterPipelineBlitter final
>
> This devirtualizes the call from blitAntiH to blitH,
> and makes sure no future self calls will be virtual.
>
> Change-Id: I2a277bbc1450a96e07794791792d59e5f806bde0
> Reviewed-on: https://skia-review.googlesource.com/17418
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
>

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

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