Commit Graph

22389 Commits

Author SHA1 Message Date
bsalomon
7a5bcc5f59 Make Sk32ToBool inline again to silence compiler warning.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2007753003

Review-Url: https://codereview.chromium.org/2007753003
2016-05-24 13:23:56 -07:00
halcanary
5d04fda877 CMake: skia_link_arguments.txt repects BUILD_SHARED_LIBS
.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2007093002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review-Url: https://codereview.chromium.org/2007093002
2016-05-24 11:23:23 -07:00
msarett
e077e0683a SkColorSpace tweaks
***Move includes to the correct file
***Add "const"
***Use std::move for more efficient refs and unrefs

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2005263002

Review-Url: https://codereview.chromium.org/2005263002
2016-05-24 10:16:53 -07:00
mtklein
7dd44673e0 CMake: control static/shared the normal CMake way.
This flips the default build mode to create a static libskia.

To create a shared libskia, pass -DBUILD_SHARED_LIBS=1 when running cmake.

BUG=skia:5341
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2009503002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review-Url: https://codereview.chromium.org/2009503002
2016-05-24 09:44:05 -07:00
bungeman
6d195b22bf Use nullptr instead of 0 in call to FontConfig.
Review-Url: https://codereview.chromium.org/2000253005
2016-05-24 08:08:20 -07:00
mtklein
2cb49bd7e9 pthread_once -> SkOnce
one fewer sync primitive...

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2003163004

Review-Url: https://codereview.chromium.org/2003163004
2016-05-24 07:01:48 -07:00
scroggo
5221fef17b Remove extra DNG images and use smaller HTC.dng
Update SK_IMAGE_VERSION to 7. This removes the following files from
dm testing:

lg_g4_iso_800.dng
Fuji_X20.dng

These DNG images are very large, and cause us to use a lot of memory in
testing. Moreover, they do not test anything that is not covered by
HTC.dng

In addition, use the smaller version of HTC.dng (which is already in
use in dm) in nanobench.

BUG=skia:5307
BUG=skia:5283
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2007033002

Review-Url: https://codereview.chromium.org/2007033002
2016-05-24 06:23:47 -07:00
brianosman
a167e74b4b Remove sRGB overrides on GrTextureParams. Use GrPaint flags instead.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002253002

Review-Url: https://codereview.chromium.org/2002253002
2016-05-24 06:18:48 -07:00
halcanary
910fff4244 gyp: supress more warnings for zlib
TBR=

