Commit Graph

19936 Commits

Author SHA1 Message Date
bsalomon
489147c78b Add option to control maximum GrBatch lookback
Review URL: https://codereview.chromium.org/1498653002
2015-12-14 12:13:09 -08:00
ethannicholas
1cbb5ea0a0 Switch fragment coordinate to 'highp' to fix various broken GMs.
BUG=skia:4693

Review URL: https://codereview.chromium.org/1523793002
2015-12-14 11:37:55 -08:00
mtklein
6f37b4a475 Unify some SkNx code
- one base case and one N=1 case instead of two each (or three with doubles)
 - use SkNx_cast instead of FromBytes/toBytes
 - 4-at-a-time Sk4f::ToBytes becomes a special standalone Sk4f_ToBytes

If I did everything right, this'll be perf- and pixel- neutral.

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

BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1526523003
2015-12-14 11:25:18 -08:00
mtklein
4e4155df10 Revert of SkTime updates (patchset #2 id:20001 of https://codereview.chromium.org/1521293002/ )
Reason for revert:
linux Canary builder has no std::steady_clock.  Weird...

Original issue's description:
> SkTime updates
>
> 1) Use steady_clock instead of high_resolution_clock. If we don't have a
> guarantee of monotonicity, it's pretty much useless for timing things.
>
> 2) Implement Mac/iOS with <chrono> too.  This was waiting on C++11 library support.
>
> Both high_resolution_clock and steady_clock are (still) busted on MSVC 2013,
> so no change there.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/6a20871e5aeaa7e61f3348694bf436af16f824b9

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

Review URL: https://codereview.chromium.org/1529603002
2015-12-14 10:54:24 -08:00
halcanary
023bda0d83 SkBitmap move
Running `Release/dm --gpu 0`, the number of times we call
	SkBitmap::operator=(const SkBitmap&)
(which refs the pixelref) is reduced from ~214929 to ~214626.

Review URL: https://codereview.chromium.org/1514503004
2015-12-14 10:19:17 -08:00
borenet
c9730831fc adb_wait_for_device: Add battery fallback, support no battery
BUG=skia:4690
TBR=rmistry

Review URL: https://codereview.chromium.org/1528563002
2015-12-14 10:07:37 -08:00
halcanary
7d1c3e6361 Documentation: HarfBuzz link
NOTRY=true
TBR=caryclark@google.com

Review URL: https://codereview.chromium.org/1526683002
2015-12-14 10:03:31 -08:00
halcanary
a58d67603b Documentation: text shaping
NOTRY=true
DOCS_PREVIEW= https://skia.org/user/tips?cl=1523023002#kerning

Review URL: https://codereview.chromium.org/1523023002
2015-12-14 09:50:15 -08:00
caryclark
364a0074c3 path ops: check for deleted ends
TBR=fmalita@chromium.org
BUG=569540

Review URL: https://codereview.chromium.org/1524803002
2015-12-14 08:43:21 -08:00
mtklein
6a20871e5a SkTime updates
1) Use steady_clock instead of high_resolution_clock. If we don't have a
guarantee of monotonicity, it's pretty much useless for timing things.

2) Implement Mac/iOS with <chrono> too.  This was waiting on C++11 library support.

Both high_resolution_clock and steady_clock are (still) busted on MSVC 2013,
so no change there.

BUG=skia:

Review URL: https://codereview.chromium.org/1521293002
2015-12-14 08:39:13 -08:00
caryclark
9aacd9029c If a point is on a path edge, it's in the path, at least for all cases where the path edge is not canceled with another edge through coincidence.
Add test cases for edges and conics, and make sure it all works.

R=reed@google.com
BUG=skia:4669,4265

Review URL: https://codereview.chromium.org/1517883002
2015-12-14 08:38:09 -08:00
borenet
b11c4ff668 adb_wait_for_device: If we can't get the battery level, just exit
BUG=skia:4606
TBR=rmistry
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/1529453002
2015-12-14 06:48:43 -08:00
reed
4ff653cab2 Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #12 id:220001 of https://codereview.chromium.org/1490113005/ )
Reason for revert:
speculative revert to see if it unblocks the DEPS roll

