platform/upstream/libSkiaSharp.git
8 years agoRevert of these _procs_arm are not used when we have NEON (patchset #1 id:1 of https...
mtklein [Thu, 14 Jan 2016 21:49:17 +0000 (13:49 -0800)]
Revert of these _procs_arm are not used when we have NEON (patchset #1 id:1 of https://codereview.chromium.org/1587983004/ )

Reason for revert:
Breaks Chrome roll:

https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_rel/builds/8391/steps/compile%20%28with%20patch%29/logs/stdio

Original issue's description:
> these _procs_arm are not used when we have NEON
>
> BUG=skia:4798
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1587983004
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/349dcc99b69f27ab834232796371e678625078e0

TBR=msarett@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4798

Review URL: https://codereview.chromium.org/1589633005

8 years agoCreate an SkCodecImageGenerator
msarett [Thu, 14 Jan 2016 21:12:26 +0000 (13:12 -0800)]
Create an SkCodecImageGenerator

BUG=skia:

patch from issue 1396323007 at patchset 120001 (http://crrev.com/1396323007#ps120001)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1487683004

Committed: https://skia.googlesource.com/skia/+/e1102ce1d3d0895e840e756e155ec56b5a1a7540

Review URL: https://codereview.chromium.org/1487683004

8 years agofix SkGpuDevice::drawBitmapRect to always update clips
lsalzman [Thu, 14 Jan 2016 21:06:41 +0000 (13:06 -0800)]
fix SkGpuDevice::drawBitmapRect to always update clips

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1584073007

Review URL: https://codereview.chromium.org/1584073007

8 years agoUpdate tests to produce more sensible output for Android framework builds.
djsollen [Thu, 14 Jan 2016 20:23:54 +0000 (12:23 -0800)]
Update tests to produce more sensible output for Android framework builds.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1590023002

Review URL: https://codereview.chromium.org/1590023002

8 years agoRevert of Create an SkCodecImageGenerator (patchset #10 id:260001 of https://coderevi...
msarett [Thu, 14 Jan 2016 20:20:45 +0000 (12:20 -0800)]
Revert of Create an SkCodecImageGenerator (patchset #10 id:260001 of https://codereview.chromium.org/1487683004/ )

Reason for revert:
Core doesn't know about Codec.

Original issue's description:
> Create an SkCodecImageGenerator
>
> BUG=skia:
>
> patch from issue 1396323007 at patchset 120001 (http://crrev.com/1396323007#ps120001)
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1487683004
>
> Committed: https://skia.googlesource.com/skia/+/e1102ce1d3d0895e840e756e155ec56b5a1a7540

TBR=reed@google.com,scroggo@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1582373003

8 years agoVisualBench: Make the Android SDL app start without cmdline arguments
kkinnunen [Thu, 14 Jan 2016 19:54:13 +0000 (11:54 -0800)]
VisualBench: Make the Android SDL app start without cmdline arguments

Make the Android SDL VisualBench start even if it is started without
command-line arguments.

Also makes it start when started by pressing the icon.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1573913008

Review URL: https://codereview.chromium.org/1573913008

8 years agosketch SkValue API
mtklein [Thu, 14 Jan 2016 19:43:13 +0000 (11:43 -0800)]
sketch SkValue API

I think we may be trying to take too many steps at once.
Let's try starting from an API and evolving from there?

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1589953003

Review URL: https://codereview.chromium.org/1589953003

8 years agoCreate an SkCodecImageGenerator
msarett [Thu, 14 Jan 2016 19:32:43 +0000 (11:32 -0800)]
Create an SkCodecImageGenerator

BUG=skia:

patch from issue 1396323007 at patchset 120001 (http://crrev.com/1396323007#ps120001)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1487683004

Review URL: https://codereview.chromium.org/1487683004

8 years agothese _procs_arm are not used when we have NEON
mtklein [Thu, 14 Jan 2016 19:16:47 +0000 (11:16 -0800)]
these _procs_arm are not used when we have NEON

BUG=skia:4798
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1587983004
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1587983004

8 years agoAdd skeleton for kilobench experiments
joshualitt [Thu, 14 Jan 2016 19:05:22 +0000 (11:05 -0800)]
Add skeleton for kilobench experiments

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1582903002

Review URL: https://codereview.chromium.org/1582903002

8 years agoVirtualize Frames in GrAuditTrail
joshualitt [Thu, 14 Jan 2016 18:58:07 +0000 (10:58 -0800)]
Virtualize Frames in GrAuditTrail

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1581943004

Review URL: https://codereview.chromium.org/1581943004

8 years agoremove unused SkBitmapFilter::Allocate
reed [Thu, 14 Jan 2016 18:40:29 +0000 (10:40 -0800)]
remove unused SkBitmapFilter::Allocate

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1589683004

TBR=

Review URL: https://codereview.chromium.org/1589683004

8 years agoadd explicit bench for raw bitmapscaler
reed [Thu, 14 Jan 2016 18:10:56 +0000 (10:10 -0800)]
add explicit bench for raw bitmapscaler

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1586803003

patch from issue 1586803003 at patchset 20001 (http://crrev.com/1586803003#ps20001)

TBR=

Review URL: https://codereview.chromium.org/1588113002

8 years agoAdd Audittrail for path renderers
joshualitt [Thu, 14 Jan 2016 17:58:36 +0000 (09:58 -0800)]
Add Audittrail for path renderers

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1588683002

Review URL: https://codereview.chromium.org/1588683002

8 years agoBeginning of support for texture rectangles.
bsalomon [Thu, 14 Jan 2016 17:24:09 +0000 (09:24 -0800)]
Beginning of support for texture rectangles.

Adds support for importing a RECTANGLE texture into Skia via GrTexureProvider::wrapBackendTexture().

Tests read/writing pixels, copySurface, and clear.

Does not add support for texturing from a RECTANGLE texture as the coords will be incorrectly normalized.

BUG=skia:3868
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1583863002

Review URL: https://codereview.chromium.org/1583863002

8 years agoVisualBench: Use first succeeding EGL API
kkinnunen [Thu, 14 Jan 2016 17:12:01 +0000 (09:12 -0800)]
VisualBench: Use first succeeding EGL API

Fix initialization of the app window by
using the first EGL context that succeeds, not the last one.

Fixes the window creation in some cases on devices that support
OpenGL and OpenGL ES.

Also check EGL call results.

BUG=skia:4733
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1582313002

Review URL: https://codereview.chromium.org/1582313002

8 years agoexpand gm to exercise miplevels and various scalers
reed [Thu, 14 Jan 2016 17:11:51 +0000 (09:11 -0800)]
expand gm to exercise miplevels and various scalers

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574233003

TBR=

Review URL: https://codereview.chromium.org/1574233003

8 years agoRevert of Make A8 readback work in more cases and improve testing. (patchset #5 id...
bsalomon [Thu, 14 Jan 2016 15:19:47 +0000 (07:19 -0800)]
Revert of Make A8 readback work in more cases and improve testing. (patchset #5 id:70001 of https://codereview.chromium.org/1584563002/ )

Reason for revert:
Breaking video tests in Chrome.

Original issue's description:
> Make A8 readback work in more cases and improve testing.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1584563002
>
> Committed: https://skia.googlesource.com/skia/+/b76afedf11c7fe933954d030048c3222860249e1

TBR=egdaniel@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1581203005

8 years agoSampleApp: Make android_install_app and android_launch_app work consistently
kkinnunen [Thu, 14 Jan 2016 14:07:40 +0000 (06:07 -0800)]
SampleApp: Make android_install_app and android_launch_app work consistently

Make android_install_app work more consistently:
* App can be "SampleApp" or "VisualBench"

Make android_launch_app work more consistently:
* Parameters to SampleApp are passed correctly
* SampleApp is actually launched

The parameters to "am" need to be quoted, since the command
is run on the device shell.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1589883002

Review URL: https://codereview.chromium.org/1589883002

8 years agoRefactor to use GrWrapTextureInBitmap more
robertphillips [Thu, 14 Jan 2016 14:03:29 +0000 (06:03 -0800)]
Refactor to use GrWrapTextureInBitmap more

Too many wrap_texture methods!

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1584933002

Review URL: https://codereview.chromium.org/1584933002

8 years agoSampleApp: Cleanup SkOSWindow_SDL
kkinnunen [Thu, 14 Jan 2016 13:37:51 +0000 (05:37 -0800)]
SampleApp: Cleanup SkOSWindow_SDL

Implements:
 * Event loop event waiting (no busy loop)
 ** Skia timers
 * Proper window sizing and resizing
 * MSAA on X11 (previously it did not use MSAA at all)
 * Changes requested colorspace from 565 to 8888
   to match non-SDL variants
 * Context creation clearing (color and stencil mask)
 * Opens the window in 640x480 by default on desktop.

Removes dead code.

BUG=skia:4733
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1578173002

Review URL: https://codereview.chromium.org/1578173002

8 years agosome fuzz hacking
mtklein [Thu, 14 Jan 2016 12:59:42 +0000 (04:59 -0800)]
some fuzz hacking

Try to start faster:
 - remove flags dependency
 - print nothing
 - strip unused symbols from the binary on Mac (smaller binary)
 - only create one fuzz object
 - only run one DEF_FUZZ
I am not sure if any of these things mattered, but I thought you may like to look.

Good stuff:
 - make nextU() / nextF() work
 - drop nextURange() / nextFRange() for now
 - add nextB() for a single byte

As you may have guessed, I have figured out how to use afl-fuzz on my laptop.

Syntax to run becomes:
  $ afl-fuzz ... out/Release/fuzz <DEF_FUZZ name> @@

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1581203003

Review URL: https://codereview.chromium.org/1581203003

8 years agoSimplify path allocation, clean up resources correctly
kkinnunen [Thu, 14 Jan 2016 07:36:45 +0000 (23:36 -0800)]
Simplify path allocation, clean up resources correctly

Simplify path id allocation in NVPR backend. Instead of using
an AVL tree of path id ranges for the first 65535 ids, use just
a simple stategy of overallocation and "bump index".

Fixes the bug where previously overallocated ids were not deleted.

The advantage is that the implementation is simple and all allocations
go through overallocation, not just the first 65535 of the 1-range
allocations.

Removes the logic where paths were cleared with setting path data to
null instead of deleting the whole path. Now deleted paths are just
deleted normally. These operations should have equivalent performance on
command buffer. Deleting the path should enable the driver to do more
maintainance.

Removes the GLNameAllocator, as it was only used for paths. In order for
it to be used for other IDs, it probably would need to be re-written to
support cleanup and arbitrary ranges. Also, the interface would probably
need to be changed to not requiring the block to be allocated before it
could be managed by the structure.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1150243003

Review URL: https://codereview.chromium.org/1150243003

8 years agoMake android scripts not warn about ADB in newer SDKs
kkinnunen [Thu, 14 Jan 2016 06:53:55 +0000 (22:53 -0800)]
Make android scripts not warn about ADB in newer SDKs

The older SDK says:
$ adb version
Android Debug Bridge version 1.0.32

The newer SDK says:
$ adb version
Android Debug Bridge version 1.0.32
Revision eac51f2bb6a8-android

Removes the shebang as the file is not intended to be
run, and the copyright would render it useless.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1583793002

Review URL: https://codereview.chromium.org/1583793002

8 years agoOptimized premultiplying swizzles for NEON
msarett [Wed, 13 Jan 2016 22:31:59 +0000 (14:31 -0800)]
Optimized premultiplying swizzles for NEON

Improves decode performance for RGBA encoded PNGs.

Swizzle Time on Nexus 9 (with clang):
SwapPremul 0.44x
Premul     0.44x
Decode Time On Nexus 9 (with clang):
ZeroInit Decodes 0.85x
Regular  Decodes 0.86x

Swizzle Time on Nexus 6P (with clang)
SwapPremul 0.14x
Premul     0.14x
Decode Time On Nexus 6P (with clang):
ZeroInit Decodes 0.93x
Regular  Decodes 0.95x

Notes:
ZeroInit means memory is zero initialized, and we do not write to
memory for large sections of zero pixels (memory use opt for Android).

A profile on Nexus 9 shows that the premultiplication step of PNG
decoding is now ~5% of decode time (down from ~20%).

BUG=skia:4767
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577703006
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1577703006

8 years agoFix SkXfermodeImageFilter GPU fast path for differing sizes.
senorblanco [Wed, 13 Jan 2016 21:48:54 +0000 (13:48 -0800)]
Fix SkXfermodeImageFilter GPU fast path for differing sizes.

The GPU fast path was not doing the correct thing for input bitmaps of
differing sizes. This change brings the fast path in line with the
slow path: use the union of foreground and background bounds as bounds,
offset the draw context by the bounds translation, and translate the
foreground and background independently by their respective offsets.

Finally, we add a texture domain for the background fragment
processor, since we may access texels outside its domain.

Note: this adds two new test cases to the xfermodeimagefilter GM, so
those will need to be rebaselined.

BUG=568196
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1588633002

Review URL: https://codereview.chromium.org/1588633002

8 years agoFix fuzzer-found deserialization bugs
ajuma [Wed, 13 Jan 2016 21:46:31 +0000 (13:46 -0800)]
Fix fuzzer-found deserialization bugs

This fixes deserialization bugs found by fuzzing SkPaintImageFilter.

BUG=576908,576910
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1589533002

Review URL: https://codereview.chromium.org/1589533002

8 years agoAllow Resize to be called w/ a preallocated pixmap
reed [Wed, 13 Jan 2016 21:36:31 +0000 (13:36 -0800)]
Allow Resize to be called w/ a preallocated pixmap

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1588653002

Review URL: https://codereview.chromium.org/1588653002

8 years agoRemove remaining users of draw*Rect calls
joshualitt [Wed, 13 Jan 2016 21:35:35 +0000 (13:35 -0800)]
Remove remaining users of draw*Rect calls

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1579223003

Review URL: https://codereview.chromium.org/1579223003

8 years agoAdd new fuzz binary.
mtklein [Wed, 13 Jan 2016 20:57:57 +0000 (12:57 -0800)]
Add new fuzz binary.

This is designed to have short startup time, for maximum fuzzing throughput.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1589563002

Review URL: https://codereview.chromium.org/1589563002

8 years agoMove some program building utils from GL to GLSL
egdaniel [Wed, 13 Jan 2016 20:19:30 +0000 (12:19 -0800)]
Move some program building utils from GL to GLSL

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535603006

Review URL: https://codereview.chromium.org/1535603006

8 years agoMake A8 readback work in more cases and improve testing.
bsalomon [Wed, 13 Jan 2016 20:19:15 +0000 (12:19 -0800)]
Make A8 readback work in more cases and improve testing.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1584563002

Review URL: https://codereview.chromium.org/1584563002

8 years agomicro fix for rrects bug using GrDrawContext
joshualitt [Wed, 13 Jan 2016 19:23:26 +0000 (11:23 -0800)]
micro fix for rrects bug using GrDrawContext

TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1582933002

Review URL: https://codereview.chromium.org/1582933002

8 years agoRemove size check from SkCodec
msarett [Wed, 13 Jan 2016 18:54:20 +0000 (10:54 -0800)]
Remove size check from SkCodec

This check is useless because it is vulnerable to integer overflow.

Also, I don't think this is the right way to solve the problem
of "too large" images.  For example, many image specs allow images
larger than this, so we should too.

BUG=skia:4667
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1580113002

Review URL: https://codereview.chromium.org/1580113002

8 years agoReland of Move BUILD.public to public.bzl. (patchset #1 id:1 of https://codereview...
benjaminwagner [Wed, 13 Jan 2016 18:45:19 +0000 (10:45 -0800)]
Reland of Move BUILD.public to public.bzl. (patchset #1 id:1 of https://codereview.chromium.org/1580923002/ )

Reason for revert:
Internal cl/111468120 is now ready to go.

Original issue's description:
> Revert of Move BUILD.public to public.bzl. (patchset #1 id:1 of https://codereview.chromium.org/1577353002/ )
>
> Reason for revert:
> Corresponding google-private changes not ready.
>
> Original issue's description:
> > Move BUILD.public to public.bzl.
> >
> > This allows building with bazel (see http://bazel.io).
> >
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577353002
> >
> > Committed: https://skia.googlesource.com/skia/+/eeebfff54877b24151570c4f02b2299e3f9ef967
>
> TBR=benjaminwagner@google.com,mtklein@google.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/330043c073de2ee63faa1caa3cb4170da68a79f2

TBR=mtklein@google.com,iroth@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1584563004

8 years agoremove CreateLightingFilter from SkColorFilter
reed [Wed, 13 Jan 2016 18:43:09 +0000 (10:43 -0800)]
remove CreateLightingFilter from SkColorFilter

All callers have converted over to SkColorMatrixFilter

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1583923002

Review URL: https://codereview.chromium.org/1583923002

8 years agoRemove two varieties of drawNonAARect from GrDrawTarget
joshualitt [Wed, 13 Jan 2016 18:08:27 +0000 (10:08 -0800)]
Remove two varieties of drawNonAARect from GrDrawTarget

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1584703003

Review URL: https://codereview.chromium.org/1584703003

8 years agoAdd CodecZeroInit test to DMSrcSink
msarett [Wed, 13 Jan 2016 17:31:39 +0000 (09:31 -0800)]
Add CodecZeroInit test to DMSrcSink

This should not cause any diffs on Gold.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577853004

Review URL: https://codereview.chromium.org/1577853004

8 years agoremove unused SkGlobalInitialization_none.cpp
reed [Wed, 13 Jan 2016 17:05:27 +0000 (09:05 -0800)]
remove unused SkGlobalInitialization_none.cpp

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1583873002

NOTRY=True
TBR=

Review URL: https://codereview.chromium.org/1583873002

8 years agoreorg global initialization, separating core from optional
reed [Wed, 13 Jan 2016 16:47:54 +0000 (08:47 -0800)]
reorg global initialization, separating core from optional

Chrome will be changed to just inherit our files, with no need to have their own copy. see https://codereview.chromium.org/1581533007/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1580873002

Review URL: https://codereview.chromium.org/1580873002

8 years agoHide drawBatch on GrDrawTarget from test Methods
joshualitt [Wed, 13 Jan 2016 15:47:38 +0000 (07:47 -0800)]
Hide drawBatch on GrDrawTarget from test Methods

TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574383002

Review URL: https://codereview.chromium.org/1574383002

8 years agoGrAuditTrail hooks in GrContext + GrDrawContext
joshualitt [Wed, 13 Jan 2016 14:45:40 +0000 (06:45 -0800)]
GrAuditTrail hooks in GrContext + GrDrawContext

TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1580023002

Review URL: https://codereview.chromium.org/1580023002

8 years agoRevert of Move BUILD.public to public.bzl. (patchset #1 id:1 of https://codereview...
iroth [Tue, 12 Jan 2016 22:22:24 +0000 (14:22 -0800)]
Revert of Move BUILD.public to public.bzl. (patchset #1 id:1 of https://codereview.chromium.org/1577353002/ )

Reason for revert:
Corresponding google-private changes not ready.

Original issue's description:
> Move BUILD.public to public.bzl.
>
> This allows building with bazel (see http://bazel.io).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577353002
>
> Committed: https://skia.googlesource.com/skia/+/eeebfff54877b24151570c4f02b2299e3f9ef967

TBR=benjaminwagner@google.com,mtklein@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1580923002

8 years agoDelete SkRectShaderImageFilter
ajuma [Tue, 12 Jan 2016 22:17:30 +0000 (14:17 -0800)]
Delete SkRectShaderImageFilter

This is no longer used (as of http://crrev.com/368929).

BUG=skia:4780
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1575233004

Review URL: https://codereview.chromium.org/1575233004

8 years agoSwizzle shader output and blend when using GL_RED to implement kAlpha_8_GrPixelConfig
bsalomon [Tue, 12 Jan 2016 21:29:26 +0000 (13:29 -0800)]
Swizzle shader output and blend when using GL_RED to implement kAlpha_8_GrPixelConfig
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1584473002

Review URL: https://codereview.chromium.org/1584473002

8 years agoConvert GrAuditTrail to use scoped frames
joshualitt [Tue, 12 Jan 2016 20:59:28 +0000 (12:59 -0800)]
Convert GrAuditTrail to use scoped frames

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1579193002

Review URL: https://codereview.chromium.org/1579193002

8 years agoSkPaintFilterCanvas cleanup
fmalita [Tue, 12 Jan 2016 20:14:10 +0000 (12:14 -0800)]
SkPaintFilterCanvas cleanup

All external clients have been updated, we can now remove the
transitional kludges.

BUG=skia:4782
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574303003

Review URL: https://codereview.chromium.org/1574303003

8 years agoRemove #ifdef SK_DISABLE_TILE_IMAGE_FILTER_OPTIMIZATION.
senorblanco [Tue, 12 Jan 2016 20:12:56 +0000 (12:12 -0800)]
Remove #ifdef SK_DISABLE_TILE_IMAGE_FILTER_OPTIMIZATION.

No longer enabled in Chrome.

BUG=569950
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1580843002

Review URL: https://codereview.chromium.org/1580843002

8 years agoMove BUILD.public to public.bzl.
iroth [Tue, 12 Jan 2016 20:00:49 +0000 (12:00 -0800)]
Move BUILD.public to public.bzl.

This allows building with bazel (see http://bazel.io).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577353002

Review URL: https://codereview.chromium.org/1577353002

8 years agoSkTime: Stop using POSIX entensions to time.h for timezone
halcanary [Tue, 12 Jan 2016 19:55:29 +0000 (11:55 -0800)]
SkTime: Stop using POSIX entensions to time.h for timezone

SkTime::GetDateTime() isn't used anywhere in production, so
change it to return current UTC time, rather than local time.

Also, move code into SkTime out of ports.

A later CL will remove empty files.

BUG=skia:4736
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1562943002

[mtklein]
Only deleting unused API.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1562943002

8 years agoHide formats in GrGLCaps and use specific getters for different GL functions.
bsalomon [Tue, 12 Jan 2016 19:13:47 +0000 (11:13 -0800)]
Hide formats in GrGLCaps and use specific getters for different GL functions.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1580003002

Review URL: https://codereview.chromium.org/1580003002

8 years agoRefactor resize filter to go faster
caryclark [Tue, 12 Jan 2016 18:44:02 +0000 (10:44 -0800)]
Refactor resize filter to go faster

Part of this CL improves the speed by using dynamic arrays
more effectively.

Part uses SIMD and more concise float expressions for speed.

Some unused code was deleted.

The latter changes are guarded by:

  SK_SUPPORT_LEGACY_BITMAP_FILTER

until this lands and the corresponding layout changes in
chrome can be relanded.

With the legacy flag defined, no Skia or Chrome test results
change. Without the flag defined in Skia, only 0.01% - 0.02%
of the pixels change, and then by (1,1,1) in 8888.

codereview.chromium.org/1583533002 adds the guard to Chrome.

R=reed@google.com
BUG=skia:2261
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563183003

Review URL: https://codereview.chromium.org/1563183003

8 years agoOptimize SkTileImageFilter in an offset filter when possible.
senorblanco [Tue, 12 Jan 2016 15:49:15 +0000 (07:49 -0800)]
Optimize SkTileImageFilter in an offset filter when possible.

If the srcRect and dstRect have the same size, tiling will have the
same effect as an offset filter cropped to the intersection of
srcRect and dstRect. So do that instead.

BUG=569950
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1578983002

Review URL: https://codereview.chromium.org/1578983002

8 years agoclamp fixed divide to 32 bits
caryclark [Tue, 12 Jan 2016 15:21:19 +0000 (07:21 -0800)]
clamp fixed divide to 32 bits

In SkEdge::setLine, the numerator is a 26.6 fixed number.
SkFixedDiv shifts it up by an additional 16 bits. If the
y interval is small, the result overflows 32 bits.

The code pins in 64 bit space before down-casting the result.

R=reed@google.com
BUG=skia:4708
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1583453002

Review URL: https://codereview.chromium.org/1583453002

8 years agoSkTCopyOnFirstWrite-based SkPaintFilterCanvas API
fmalita [Tue, 12 Jan 2016 15:21:11 +0000 (07:21 -0800)]
SkTCopyOnFirstWrite-based SkPaintFilterCanvas API

I find this version preferable because

1) it consolidates the in/out paint args without compromising
efficiency or flexibility

2) relieves overriders from having to set the SkTLazy explicitly

BUG=skia:4782
R=mtklein@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1576183002

Review URL: https://codereview.chromium.org/1576183002

8 years agoUse SkOpts routines in SkSwizzler
msarett [Tue, 12 Jan 2016 14:51:11 +0000 (06:51 -0800)]
Use SkOpts routines in SkSwizzler

This is a bit tricky because we don't intend to support sampling
in SkOpts.  The swizzler will fallback to a default routine in
the event that sampling is requested.

BUG=skia:4767
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563393002

Review URL: https://codereview.chromium.org/1563393002

8 years agoAdd batch names and bounds to json debug information
joshualitt [Tue, 12 Jan 2016 14:45:24 +0000 (06:45 -0800)]
Add batch names and bounds to json debug information

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577093003

Review URL: https://codereview.chromium.org/1577093003

8 years agoRevert of For Google3, enable SK_SUPPORT_LEGACY_SAVEFLAGS; required by legacy webkit_...
benjaminwagner [Mon, 11 Jan 2016 23:01:38 +0000 (15:01 -0800)]
Revert of For Google3, enable SK_SUPPORT_LEGACY_SAVEFLAGS; required by legacy webkit_headless. (patchset #2 id:20001 of https://codereview.chromium.org/1568633002/ )

Reason for revert:
Removed legacy saveflags in internal cl/111889802.

Original issue's description:
> For Google3, enable SK_SUPPORT_LEGACY_SAVEFLAGS; required by legacy webkit_headless.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1568633002
>
> Committed: https://skia.googlesource.com/skia/+/85c8d06540942531fe3440fafa2a2825f128251a

TBR=mtklein@google.com,reed@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review URL: https://codereview.chromium.org/1578033003

8 years agoFix SkTileImageFilter when srcRect is a superset of bitmap bounds.
senorblanco [Mon, 11 Jan 2016 22:09:09 +0000 (14:09 -0800)]
Fix SkTileImageFilter when srcRect is a superset of bitmap bounds.

If the input bitmap passed to SkTileImageFilter does not fill the
srcRect, we were tiling this incorrectly (see the first sample
from tileimage filter -- it draws from a srcRect of 12,12 50x50
to a dstRect of 0,0 50x50. There should be no tiling at all
in this case!)

In order to fix this, we need to pad the bitmap out to srcRect,
and tile with that. In order to tile correctly in the GPU case,
we need to request a tileable texture.

NOTE: this will change the results of the tileimagefilter GM (correctness,
and added src / dest rects).

BUG=skia:4774
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1570133003

Review URL: https://codereview.chromium.org/1570133003

8 years agoSkPaintFilterCanvas skip-draw support
fmalita [Mon, 11 Jan 2016 21:58:29 +0000 (13:58 -0800)]
SkPaintFilterCanvas skip-draw support

At the time SkPaintFilterCanvas was introduced as a SkDrawFilter replacement,
no clients were relying on the draw veto logic.  Now Chromium does.

To facilitate migrating off SkDrawFilter, let's augment SkPaintFilterCanvas
with skip-draw semantics.

A side effect of the CL is that now we call the filter virtual even for null
paints.

BUG=skia:4782
R=reed@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577933002

Review URL: https://codereview.chromium.org/1577933002

8 years agoGuard SkGpuDevice
joshualitt [Mon, 11 Jan 2016 21:29:31 +0000 (13:29 -0800)]
Guard SkGpuDevice

TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567093002

Review URL: https://codereview.chromium.org/1567093002

8 years agoSkSwizzler: Factor skipping zeros out into a helper function.
mtklein [Mon, 11 Jan 2016 21:13:55 +0000 (13:13 -0800)]
SkSwizzler: Factor skipping zeros out into a helper function.

I figure something like this lets us not worry about it in the new opts.

This skips only leading zeros per-scanline, not all zeros, but my bet is that
leading zeros are all that matters: it's got to be rare that a scanline is both
larger than 1024 pixels and has runs of 1024 transparent pixels in the middle.
I bet the big bang for the buck comes from skipping full scanlines (or even
multiple adjacent scanlines).

BUG=skia:4767
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1566653007

Review URL: https://codereview.chromium.org/1566653007

8 years agoremove external header for SkModeColorFilter
reed [Mon, 11 Jan 2016 21:08:59 +0000 (13:08 -0800)]
remove external header for SkModeColorFilter

BUG=skia:4791
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577073002

Review URL: https://codereview.chromium.org/1577073002

8 years agomove declaration of CreateLightingFilter into SkColorMatrixFilter
reed [Mon, 11 Jan 2016 20:34:04 +0000 (12:34 -0800)]
move declaration of CreateLightingFilter into SkColorMatrixFilter

BUG=skia:4791
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574023002

Review URL: https://codereview.chromium.org/1574023002

8 years agoFix BitmapCopy_Texture test on iOS
Brian Salomon [Mon, 11 Jan 2016 20:15:46 +0000 (15:15 -0500)]
Fix BitmapCopy_Texture test on iOS

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1573273002

Review URL: https://codereview.chromium.org/1573273002 .

8 years agoUpdate our version of jsoncpp to fix a memory alignment bug in the library.
djsollen [Mon, 11 Jan 2016 19:36:33 +0000 (11:36 -0800)]
Update our version of jsoncpp to fix a memory alignment bug in the library.

This upgrades the library to 1.0.0 instead of the most recent release, since more recent releases require exceptions to be enabled.

BUG=skia:4775
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1575973003

Review URL: https://codereview.chromium.org/1575973003

8 years agoHave nanobench report bench median sample time too.
mtklein [Mon, 11 Jan 2016 19:28:26 +0000 (11:28 -0800)]
Have nanobench report bench median sample time too.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577963002

Review URL: https://codereview.chromium.org/1577963002

8 years agoMake SkBitmap::CopyTo respect requested dst color type when bitmap is texture backed.
bsalomon [Mon, 11 Jan 2016 19:14:17 +0000 (11:14 -0800)]
Make SkBitmap::CopyTo respect requested dst color type when bitmap is texture backed.

BUG=chromium:550559
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1576983002

Review URL: https://codereview.chromium.org/1576983002

8 years agorestore lost optimization when the shader can report const_in_y
reed [Mon, 11 Jan 2016 19:02:27 +0000 (11:02 -0800)]
restore lost optimization when the shader can report const_in_y

accidentally lost we I landed https://codereview.chromium.org/1556003003

BUG=575905
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1576083002

Review URL: https://codereview.chromium.org/1576083002

8 years agoremove imagefilter::sizeconstraint
reed [Mon, 11 Jan 2016 18:56:59 +0000 (10:56 -0800)]
remove imagefilter::sizeconstraint

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1571033002

Review URL: https://codereview.chromium.org/1571033002

8 years agoChange to wire up opnames in SkGpuDevice
joshualitt [Mon, 11 Jan 2016 18:39:11 +0000 (10:39 -0800)]
Change to wire up opnames in SkGpuDevice

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1565113004

Review URL: https://codereview.chromium.org/1565113004

8 years agoRemove Google3 scripts.
benjaminwagner [Mon, 11 Jan 2016 18:35:46 +0000 (10:35 -0800)]
Remove Google3 scripts.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1573223002

Review URL: https://codereview.chromium.org/1573223002

8 years agoFix uninit texture key with odd number of textures
bsalomon [Mon, 11 Jan 2016 17:17:52 +0000 (09:17 -0800)]
Fix uninit texture key with odd number of textures
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1575993003

Review URL: https://codereview.chromium.org/1575993003

8 years agoapply --match to image file names too, like we do for .skps
mtklein [Mon, 11 Jan 2016 17:04:21 +0000 (09:04 -0800)]
apply --match to image file names too, like we do for .skps

This should make skipping an image much cheaper.

Before:
   $ time out/Release/nanobench --images resources/ --match sdkjlfasjlfds
        4.65 real         4.41 user         0.19 sys
   $ time out/Release/nanobench --images resources/ --match sdkjlfasjlfds
        0.05 real         0.03 user         0.01 sys

The effect should be much more dramatic when there are more images to skip (e.g. on the bots).
This cuts about 6 minutes off the Debug CQ trybot.

BUG=skia:4768
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577873002

Review URL: https://codereview.chromium.org/1577873002

8 years agoMove atomicinc in GrTracing to behind branch
joshualitt [Mon, 11 Jan 2016 16:30:47 +0000 (08:30 -0800)]
Move atomicinc in GrTracing to behind branch

TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1571603003

Review URL: https://codereview.chromium.org/1571603003

8 years agoReland of Add guards to GrTextureProvider (patchset #1 id:1 of https://codereview...
joshualitt [Mon, 11 Jan 2016 16:27:48 +0000 (08:27 -0800)]
Reland of Add guards to GrTextureProvider (patchset #1 id:1 of https://codereview.chromium.org/1565313003/ )

Reason for revert:
should be fixed

Original issue's description:
> Revert of Add guards to GrTextureProvider (patchset #5 id:80001 of https://codereview.chromium.org/1567983002/ )
>
> Reason for revert:
> breaking asan bot
>
> Original issue's description:
> > Add guards to GrTextureProvider
> >
> > TBR=bsalomon@google.com
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567983002
> >
> > Committed: https://skia.googlesource.com/skia/+/b30dd1db1d914b85a691b4724713ba1b0f16cd6c
>
> TBR=robertphillips@google.com,joshualitt@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/9a9515e081c54efdd5a0b0
f662c013cbeef6d63f

TBR=bsalomon@google.com
TBR=robertphillips@google.com,joshualitt@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review URL: https://codereview.chromium.org/1575093002

8 years agoFix radii calculation code to handle large radii.
herb [Mon, 11 Jan 2016 16:08:56 +0000 (08:08 -0800)]
Fix radii calculation code to handle large radii.

BUG=472147
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1569403002

Review URL: https://codereview.chromium.org/1569403002

8 years agodocs: Fix link to 'How to submit a patch'.
jcgregorio [Mon, 11 Jan 2016 15:42:33 +0000 (07:42 -0800)]
docs: Fix link to 'How to submit a patch'.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1579593002
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1579593002

Review URL: https://codereview.chromium.org/1579593002

8 years agoDelete reallyHasAlpha() from SkCodec
msarett [Mon, 11 Jan 2016 15:23:23 +0000 (07:23 -0800)]
Delete reallyHasAlpha() from SkCodec

TBR=reed
BUG=skia:3582
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1557403002

Review URL: https://codereview.chromium.org/1557403002

8 years agoMake SkROBuffer::Iter::size() work when exhausted
scroggo [Mon, 11 Jan 2016 14:38:00 +0000 (06:38 -0800)]
Make SkROBuffer::Iter::size() work when exhausted

According to the documentation, this method will return 0 when the Iter
is exhausted. Prior to this CL, it crashes instead.

Prevent a crash with a null fHead, and add a test to verify the
behavior.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574603002

Review URL: https://codereview.chromium.org/1574603002

8 years agoblacklist cpu cacherator tests in replay modes
mtklein [Mon, 11 Jan 2016 14:30:47 +0000 (06:30 -0800)]
blacklist cpu cacherator tests in replay modes

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE-Trybot,Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86-Debug-Trybot

BUG=skia:4703
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1570323004

Review URL: https://codereview.chromium.org/1570323004

8 years agoMight as well inline these premultiplies.
mtklein [Mon, 11 Jan 2016 14:16:26 +0000 (06:16 -0800)]
Might as well inline these premultiplies.

We're paying quite a bit of function-call overhead per pixel.

On one test image we spend 3.5% of our total time in swizzle_rgba_to_n32_premul() and 8.8% of our total time in SkPreMultiplyARGB().  That turns into just 8.8% of our total time in swizzle_rgba_to_n32_premul() after inlining.

That's about a 30% speedup.

This will make SIMD procs look worse, so it's nice to land this first.

BUG=skia:4767
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1571923002

Review URL: https://codereview.chromium.org/1571923002

8 years agoUpdate SKP version
update-skps [Sun, 10 Jan 2016 08:35:26 +0000 (00:35 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1576773002

Review URL: https://codereview.chromium.org/1576773002

8 years agoremove SkImage::applyFilter() -- unused, can always re-add later
reed [Sat, 9 Jan 2016 01:21:47 +0000 (17:21 -0800)]
remove SkImage::applyFilter() -- unused, can always re-add later

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1573653002

Review URL: https://codereview.chromium.org/1573653002

8 years agoImplement an SkPaint-based image filter
ajuma [Fri, 8 Jan 2016 22:58:35 +0000 (14:58 -0800)]
Implement an SkPaint-based image filter

This implements SkPaintImageFilter, and is intended to replace
SkRectShaderImageFilter. By allowing a paint and not just a
shader as input, this allows consumers to control dithering.

BUG=skia:4780
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1556553002

Review URL: https://codereview.chromium.org/1556553002

8 years agoAdd --zero_init to simulate zero-initialized memory in CodecBench
mtklein [Fri, 8 Jan 2016 22:20:36 +0000 (14:20 -0800)]
Add --zero_init to simulate zero-initialized memory in CodecBench

BUG=skia:4767
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1572673004

Review URL: https://codereview.chromium.org/1572673004

8 years agoFixed an assertion error in GrAAConvexTessellator. While adding a new point, it would...
ethannicholas [Fri, 8 Jan 2016 22:09:18 +0000 (14:09 -0800)]
Fixed an assertion error in GrAAConvexTessellator. While adding a new point, it would check that the new point was not a duplicate of the previous point. It would then drop the previous point if it was in the middle of a straight line, and proceed to add the new point.

Unfortunately, floating point precision issues mean that sometimes, after dropping the previous point, we'd end up with the newly-added point as a duplicate of the new previous point, tripping an assertion failure.

BUG=skia:4732
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1557903002

Review URL: https://codereview.chromium.org/1557903002

8 years agoRemove work from constructors to facilitate debugging.
herb [Fri, 8 Jan 2016 21:48:43 +0000 (13:48 -0800)]
Remove work from constructors to facilitate debugging.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1562093002

Review URL: https://codereview.chromium.org/1562093002

8 years agoAdd a class representing texture swizzle.
bsalomon [Fri, 8 Jan 2016 21:20:12 +0000 (13:20 -0800)]
Add a class representing texture swizzle.

Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.

Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005

Committed: https://skia.googlesource.com/skia/+/1a1efeacf7cc94a8c2977114dfe230fed3efc105

Review URL: https://codereview.chromium.org/1567733005

8 years agoClean up order of arguments to d,s[,aa].
mtklein [Fri, 8 Jan 2016 20:12:43 +0000 (12:12 -0800)]
Clean up order of arguments to d,s[,aa].

This gets rid of those unsightly lambdas,
and makes the file more consistent both with itself and with Sk4px.

BUG=skia:4765
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1569373002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1569373002

8 years agoRevert of Add a class representing texture swizzle. (patchset #6 id:100001 of https...
mtklein [Fri, 8 Jan 2016 20:11:39 +0000 (12:11 -0800)]
Revert of Add a class representing texture swizzle. (patchset #6 id:100001 of https://codereview.chromium.org/1567733005/ )

Reason for revert:
Shader compilation failures when implicitly converting vec4 to float.

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX960-x86_64-Debug/builds/3266/steps/dm/logs/stdio

https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-Nexus6-GPU-Adreno420-Arm7-Debug/builds/3154/steps/dm/logs/stdio

Original issue's description:
> Add a class representing texture swizzle.
>
> Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.
>
> Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005
>
> Committed: https://skia.googlesource.com/skia/+/1a1efeacf7cc94a8c2977114dfe230fed3efc105

TBR=egdaniel@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1569393002

8 years agoClean up SkXfermode_opts.h
mtklein [Fri, 8 Jan 2016 19:45:21 +0000 (11:45 -0800)]
Clean up SkXfermode_opts.h

It seems that MSVC + __vectorcall don't play well together,
so back ourselves out into a situation where we don't need it.

   - Inline transfermode functions.  This removes the need for SK_VECTORCALL.
   - Remove 565 destination specializations.
     Blending into 565 is not speed-critical enough to merit the code bloat.
   - Removing 565 specializations means a bunch of Sk4px code is now dead.

8888 xfermodes generally speed up a bit from inlining, smoothly ranging from no change down to 0.65x for the fastest functions like Plus or Modulate.

565 xfermodes generally slow down because we're doing 565 -> 8888 and 8888->565 conversion serially[1] and using the stack, smoothly ranging from no change up to 2x slower for the fastest functions like Plus and Modulate.

[1] the 565->8888 conversion is actually being autovectorized

BUG=skia:4765,skia:4776
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1565223002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1565223002

8 years agoAdd a class representing texture swizzle.
bsalomon [Fri, 8 Jan 2016 19:38:41 +0000 (11:38 -0800)]
Add a class representing texture swizzle.

Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.

Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005

Review URL: https://codereview.chromium.org/1567733005

8 years agofix opacity check in SkBitmapDevice::Create
lsalzman [Fri, 8 Jan 2016 19:20:14 +0000 (11:20 -0800)]
fix opacity check in SkBitmapDevice::Create

BUG=skia:4777
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1576453002

Review URL: https://codereview.chromium.org/1576453002

8 years agoUse ::std for is_empty, is_class, add_xxx_reference, remove decay.
bungeman [Fri, 8 Jan 2016 19:05:09 +0000 (11:05 -0800)]
Use ::std for is_empty, is_class, add_xxx_reference, remove decay.

SkTLogic.h contains implemenetations of is_empty, is_class, decay,
decay_t, add_lvalue_reference, add_rvalue_reference, and
add_rvalue_reference_t. The declaration of is_class is only used by
is_empty. The current implementation of is_empty will not work
correctly with 'final'. The current implementation of
add_lvalue_reference does not support clarifications in c++17. No Skia
code is currently using decay, decay_t, add_rvalue_reference, and
add_rvalue_reference_t. In addition, there are no known issues with
any of these in ::std with any supported compiler.

The implementations of is_function and is_convertible are commented to
note why they are still present.

Review URL: https://codereview.chromium.org/1567123006

8 years agoDM: more invariants
mtklein [Fri, 8 Jan 2016 18:19:35 +0000 (10:19 -0800)]
DM: more invariants

  - add ViaPicture
  - run ViaPicture on most bots
  - run ViaSecondPicture (tests SkPictureRecorder reuse) and ViaTwice (tests caching) on some bots
  - extend ViaSerialization reference checking to ViaPicture, ViaSecondPicture,
    ViaSingletonPictures, and ViaTwice
  - suppress current reference check failures with --blacklist

I'm open to following up on changing how those suppressions work.

Passing --nocheck turns off these invariant checks, letting us debug failures with normal image diff tools.

CQ_EXTRA_TRYBOTS=client.skia:Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot

BUG=skia:4769
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1569823006

Review URL: https://codereview.chromium.org/1569823006

8 years agoReland of Make a single GrSingleOwner in GrContext (patchset #1 id:1 of https://coder...
joshualitt [Fri, 8 Jan 2016 18:09:13 +0000 (10:09 -0800)]
Reland of Make a single GrSingleOwner in GrContext (patchset #1 id:1 of https://codereview.chromium.org/1565303003/ )

Reason for revert:
trying again

Original issue's description:
> Revert of Make a single GrSingleOwner in GrContext (patchset #3 id:40001 of https://codereview.chromium.org/1563703004/ )
>
> Reason for revert:
> breaking asan
>
> Original issue's description:
> > Make a single GrSingleOwner in GrContext
> >
> > TBR=bsalomon@google.com
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563703004
> >
> > Committed: https://skia.googlesource.com/skia/+/f9bc796e0dbd31674c22b34761913ee6e8fdd66a
>
> TBR=robertphillips@google.com,joshualitt@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/94da292e39db0d41da08b1d6055ca5e0d6b498cc

TBR=robertphillips@google.com,joshualitt@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1572653002

8 years agoRemove "unused" parameter from filterInputGPU
robertphillips [Fri, 8 Jan 2016 17:28:23 +0000 (09:28 -0800)]
Remove "unused" parameter from filterInputGPU
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1569553007

Review URL: https://codereview.chromium.org/1569553007

8 years agounify how canvas checks for null on skia objects (images, blobs, pictures)
reed [Fri, 8 Jan 2016 17:18:44 +0000 (09:18 -0800)]
unify how canvas checks for null on skia objects (images, blobs, pictures)

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1568613008

Review URL: https://codereview.chromium.org/1568613008

8 years agoMove config texturability/renderability to config table.
bsalomon [Fri, 8 Jan 2016 17:12:44 +0000 (09:12 -0800)]
Move config texturability/renderability to config table.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563443002

Committed: https://skia.googlesource.com/skia/+/32a3cd2f2860b15a842a6aa49e4e6a3bed04f949

Review URL: https://codereview.chromium.org/1563443002