Review-Url: https://codereview.chromium.org/2008763003
2016-05-24 05:23:52 -07:00
scroggo
23b80c402a Revert of Blacklist HTC.dng on 32-bit Win CPU bots (patchset #1 id:1 of https://codereview.chromium.org/1995703002/ )
Reason for revert:
We think we have independently fixed this problem by using a smaller image for HTC.dng

Original issue's description:
> Blacklist HTC.dng on 32-bit Win CPU bots
>
> BUG=skia:5318
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1995703002
>
> Committed: https://skia.googlesource.com/skia/+/62efdbde9987df3422f677a1a7c8f355791c1ae4

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

Review-Url: https://codereview.chromium.org/2004203002
2016-05-23 14:35:52 -07:00
halcanary
3d5942e8a4 gyp: clean up warnings with clang-3.8
Also: update zlib DEPS.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002233002

Review-Url: https://codereview.chromium.org/2002233002
2016-05-23 14:02:54 -07:00
fmenozzi
c75d6a8e43 Add bubbles GM for drawing/blending 50 circles.
Positions, radii, and colors are determined pseudo-randomly.

R=tomhudson@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004173002

Review-Url: https://codereview.chromium.org/2004173002
2016-05-23 13:54:22 -07:00
herb
074b48ecb5 I have found a more efficient way of detecting 1 and 0 alpha in SSE2. In addition, I found a stall on an execution unit for the lea instruction and rearranged to code to avoid that.
Before
 1,362.01 LinearSrcOvericonstrip.pngVSkOptsSSE41
 2,132.54 LinearSrcOvericonstrip.pngVSkOptsDefault
 1,717.77 LinearSrcOvericonstrip.pngVSkOptsNonSimdCore
 3,525.14 LinearSrcOvericonstrip.pngVSkOptsTrivial
11,181.78 LinearSrcOvericonstrip.pngVSkOptsBruteForce
   644.77 LinearSrcOvermandrill_512.pngVSkOptsSSE41
   682.51 LinearSrcOvermandrill_512.pngVSkOptsDefault
 1,169.65 LinearSrcOvermandrill_512.pngVSkOptsNonSimdCore
 2,486.45 LinearSrcOvermandrill_512.pngVSkOptsTrivial
11,635.94 LinearSrcOvermandrill_512.pngVSkOptsBruteForce
   217.76 LinearSrcOverplane.pngVSkOptsSSE41
   437.09 LinearSrcOverplane.pngVSkOptsDefault
   275.91 LinearSrcOverplane.pngVSkOptsNonSimdCore
   481.70 LinearSrcOverplane.pngVSkOptsTrivial
 1,504.66 LinearSrcOverplane.pngVSkOptsBruteForce
   323.90 LinearSrcOverbaby_tux.pngVSkOptsSSE41
   497.49 LinearSrcOverbaby_tux.pngVSkOptsDefault
   456.08 LinearSrcOverbaby_tux.pngVSkOptsNonSimdCore
   786.46 LinearSrcOverbaby_tux.pngVSkOptsTrivial
 2,554.65 LinearSrcOverbaby_tux.pngVSkOptsBruteForce
   484.83 LinearSrcOveryellow_rose.pngVSkOptsSSE41
   821.86 LinearSrcOveryellow_rose.pngVSkOptsDefault
   655.37 LinearSrcOveryellow_rose.pngVSkOptsNonSimdCore
 1,323.80 LinearSrcOveryellow_rose.pngVSkOptsTrivial
 5,802.61 LinearSrcOveryellow_rose.pngVSkOptsBruteForce

After changes to sse2 and sse4.1
  1,343.12 LinearSrcOvericonstrip.pngVSkOptsSSE41
  1,441.17 LinearSrcOvericonstrip.pngVSkOptsDefault
  1,679.97 LinearSrcOvericonstrip.pngVSkOptsNonSimdCore
  3,481.05 LinearSrcOvericonstrip.pngVSkOptsTrivial
 10,979.99 LinearSrcOvericonstrip.pngVSkOptsBruteForce
    574.17 LinearSrcOvermandrill_512.pngVSkOptsSSE41
    641.40 LinearSrcOvermandrill_512.pngVSkOptsDefault
  1,169.44 LinearSrcOvermandrill_512.pngVSkOptsNonSimdCore
  2,359.84 LinearSrcOvermandrill_512.pngVSkOptsTrivial
 12,106.02 LinearSrcOvermandrill_512.pngVSkOptsBruteForce
    209.95 LinearSrcOverplane.pngVSkOptsSSE41
    249.12 LinearSrcOverplane.pngVSkOptsDefault
    270.36 LinearSrcOverplane.pngVSkOptsNonSimdCore
    466.30 LinearSrcOverplane.pngVSkOptsTrivial
  1,431.14 LinearSrcOverplane.pngVSkOptsBruteForce
    309.70 LinearSrcOverbaby_tux.pngVSkOptsSSE41
    354.86 LinearSrcOverbaby_tux.pngVSkOptsDefault
    442.69 LinearSrcOverbaby_tux.pngVSkOptsNonSimdCore
    764.12 LinearSrcOverbaby_tux.pngVSkOptsTrivial
  2,756.16 LinearSrcOverbaby_tux.pngVSkOptsBruteForce
    457.70 LinearSrcOveryellow_rose.pngVSkOptsSSE41
    500.50 LinearSrcOveryellow_rose.pngVSkOptsDefault
    677.84 LinearSrcOveryellow_rose.pngVSkOptsNonSimdCore
  1,301.50 LinearSrcOveryellow_rose.pngVSkOptsTrivial
  5,786.40 LinearSrcOveryellow_rose.pngVSkOptsBruteForce

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

Review-Url: https://codereview.chromium.org/1998373002
2016-05-23 13:50:12 -07:00
jvanverth
1d15596200 Add Xlib support to viewer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1999213002

Review-Url: https://codereview.chromium.org/1999213002
2016-05-23 13:13:36 -07:00
egdaniel
50134ccafd Enable stencil wrap ops on vulkan
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002213002

Review-Url: https://codereview.chromium.org/2002213002
2016-05-23 12:34:38 -07:00
liyuqian
566c8e4a36 Move inval dedup to Window for wider usages.
It turns out that the inval dedup is not just useful for Android.  Hence
we move it up to the Window level so more OSes such as Linux, Windows
can also use it.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2001153002

Review-Url: https://codereview.chromium.org/2001153002
2016-05-23 10:52:34 -07:00
msarett
888dc16684 Test color correction in DM
This will allow me to test and visualize some assumptions
on parsing and applying color profiles.  Also, it should
help me find and fix bugs.

This is certainly not an optimized implementation, and, as
far as I know, it doesn't take any shortcuts to improve
performance.  We'll probably want to do both of these
once we know where it fits in the pipeline.

Right now this test is only run on an arbitrary set of ~100
images from the top 10k skps.  I'll continue to add more
"interesting" images and probably tweak the code as
necessary.

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

Review-Url: https://codereview.chromium.org/1995233003
2016-05-23 10:21:17 -07:00
msarett
3d7356a833 Update image testing to version 6
This replaces the old HTC.dng test image (~40 MB) with a much smaller
HTC.dng (~125 kb).

This should limit OOM errors on our bots and improve the speed of the
tests suite.

BUG=skia:5283
BUG=skia:5307
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004113002

Review-Url: https://codereview.chromium.org/2004113002
2016-05-23 10:19:27 -07:00
brianosman
8879186d89 Enable tri-linear and NPOT-tiling support in Vulkan
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004123002

Review-Url: https://codereview.chromium.org/2004123002
2016-05-23 10:15:27 -07:00
brianosman
a56800a05d Add vksrgb config to dm (Vulkan sRGB). Fix help formatting of vk.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2005863002

Review-Url: https://codereview.chromium.org/2005863002
2016-05-23 10:11:07 -07:00
msarett
8cc2091118 Make SkColorSpace a public API
I've trimmed uniqueID for now, and added some comments.

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

Review-Url: https://codereview.chromium.org/1996973002
2016-05-23 09:29:29 -07:00
halcanary
a0af771612 SkTypes: use constexpr when appropriate
motivation: https://codereview.chromium.org/2000853003

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004073002

Review-Url: https://codereview.chromium.org/2004073002
2016-05-23 09:11:59 -07:00
halcanary
f0270c32c1 fiddle: srand(0) before draw(canvas)
TBR=

Review-Url: https://codereview.chromium.org/2003043002
2016-05-23 09:02:38 -07:00
brianosman
c9986b6b5d Pretend that Adreno4xx doesn't have sRGB write control.
BUG=skia:5329
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1998953003

Review-Url: https://codereview.chromium.org/1998953003
2016-05-23 06:23:28 -07:00
update-skps
719d455ce2 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004773002

Review-Url: https://codereview.chromium.org/2004773002
2016-05-22 00:35:10 -07:00
scroggo
1a3619236b Remove unnecessary check
Follow-on from crrev.com/1996993003

No need to check the alpha type. If the color type is gray, the
source alpha type will be opaque.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002723002

Review-Url: https://codereview.chromium.org/2002723002
2016-05-20 14:27:16 -07:00
scroggo
ba5848953e Finish supporting decoding opaque to non-opaque
When decoding to 565 or Gray, allow the client to incorrectly ask for premul.

When checking whether it's possible to decode to 565, return whether the
source is opaque.

In DM, allow decoding to 565 or Gray, even if the client also asked for premul.

This fixes a bug introduced in crrev.com/1999593003 when we stopped ever
requesting Opaque, resulting in us not testing 565 or Gray.

BUG=skia:4616
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1996993003

Review-Url: https://codereview.chromium.org/1996993003
2016-05-20 13:56:13 -07:00
liyuqian
17b4a10921 Save comparisons for release.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1997003003

Review-Url: https://codereview.chromium.org/1997003003
2016-05-20 12:41:49 -07:00
liyuqian
beb1c67c9d Use SkASSERTResult to avoid unused local variables
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2003653002

Review-Url: https://codereview.chromium.org/2003653002
2016-05-20 11:41:01 -07:00
stephana
de8af07e41 Remove custom bundle ID for iOS
BUG=skia:
R=borenet
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1998273002

Review-Url: https://codereview.chromium.org/1998273002
2016-05-20 11:20:38 -07:00
robertphillips
87f15c8ff1 Retract GrRenderTarget from GrTestTarget
Split out of: https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)

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