https://codereview.chromium.org/1529443002

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
>     --config:	type: string	default: 565 8888 gpu nonrendering
>         Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
>         nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
>         xps or use extended form 'backend(option=value,...)'.
>
>         Extended form: 'backend(option=value,...)'
>
>         Possible backends and options:
>
>         gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
>         	api	type: string	default: native.
>         	    Select graphics API to use with gpu backend.
>         	    Options:
>         		native			Use platform default OpenGL or OpenGL ES backend.
>         		gl    			Use OpenGL.
>         		gles  			Use OpenGL ES.
>         		debug 			Use debug OpenGL.
>         		null  			Use null OpenGL.
>         	dit	type: bool	default: false.
>         	    Use device independent text.
>         	nvpr	type: bool	default: false.
>         	    Use NV_path_rendering OpenGL and OpenGL ES extension.
>         	samples	type: int	default: 0.
>         	    Use multisampling with N samples.
>
>         Predefined configs:
>
>         	gpu      	= gpu()
>         	msaa4    	= gpu(samples=4)
>         	msaa16   	= gpu(samples=16)
>         	nvprmsaa4	= gpu(nvpr=true,samples=4)
>         	nvprmsaa16	= gpu(nvpr=true,samples=16)
>         	gpudft    	= gpu(dit=true)
>         	gpudebug  	= gpu(api=debug)
>         	gpunull   	= gpu(api=null)
>         	debug     	= gpu(api=debug)
>         	nullgpu   	= gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23

TBR=bsalomon@google.com,scroggo@google.com,joshualitt@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1528473002
2015-12-14 05:58:25 -08:00
borenet
0b29b728ca Add minimum battery level to adb_wait_for_device
This should prevent the Android bots running out of battery at the
expense of extra time spent waiting at the end of the build.

BUG=skia:4606

Review URL: https://codereview.chromium.org/1522013002
2015-12-14 05:56:46 -08:00
kkinnunen
e13ca329fc Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
    --config:	type: string	default: 565 8888 gpu nonrendering
        Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
        nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
        xps or use extended form 'backend(option=value,...)'.

        Extended form: 'backend(option=value,...)'

        Possible backends and options:

        gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
        	api	type: string	default: native.
        	    Select graphics API to use with gpu backend.
        	    Options:
        		native			Use platform default OpenGL or OpenGL ES backend.
        		gl    			Use OpenGL.
        		gles  			Use OpenGL ES.
        		debug 			Use debug OpenGL.
        		null  			Use null OpenGL.
        	dit	type: bool	default: false.
        	    Use device independent text.
        	nvpr	type: bool	default: false.
        	    Use NV_path_rendering OpenGL and OpenGL ES extension.
        	samples	type: int	default: 0.
        	    Use multisampling with N samples.

        Predefined configs:

        	gpu      	= gpu()
        	msaa4    	= gpu(samples=4)
        	msaa16   	= gpu(samples=16)
        	nvprmsaa4	= gpu(nvpr=true,samples=4)
        	nvprmsaa16	= gpu(nvpr=true,samples=16)
        	gpudft    	= gpu(dit=true)
        	gpudebug  	= gpu(api=debug)
        	gpunull   	= gpu(api=null)
        	debug     	= gpu(api=debug)
        	nullgpu   	= gpu(api=null)

BUG=skia:2992

Review URL: https://codereview.chromium.org/1490113005
2015-12-14 04:49:17 -08:00
kkinnunen
aab16e54cb Try to fix intermittent GrAutoLocaleSetter crashes on Windows
Try to fix intermittent GrAutoLocaleSetter crashes on Windows.
The string returned by setlocale() is only valid up to
next setlocale(), so it can not be fed to setlocale().

Also, libraries such as ANGLE might call setlocale when
inside a callstack containing GrAutoLocaleSetter. This
would render the old locale pointer invalid.

Review URL: https://codereview.chromium.org/1514083002
2015-12-13 23:12:31 -08:00
update-skps
4837392191 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

Review URL: https://codereview.chromium.org/1522753002
2015-12-13 00:31:51 -08:00
benjaminwagner
a1bb8e02fe In SkPixmap.cpp, change SkAlphaMul to SkMulDiv255.
Add a test that we get the same color back after calling SkBitmap::eraseColor, modulo rounding.

Also update some incorrect docs.

BUG=skia:4297

Review URL: https://codereview.chromium.org/1521673002
2015-12-11 14:08:59 -08:00
mtklein
52e2581700 archive skpx... currently dead code
BUG=skia:
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1521623003
2015-12-11 12:04:48 -08:00
benjaminwagner
0ff46c06b7 Change google3 sync scripts to sync latest rather than LKGR.
This matches the behavior of the autoroller and is generally more useful.