Review-Url: https://codereview.chromium.org/2004433002
2016-05-20 11:14:33 -07:00
scroggo
f2c96a2a6f Only decode opaque to premul in DM image
Previously, we would test decoding an opaque SkCodec to all three:
kUnpremul,
kPremul,
kOpaque

The image should look the same in all three cases. We already test for
that in CodecTest [1], where we require that the result matches exactly.
CodecTest runs on a smaller set of images, but it covers a variety of
opaque images. No need to test on all opaque images.

Running locally on my Mac laptop, the following command:

    dm --src image --images resources/

dropped from:
5932 srcs
11.2s

to:

3544 srcs
6.69s

for a 40% speedup.

BUG=skia:5307

[1] https://skia.googlesource.com/skia/+/master/tests/CodecTest.cpp#119
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1999593003

Review-Url: https://codereview.chromium.org/1999593003
2016-05-20 11:08:27 -07:00
halcanary
e76ca8b9c2 gyp (third_party) warning changes for ccache
Also fix a broken unit test in MatrixTest.cpp.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002663002

Review-Url: https://codereview.chromium.org/2002663002
2016-05-20 10:36:50 -07:00
bsalomon
82ad93c356 When building circle blur profile evaluate kernel vertically once per column
BUG=skia:5224
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1991413002

Review-Url: https://codereview.chromium.org/1991413002
2016-05-20 09:11:17 -07:00
bsalomon
809f258670 Make LinearSrcOverBench not crash in constructor when resource path is missing
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1998113003

Review-Url: https://codereview.chromium.org/1998113003
2016-05-20 08:54:23 -07:00
scroggo
9366aff1fa Stop creating CodecSrcs with unused scale
Only JPEG and WEBP support native scaling, so only create a CodecSrc
with a scale for those types.

If I run

    dm --src image --images resources

this cuts down the number of Srcs from 11063 to 8032. All of these
trimmed Srcs would have failed quickly for each Sink (3 Sinks with the
above flags), but this will avoid creating them.

It drops the runtime on my mac from 13.2s to 11.4s, for about a 14%
speedup.

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

Review-Url: https://codereview.chromium.org/1999103002
2016-05-20 08:38:54 -07:00
senorblanco
56f7dfebac Adjust size of imagemakewithfilter GM.
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=2003453003

Review-Url: https://codereview.chromium.org/2003453003
2016-05-20 07:59:09 -07:00
liyuqian
e46e4f075b Correct gesture scale and translation
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1996613002

Review-Url: https://codereview.chromium.org/1996613002
2016-05-20 07:32:19 -07:00
senorblanco
8775112717 Fix leak in SkImage_Gpu::onMakeSubset().
BUG=skia:5327
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2003573002

Review-Url: https://codereview.chromium.org/2003573002
2016-05-20 07:27:38 -07:00
djsollen
3be9923105 Fix android scripts now that the $HOST is always lowercase.
BUG=skia:5309
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1992873003

Review-Url: https://codereview.chromium.org/1992873003
2016-05-20 07:03:17 -07:00
robertphillips
0152d731e0 GrSWMaskHelper and GrSoftwarePathRenderer only need the textureProvider (not GrContext)
This is split out of: https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)

BUG=skia:

Review-Url: https://codereview.chromium.org/1993403002
2016-05-20 06:38:43 -07:00
scroggo
24a9bd711a Reduce the number of BRDSrcs run in DM
Testing to e.g. Index8 is useful, but not usefully different across
all sampleSizes and Modes. (Same for Gray.) Drop several Srcs.

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

Review-Url: https://codereview.chromium.org/1990173003
2016-05-20 06:02:42 -07:00
jvanverth
af236b5aa9 Add OpenGL context to Viewer.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978573003

Committed: https://skia.googlesource.com/skia/+/56a11e4d6f3d436a3c2497c9c9e71a117d78a93f

Review-Url: https://codereview.chromium.org/1978573003
2016-05-20 06:01:06 -07:00
rmistry
d88b0bec43 Fix Gold trybot results URL
BUG=skia:5324
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1996103002

Review-Url: https://codereview.chromium.org/1996103002
2016-05-20 03:50:01 -07:00
bsalomon
8b6fa5e8a9 Make GrAtlasTextBlob::run own effects it points to.
BUG=chromium:608566

Currently the run has bare pointers and the effects can be destroyed while a run is pointing at them.

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

Review-Url: https://codereview.chromium.org/1993213003
2016-05-19 16:23:47 -07:00
bsalomon
b525721907 Make circle blur profile computation separable
BUG=skia:5224
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1996653002

Review-Url: https://codereview.chromium.org/1996653002
2016-05-19 15:52:34 -07:00
senorblanco
5878dbdf1b Image filters: implement SkImage::makeWithFilter().
This API provides a way to directly filter a subregion of an SkImage
(usually texture-backed), and returns an SkImage which may include
extra padding, along with a size to indicate the active region.

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

Review-Url: https://codereview.chromium.org/1964043002
2016-05-19 14:50:29 -07:00
herb
57a69dc013 Make an embeddable container to hold linear pipelines.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1998793002

Review-Url: https://codereview.chromium.org/1998793002
2016-05-19 14:19:23 -07:00
robertphillips
82ec6e59b8 Retract GrRenderTarget from GLProgramsTest
Split out of https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)

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

Review-Url: https://codereview.chromium.org/1997773002
2016-05-19 14:01:05 -07:00
bsalomon
d1c71fd56c Attempt to improve lifetime management of SkGlyphCache in Ganesh atlas text code.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1983353003

Review-Url: https://codereview.chromium.org/1983353003
2016-05-19 12:51:46 -07:00