BUG=skia:

Review URL: https://codereview.chromium.org/1508313004
2015-12-11 11:26:44 -08:00
joshualitt
5425a9a180 A change to cleanup some organization around df text
BUG=skia:

Review URL: https://codereview.chromium.org/1519083002
2015-12-11 11:05:43 -08:00
fmalita
cad54b5366 New GM: image_scale_aligned
To verify alignment for various image scaling modes.

BUG=skia:4649
R=reed@google.com

Review URL: https://codereview.chromium.org/1514923002
2015-12-11 11:03:27 -08:00
msarett
457f54df1e Change computeOutputColorType() to mimic old behavior
This will prevent behavior changes in BitmapFactory when
switching from SkImageDecoder to SkAndroidCodec.

We will only choose kGray8 if it is explicitly requested (and
also supported).

Additionally, we will always decode GIFS and WBMPS to
kIndex8.

BUG=skia:

Review URL: https://codereview.chromium.org/1519843002
2015-12-11 10:37:39 -08:00
scroggo
061aaa79f7 Add test for previously unflattenables
BUG=skia:4613

Review URL: https://codereview.chromium.org/1514373003
2015-12-11 10:29:02 -08:00
scroggo
28e80f4013 Fix a crash in SkParsePath::FromSVGString
BUG=skia:3491

Review URL: https://codereview.chromium.org/1515193002
2015-12-11 09:49:57 -08:00
joshualitt
46646506f1 remove explicit 'f' in glbench shader
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1503383006
2015-12-11 08:31:17 -08:00
benjaminwagner
b6c77f6d62 In BUILD.public, enable SK_SUPPORT_LEGACY_HAIR_IGNORES_CAPS.
Somehow https://codereview.chromium.org/1491843006 causes fills to change in one test.

BUG=skia:

Review URL: https://codereview.chromium.org/1516863007
2015-12-11 07:54:24 -08:00
msarett
9a0e3467da Make BitmapRegionDecoder succeed on invalid requests
If the client requests a color type or alpha type that is
not supported, we should decode to the default/appropriate
color and alpha types to match existing behavior in Android.

BUG=skia:

Review URL: https://codereview.chromium.org/1513023002
2015-12-11 07:38:50 -08:00
joshualitt
e804292e80 Move all text stuff to its own folder
BUG=skia:

Review URL: https://codereview.chromium.org/1521453002
2015-12-11 06:11:21 -08:00
joshualitt
296779832f make internaldrawBmpText part of GrTextUtils
BUG=skia:

Review URL: https://codereview.chromium.org/1518883002
2015-12-11 06:09:00 -08:00
robertphillips
2eb1009b6e Add check for highp support in Conic effect
This CL may not really be necessary since it seems that the Android Ones we have fall back to mediump when highp isn't supported.

FYI, for bits-of-precision/precision we have:

                        Low Med High Precision-Used
A1 (Cherry One - Mali 400) 10 10 0  Med        - conic looks bad
N5 (Adreno 330)            10 10 23 High       - conic looks bad!!!
N6 (Adreno 420)            10 10 23 High       - conic looks good
N7v2 (Adreno 320)          10 10 23 High       - conic looks bad!!!
N9 (K1)                    23 23 23 High       - looks good
N10 (Mail-604)             10 10 23 High       - looks good

I suspect derivative computation is broken on the Adreno 300s.

BUG=555779,skia:4668
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1513573009
2015-12-11 04:59:36 -08:00
kkinnunen
546eb5c57a Initialize glGen* call id args to zero
Initialize glGenTexture, glGenBuffer call id buffer items to zero before
calls. Otherwise it's not easy to check if the call succeeded or not.

Assert the rule in debug gl context.

Make TesselatingPathRendererTests use debug gl context. It exercises
some of the GenBuffers call sites.

Review URL: https://codereview.chromium.org/1514033002
2015-12-11 00:05:34 -08:00
kkinnunen
55eeae9722 Run debug gl context for DEF_GPU_TEST_FOR_ALL_CONTEXTS
Run debug gl context for tests defined with
DEF_GPU_TEST_FOR_ALL_CONTEXTS.

Review URL: https://codereview.chromium.org/1514023002
2015-12-10 23:19:29 -08:00
msarett
62d3b10110 Revert of DM: fix --config $VIA-pdf to not crash (patchset #3 id:40001 of https://codereview.chromium.org/1513323002/ )
Reason for revert:
I believe that this is breaking master-skia in Android.

Original issue's description:
> DM: fix `--config $VIA-pdf` to not crash
>
> Committed: https://skia.googlesource.com/skia/+/6bce4177cb72faac9c10d01d57e17168ae7ecadf

TBR=mtklein@google.com,halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1513053004
2015-12-10 15:14:27 -08:00
msarett
7d2e2fadbd Remove flag needed by outdated libpng
BUG=skia:

Review URL: https://codereview.chromium.org/1514873003
2015-12-10 14:45:03 -08:00
mtklein
cff15aa36d yet another memcpy -> sk_careful_memcpy
will fix
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN/builds/3834

No API changes.
TBR=reed@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1514923003
2015-12-10 14:34:23 -08:00
cdalton
78f915e2f1 Add a warmup flag to visualbench
Adds a flag to control whether we use a warmup bench.

BUG=skia:

Review URL: https://codereview.chromium.org/1468233003
2015-12-10 14:20:06 -08:00
herb
9449616020 Fix UB function problems for AA merger.
BUG=skia:4634

Review URL: https://codereview.chromium.org/1518863002
2015-12-10 14:17:41 -08:00
aam
419c37269f Fix 'debugging on Android' android_gdb_app script.
1) com.skia -> com.skia.sample_app
2) pass arguments to android_gdb_app to android_setup.sh so you can build gdbserver binaries for your actual device(rather than default arm64). This allows you to run it like this for example:

  ./platform_tools/android/bin/android_gdb_app -d nexus_6

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1509853006

Review URL: https://codereview.chromium.org/1509853006
2015-12-10 14:14:56 -08:00
herb
30da5f7a1e Change SkTaskGroup to use std::function. Ripple all the changes.
BUG=skia:4634

Review URL: https://codereview.chromium.org/1519573003
2015-12-10 14:12:33 -08:00
scroggo
9fba909792 Use size_t for strlen() return value
BUG=skia:2810

Review URL: https://codereview.chromium.org/1518843002
2015-12-10 13:46:04 -08:00
reed
70ee31b2fa try adding flag to allow lcd text even in a layer
BUG=skia:

Review URL: https://codereview.chromium.org/1513513002
2015-12-10 13:44:45 -08:00
scroggo
96f16e835e Use DEF_GM everywhere
BUG=skia:1902

Review URL: https://codereview.chromium.org/1518893002
2015-12-10 13:31:59 -08:00
robertphillips
4e56772432 Address precision issue in circle blur effect
BUG=560651

Review URL: https://codereview.chromium.org/1504333003
2015-12-10 13:29:14 -08:00
joshualitt
0a42e6827b Create GrTextUtils
BUG=skia:

Review URL: https://codereview.chromium.org/1514933002
2015-12-10 13:20:58 -08:00
msarett
90c4d5fec8 Add reallyHasAlpha() to SkAndroidCodec
This also modified the default implementation
of onReallyHasAlpha() in SkCodec.

BUG=skia:

Review URL: https://codereview.chromium.org/1518743002
2015-12-10 13:09:24 -08:00
halcanary
6bce4177cb DM: fix --config $VIA-pdf to not crash
Review URL: https://codereview.chromium.org/1513323002
2015-12-10 12:46:42 -08:00
halcanary
f2848b6035 default SkPixelSerializer
Add SkImageEncoder::EncodeData(const SkPixmap&, ...) function.

Add SkImageEncoder::CreatePixelSerializer() to return a
PixelSerializer that calls into SkImageEncoder::EncodeData.

SkImage::encode() make use of SkImageEncoder::CreatePixelSerializer.

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

Committed: https://skia.googlesource.com/skia/+/808ce2886d732b1055f89c8fb0f1b11b47fcb0ce

Review URL: https://codereview.chromium.org/1507123002
2015-12-10 12:40:23 -08:00
borenet
1812fa225d Add buildbot spec for Android One bots
BUG=skia:

Review URL: https://codereview.chromium.org/1517733002
2015-12-10 12:09:14 -08:00
xidachen
467ddc0b24 SkBlurImageFilter returns input when sigma = 0
In the current implementation, a blur filter is always created even in the
case when sigma.fX == 0 && sigma.fY == 0. This CL makes the blur filter
return input in this case.

BUG=568393

Review URL: https://codereview.chromium.org/1518643002
2015-12-10 12:08:44 -08:00