platform/upstream/libSkiaSharp.git
7 years agoUse a simpler method for calculating atan
Herb Derby [Thu, 13 Apr 2017 16:15:50 +0000 (12:15 -0400)]
Use a simpler method for calculating atan

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

7 years agore-disable lld on MSAN bots
Mike Klein [Thu, 13 Apr 2017 15:55:50 +0000 (11:55 -0400)]
re-disable lld on MSAN bots

When using lld, calls to clock_gettime() end up in the real libc
clock_gettime().  When using ld, calls to clock_gettime() end up in
__interceptor_clock_gettime().

Don't know why yet.

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

7 years agoChange infra recipe module to use the Go asset
Eric Boren [Thu, 13 Apr 2017 14:00:43 +0000 (10:00 -0400)]
Change infra recipe module to use the Go asset

Bug: skia:
Change-Id: Ib2fa0b971f201ea2f16afd0467d7882b66b4047c
Reviewed-on: https://skia-review.googlesource.com/13331
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Eric Boren <borenet@google.com>

7 years agoRemove GrRenderTargetOpList::discard & move functionality to GrRenderTargetContext
Robert Phillips [Thu, 13 Apr 2017 14:13:16 +0000 (10:13 -0400)]
Remove GrRenderTargetOpList::discard & move functionality to GrRenderTargetContext

Change-Id: If84ffb7b01543a44179837d683c0a4c004e52f63
Reviewed-on: https://skia-review.googlesource.com/13335
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoremove dead code around replayClips
Mike Reed [Thu, 13 Apr 2017 15:06:30 +0000 (11:06 -0400)]
remove dead code around replayClips

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

7 years agoSet skia_enable_gpu=false on MSAN builds.
Mike Klein [Thu, 13 Apr 2017 15:15:46 +0000 (11:15 -0400)]
Set skia_enable_gpu=false on MSAN builds.

This should get us past the crash at startup.

The next problem I'd expect to see, if any, should involve HumanizeMS()
and chrono::steady_clock::now().

Change-Id: I14dbe6bedd6939c1a355db8dba74ab0853db7706
Reviewed-on: https://skia-review.googlesource.com/13401
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoStore the GrBackend we are using on GrContext
Greg Daniel [Thu, 13 Apr 2017 13:54:12 +0000 (09:54 -0400)]
Store the GrBackend we are using on GrContext

As we start adding more functionality to external clients and passing
data around, we will need to know what backend we are working with at
a layer higher that GrGpu.

TBR=bsalomon@google.com

Bug: skia:
Change-Id: Ifee527ea0c1046469401a39e0500f84a46bb3081
Reviewed-on: https://skia-review.googlesource.com/13275
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoMake all GrRenderTargetOpList ops store a GrRenderTarget pointer
Robert Phillips [Thu, 13 Apr 2017 13:15:47 +0000 (09:15 -0400)]
Make all GrRenderTargetOpList ops store a GrRenderTarget pointer

Change-Id: I39652b4b8b2ba96b5206304dfc51395283c3fe16
Reviewed-on: https://skia-review.googlesource.com/13332
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agotry -B
Mike Klein [Thu, 13 Apr 2017 13:49:02 +0000 (09:49 -0400)]
try -B

Change-Id: I4e03d668197d76feb71113f47bae24fdd2fc6b6f
Reviewed-on: https://skia-review.googlesource.com/13334
Reviewed-by: Kevin Lubick <kjlubick@google.com>
7 years agoDo sRGB premul/unpremul on the GPU
Brian Osman [Wed, 12 Apr 2017 21:07:22 +0000 (17:07 -0400)]
Do sRGB premul/unpremul on the GPU

Previously, the early check would decide that sRGB pixel configs were okay
(because they're 8888-unorm). Then we'd go to make the effect and decide
that we didn't want them to work. This led to the software fallback.

The software fallback was obviously slower, but also doing non-linear
premul/unpremul operations. Eventually, whether or not the premul is
linear should be dictated by the destination color space, but for now,
this is an improvement (and only affects the one GM that tests this
feature).

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

7 years agoAccess EGL_KHR_fence_sync via eglGetProcAddress
Chris Dalton [Wed, 12 Apr 2017 21:32:53 +0000 (15:32 -0600)]
Access EGL_KHR_fence_sync via eglGetProcAddress

Bug: skia:6497
Change-Id: Icf04de6b1facc94e8c45085575cb45189c6c649c
Reviewed-on: https://skia-review.googlesource.com/13306
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agoUpdate clang_linux to version 4
Kevin Lubick [Thu, 13 Apr 2017 12:00:16 +0000 (08:00 -0400)]
Update clang_linux to version 4

Bug: skia:
Change-Id: Iab4fcd7b8f17fa7bf478e879a325759e0c622b1a
Reviewed-on: https://skia-review.googlesource.com/13120
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
7 years agoremove unused fURI from pixelref
Mike Reed [Thu, 13 Apr 2017 02:29:00 +0000 (22:29 -0400)]
remove unused fURI from pixelref

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

7 years agolocking methods should only be virtual in legacy mode
Mike Reed [Wed, 12 Apr 2017 19:11:02 +0000 (15:11 -0400)]
locking methods should only be virtual in legacy mode

However, they should not be pure-virtual, otherwise the client can't migrate to the new
api independent of undef-ing the flag.

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

7 years agoFix cubic KLM solving
csmartdalton [Mon, 10 Apr 2017 17:58:17 +0000 (11:58 -0600)]
Fix cubic KLM solving

Fixes calc_inverse_transpose_power_basis_matrix() to look for the
determinant with the largest ABSOLUTE VALUE.

BUG=skia:

Change-Id: I70e26cc7ab9955d2e094fb7581f0ec9f5e0ae2d9
Reviewed-on: https://skia-review.googlesource.com/13081
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>

7 years agoAdd job for Acer chromebook (TegraK1)
Kevin Lubick [Wed, 12 Apr 2017 18:35:53 +0000 (14:35 -0400)]
Add job for Acer chromebook (TegraK1)

Known issue: Nanobench fails with
/home/chronos/user/bin/nanobench: symbol lookup error:
/home/chronos/user/bin/nanobench: undefined symbol: eglCreateSyncKHR

Bug: skia:6468
NOTRY=true
Change-Id: Idb1291c2da835d093826022f4cab4069e28c5964
Reviewed-on: https://skia-review.googlesource.com/13188
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
7 years agoAdd Win IntelHD4400 bot.
Ben Wagner [Wed, 12 Apr 2017 16:40:45 +0000 (12:40 -0400)]
Add Win IntelHD4400 bot.

Bug: skia:6488
NOTRY=true

Change-Id: Icab4bf478925fb48f7facd6c9883a2753d04aaac
Reviewed-on: https://skia-review.googlesource.com/13191
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agojumper, bilinear and bicubic sampling stages
Mike Klein [Wed, 12 Apr 2017 16:52:48 +0000 (12:52 -0400)]
jumper, bilinear and bicubic sampling stages

This splits SkImageShaderContext into three parts:
   - SkJumper_GatherCtx: always, already done
   - SkJumper_SamplerCtx: when bilinear or bicubic
   - MiscCtx: other little bits (the matrix, paint color, tiling limits)

Thanks for the snazzy allocator that allows this Herb!

Both SkJumper and SkRasterPipeline_opts.h should be speaking all the
same types now.

I've copied the comments about bilinear/bicubic to SkJumper with little
typo fixes and clarifications.

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

7 years agoAllow including of vulkan.h as a required public api when using vulkan.
Greg Daniel [Wed, 12 Apr 2017 17:29:50 +0000 (13:29 -0400)]
Allow including of vulkan.h as a required public api when using vulkan.

Bug: skia:
Change-Id: I3ac382edc12144dcda9ef168f752b14878e0e5ac
Reviewed-on: https://skia-review.googlesource.com/13262
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoandroid-only api to reset the fields of a pixelref
Mike Reed [Wed, 12 Apr 2017 16:57:07 +0000 (12:57 -0400)]
android-only api to reset the fields of a pixelref

BUG=skia:6494

Change-Id: I97c8a93849a13f0c5fd57c8a150ecc2ce363d8f3
Reviewed-on: https://skia-review.googlesource.com/13250
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoUpdate Android autoroller documentation
Ravi Mistry [Wed, 12 Apr 2017 16:51:05 +0000 (12:51 -0400)]
Update Android autoroller documentation

BUG=skia:5538
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=13266
Change-Id: I76fa8db5ea9916fab2ef0f8058157dac96d52517

Change-Id: I76fa8db5ea9916fab2ef0f8058157dac96d52517
Reviewed-on: https://skia-review.googlesource.com/13266
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>

7 years agoAdd jobs for Samsung Chromebook Plus
Kevin Lubick [Wed, 12 Apr 2017 14:50:18 +0000 (10:50 -0400)]
Add jobs for Samsung Chromebook Plus

Also refactor the cipd package used to compile these, as it can be reused.

Bug: skia:
NOTRY=true
Change-Id: I53cf5b7fdfcb8cafd50791a0beaaf557fafa65c3
Reviewed-on: https://skia-review.googlesource.com/13252
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
7 years agofix drawDRRect for fuzzer
Cary Clark [Wed, 12 Apr 2017 16:03:15 +0000 (12:03 -0400)]
fix drawDRRect for fuzzer

make assert abort instead

Bug: skia:6450
Change-Id: I23ff51124fa8f069f2c7e5260f800017d7475d46
Reviewed-on: https://skia-review.googlesource.com/13197
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
7 years agomake all gather_*() use SkJumper_GatherCtx
Mike Klein [Wed, 12 Apr 2017 15:51:11 +0000 (11:51 -0400)]
make all gather_*() use SkJumper_GatherCtx

SkJumper_GatherCtx is a prefix of SkImageShaderContext, so
this is a no-op.  It helps to keep things straight, and I
do want to split apart the GatherCtx from a new SamplingCtx.

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

7 years agoAdd/edit README files for infra/recipes
Eric Boren [Wed, 12 Apr 2017 14:17:36 +0000 (10:17 -0400)]
Add/edit README files for infra/recipes

Bug: skia:6473
Change-Id: I050df47a5a3f633263f0ca6258e83e96b78d7957
Reviewed-on: https://skia-review.googlesource.com/13123
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Stephan Altmueller <stephana@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
7 years agoFix SkLocalMatrixShader::isAImage() to respect local matrix and image local matrix
Matt Sarett [Wed, 12 Apr 2017 15:52:47 +0000 (11:52 -0400)]
Fix SkLocalMatrixShader::isAImage() to respect local matrix and image local matrix

Fixes cts tests.

b/37161109
b/37237678

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

Bug: skia:
Change-Id: I438b8b17f4c7c5bfcb50dfa22af1ddb97b905088
Reviewed-on: https://skia-review.googlesource.com/13261
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoRevert "Revert "SkColorSpaceXformer: Preserve local matrix on shaders""
Matt Sarett [Wed, 12 Apr 2017 15:50:08 +0000 (15:50 +0000)]
Revert "Revert "SkColorSpaceXformer: Preserve local matrix on shaders""

This reverts commit a50a11c17ed9037d3e60d8319727583dba803cec.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "SkColorSpaceXformer: Preserve local matrix on shaders"
>
> This reverts commit 5d884b562828ceb13ccacb71bc4581d2020e62bb.
>
> Reason for revert: Wrong thing to revert
>
> Original change's description:
> > SkColorSpaceXformer: Preserve local matrix on shaders
> >
> > Also, do not drop unknown shaders.
> >
> > Fixes cts tests.
> >
> > b/37161109
> > b/37237678
> >
> > Bug: skia:
> > Change-Id: I0fd817a4d6461ede0ccdcb8f3cccb255b646b864
> > Reviewed-on: https://skia-review.googlesource.com/13246
> > Commit-Queue: Matt Sarett <msarett@google.com>
> > Commit-Queue: Mike Klein <mtklein@chromium.org>
> > Reviewed-by: Mike Klein <mtklein@chromium.org>
> >
>
> TBR=mtklein@chromium.org,mtklein@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I34e02785ac43a04f8452c458680ea1d6518818a6
> Reviewed-on: https://skia-review.googlesource.com/13258
> Reviewed-by: Matt Sarett <msarett@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

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

Change-Id: I2dfac7d41caf0e32d3bb5f3f330fff4970c0545e
Reviewed-on: https://skia-review.googlesource.com/13260
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoRevert "Fix SkLocalMatrixShader::isAImage() to respect local matrix and image local...
Matt Sarett [Wed, 12 Apr 2017 15:49:44 +0000 (15:49 +0000)]
Revert "Fix SkLocalMatrixShader::isAImage() to respect local matrix and image local matrix"

This reverts commit e5efa51b2acc86d1993132348d5b465855a653cc.

Reason for revert: MSAN

Original change's description:
> Fix SkLocalMatrixShader::isAImage() to respect local matrix and image local matrix
>
> Fixes cts tests.
>
> b/37161109
> b/37237678
>
> Bug: skia:
> Change-Id: Ida9ac5e4261e8a6b22e8cdc0e585e0e7929dbbfd
> Reviewed-on: https://skia-review.googlesource.com/13249
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
>

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

Change-Id: I2b78c7b32997344136c784dc77675dafca37565e
Reviewed-on: https://skia-review.googlesource.com/13259
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoRevert "SkColorSpaceXformer: Preserve local matrix on shaders"
Matt Sarett [Wed, 12 Apr 2017 15:48:35 +0000 (15:48 +0000)]
Revert "SkColorSpaceXformer: Preserve local matrix on shaders"

This reverts commit 5d884b562828ceb13ccacb71bc4581d2020e62bb.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> SkColorSpaceXformer: Preserve local matrix on shaders
>
> Also, do not drop unknown shaders.
>
> Fixes cts tests.
>
> b/37161109
> b/37237678
>
> Bug: skia:
> Change-Id: I0fd817a4d6461ede0ccdcb8f3cccb255b646b864
> Reviewed-on: https://skia-review.googlesource.com/13246
> Commit-Queue: Matt Sarett <msarett@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
>

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

Change-Id: I34e02785ac43a04f8452c458680ea1d6518818a6
Reviewed-on: https://skia-review.googlesource.com/13258
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agotidy up ok help
Mike Klein [Wed, 12 Apr 2017 15:02:44 +0000 (11:02 -0400)]
tidy up ok help

-m, -s, and -w are now vias.

No real need to advertise -h given that if you just run ok with no
arguments it prints the help, but to be friendly accept -h and --help.

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

7 years agojumper, rgb<->hsl
Mike Klein [Wed, 12 Apr 2017 12:35:41 +0000 (08:35 -0400)]
jumper, rgb<->hsl

I've rearranged while porting, I hope making the logic clearer.
Exactly one gm is affected, highcontrastfilter.

The most interesting line is this, from hsl_to_rgb:

  F t2 = if_then_else(t < 0.0_f, t + 1.0_f,

I had to write 0.0_f (instead of the usual 0) to force Clang to compare
against a zero register instead of a 16-byte zero constant in memory.
Register pressure is high in hsl_to_rgb, so something must have kicked
in to prefer memory over zeroing a register.

No big deal.  It makes the code read more symmetrically anyway.

Change-Id: I1a5ced72216234587760c6f803fb69315d18fae0
Reviewed-on: https://skia-review.googlesource.com/13242
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoAdd SkCodec methods for individual frames
Leon Scroggins III [Wed, 12 Apr 2017 14:49:52 +0000 (10:49 -0400)]
Add SkCodec methods for individual frames

Add a version of getFrameInfo that returns information about a single
frame, allowing a client to skip creating the entire vector.

Add getFrameCount, for determining the number of frames in the image.

Reimplement std::vector<FrameInfo> getFrameInfo with the new methods.

Updates to the test:
- getFrameInfo(size_t, FrameInfo*) fails before parsing
- Test both versions of getFrameInfo
- Recreate the codec between tests, to test parsing

Change-Id: I77c19087f2f8dcf2c536d80167b18ad1ca96ae94
Reviewed-on: https://skia-review.googlesource.com/13190
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Chris Blume <cblume@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>

7 years agoFix SkLocalMatrixShader::isAImage() to respect local matrix and image local matrix
Matt Sarett [Wed, 12 Apr 2017 14:21:30 +0000 (10:21 -0400)]
Fix SkLocalMatrixShader::isAImage() to respect local matrix and image local matrix

Fixes cts tests.

b/37161109
b/37237678

Bug: skia:
Change-Id: Ida9ac5e4261e8a6b22e8cdc0e585e0e7929dbbfd
Reviewed-on: https://skia-review.googlesource.com/13249
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoSkColorSpaceXformer: Preserve local matrix on shaders
Matt Sarett [Wed, 12 Apr 2017 13:19:15 +0000 (09:19 -0400)]
SkColorSpaceXformer: Preserve local matrix on shaders

Also, do not drop unknown shaders.

Fixes cts tests.

b/37161109
b/37237678

Bug: skia:
Change-Id: I0fd817a4d6461ede0ccdcb8f3cccb255b646b864
Reviewed-on: https://skia-review.googlesource.com/13246
Commit-Queue: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoOverride setDrawFilter() in SkColorSpaceXformCanvas
Matt Sarett [Wed, 12 Apr 2017 13:13:39 +0000 (09:13 -0400)]
Override setDrawFilter() in SkColorSpaceXformCanvas

Fixes cts tests.

b/37161109
b/37237678

Bug: skia:
Change-Id: I12d78b631b4056a78cbbb2962144e8cc62eb931a
Reviewed-on: https://skia-review.googlesource.com/13244
Commit-Queue: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRe-align tests in recipes with the names of reality
Kevin Lubick [Wed, 12 Apr 2017 12:31:48 +0000 (08:31 -0400)]
Re-align tests in recipes with the names of reality

For example, renaming GN_Android to Android

Bug: skia:
Change-Id: Ib71001b3cbecc3d5a0f3bb1bf0cf1f48dc23cfe4
Reviewed-on: https://skia-review.googlesource.com/13182
Reviewed-by: Eric Boren <borenet@google.com>
7 years agoAdd docs for downloading prebuilt binaries from CIPD
Kevin Lubick [Mon, 10 Apr 2017 19:08:59 +0000 (15:08 -0400)]
Add docs for downloading prebuilt binaries from CIPD

NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=13101
Bug: skia:
Change-Id: Iefa8070c65881ff8c05a3b88aa8385fcc1a427ff

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

7 years agoremove pixelref flag from google3
Mike Reed [Wed, 12 Apr 2017 11:40:04 +0000 (07:40 -0400)]
remove pixelref flag from google3

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

7 years agoDisable deferred proxies for Chrome branch
Robert Phillips [Tue, 11 Apr 2017 13:09:24 +0000 (09:09 -0400)]
Disable deferred proxies for Chrome branch

Chrome is branching again and Proxy instantiation is still occurring at a bad spot in Skia.

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

7 years agoRevert "Revert "remove unused SkBitmap::copyPixelsTo""
Mike Reed [Wed, 12 Apr 2017 11:07:35 +0000 (11:07 +0000)]
Revert "Revert "remove unused SkBitmap::copyPixelsTo""

This reverts commit 7bfdfda809e7273d7c962cc62ef9390b5007fb5a.

Reason for revert: google3 has been updated

Original change's description:
> Revert "remove unused SkBitmap::copyPixelsTo"
>
> This reverts commit 0f3fdfacf32261f943dcac5cdfd14475011f40db.
>
> Reason for revert: Blink-headless in Google3 needs an update too.
>
> Original change's description:
> > remove unused SkBitmap::copyPixelsTo
> >
> > Needs https://codereview.chromium.org/2812853002/ to land first
> >
> > Bug: skia:6465
> > Change-Id: I531e33b2848cd995f20844786ed1a8d34d63fb64
> > Reviewed-on: https://skia-review.googlesource.com/13171
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> >
>
> TBR=reed@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I5e7c4b0d05772e4948cb1dffdcc40e095fbdba41
> Reviewed-on: https://skia-review.googlesource.com/13185
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>
>

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

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

7 years agoswitch over to no lockPixels in pixelref
Mike Reed [Tue, 11 Apr 2017 19:50:02 +0000 (15:50 -0400)]
switch over to no lockPixels in pixelref

Bug: skia:6481
Change-Id: I7c32d2e6dcd4c9cd8aa761ac5c4794c916eb650a
Reviewed-on: https://skia-review.googlesource.com/13193
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoclean ups in SkPixelRef
Mike Reed [Tue, 11 Apr 2017 19:56:23 +0000 (15:56 -0400)]
clean ups in SkPixelRef
- isLazyGenerated no longer needed
- requestLock does not need a virtual

Bug: skia:4328
Change-Id: I56ab5ee1e10f2a20332eb58464a2a48b487101e6
Reviewed-on: https://skia-review.googlesource.com/13195
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoAdd perspective shadows
Jim Van Verth [Tue, 11 Apr 2017 19:29:14 +0000 (15:29 -0400)]
Add perspective shadows

Bug: skia:
Change-Id: I1972f85f593828c982ea08143e1ed7eb70345eaa
Reviewed-on: https://skia-review.googlesource.com/10296
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
7 years agoRemove discard from GrRenderTarget & force it to always go through a RenderTargetContext
Robert Phillips [Tue, 11 Apr 2017 16:54:57 +0000 (12:54 -0400)]
Remove discard from GrRenderTarget & force it to always go through a RenderTargetContext

This is a bit sloppy in that it ignores some instances where discards were being issued before.

The creation of the temp RTContext in the RenderTarget's discard method was causing an extra split in the opLists.

This is split out of: https://skia-review.googlesource.com/c/10284/ (Omnibus: Remove GrSurface-derived classes from ops)

Change-Id: Ic366d303280635763b0fae238c4df37c04fb8503
Reviewed-on: https://skia-review.googlesource.com/11125
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
7 years agoSkSize can be aggregate-initialized
Hal Canary [Tue, 11 Apr 2017 16:12:02 +0000 (12:12 -0400)]
SkSize can be aggregate-initialized

Previosly, SkSize had a base class, which prevented it.

Also removes unused SkISize::clampNegToZero() and
SkSize::clampNegToZero().

Change-Id: I7b93b42f6f6381c66e294bbedee99ad53c6c3436
Reviewed-on: https://skia-review.googlesource.com/13187
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agoReland: Finish up mip opts: 2x3 and 3x2
Matt Sarett [Tue, 11 Apr 2017 15:53:24 +0000 (11:53 -0400)]
Reland: Finish up mip opts: 2x3 and 3x2

Original CL:
https://skia-review.googlesource.com/c/10028

mipmap_build_2048x2047 (2x3):
sRGB Float Impl (old): 82.9ms (reference)
8888                 : 12.3ms (reference)
sRGB Before          : 61.9ms
sRGB After           : 53.1ms

mipmap_build_2047x2048 (3x2):
sRGB Float Impl (old): 65.9ms (reference)
8888 Before          : 10.3ms
8888 After           : 8.81ms
sRGB Before          : 47.8ms
sRGB After           : 43.5ms

BUG=skia:

Change-Id: Icf58a857a66102e843ae2585fda8d70c31a2b34d
Reviewed-on: https://skia-review.googlesource.com/13186
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoremove inline allocation in SkRecord
Mike Klein [Tue, 11 Apr 2017 14:36:48 +0000 (10:36 -0400)]
remove inline allocation in SkRecord

This is part one of many to making SkPicture simpler.

SkMiniPicture covers the really small allocations,
so there's really no reason for us to have these inline allocations.

BUG=skia:6484

Change-Id: I0e27ac747a6b15cf178db9639128fef757bc137b
Reviewed-on: https://skia-review.googlesource.com/13137
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoChange bitmapcache to not rely on lockpixels.
Mike Reed [Tue, 11 Apr 2017 16:03:44 +0000 (12:03 -0400)]
Change bitmapcache to not rely on lockpixels.

The Rec in the cache is the owner of the pixel memory
- discardable or
- malloc

Each external client has a pixelref that just points to those pixels,
and whose destructor will notify the rec.

This eliminates the dependency on lockPixels in pixelref, freeing us
to remove that entirely from pixelref.

Bug: skia:
Change-Id: If45ed0ae202a1211336626364235215253e8aa7c
Reviewed-on: https://skia-review.googlesource.com/10300
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
7 years agoBlacklist DeferredTextureImage on Win Vulkan IntelIris540
Matt Sarett [Tue, 11 Apr 2017 15:25:37 +0000 (11:25 -0400)]
Blacklist DeferredTextureImage on Win Vulkan IntelIris540

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-Vulkan

Bug: skia:
Change-Id: I2e465a4668956d4337ecde4f65081bf22b3b0e7a
Reviewed-on: https://skia-review.googlesource.com/13183
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
7 years agoMake SkLiteDL::draw() const.
Mike Klein [Tue, 11 Apr 2017 15:32:33 +0000 (11:32 -0400)]
Make SkLiteDL::draw() const.

Nothing interesting here.  Just slapping const all over the place.

BUG=skia:6484

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

7 years agomake SkRecord normally SkRefCnt'd
Mike Klein [Tue, 11 Apr 2017 14:50:27 +0000 (10:50 -0400)]
make SkRecord normally SkRefCnt'd

SkRecord used SkNVRefCnt to avoid adding a vptr.

SkMiniPicture covers the really small allocations,
so there's really no reason to fret over an extra pointer here.

BUG=skia:6484

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

7 years agoRevert "remove unused SkBitmap::copyPixelsTo"
Mike Klein [Tue, 11 Apr 2017 15:37:50 +0000 (15:37 +0000)]
Revert "remove unused SkBitmap::copyPixelsTo"

This reverts commit 0f3fdfacf32261f943dcac5cdfd14475011f40db.

Reason for revert: Blink-headless in Google3 needs an update too.

Original change's description:
> remove unused SkBitmap::copyPixelsTo
>
> Needs https://codereview.chromium.org/2812853002/ to land first
>
> Bug: skia:6465
> Change-Id: I531e33b2848cd995f20844786ed1a8d34d63fb64
> Reviewed-on: https://skia-review.googlesource.com/13171
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
>

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

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

7 years agoCorrect GIF frame dependencies and track alpha
Leon Scroggins III [Tue, 11 Apr 2017 14:32:02 +0000 (10:32 -0400)]
Correct GIF frame dependencies and track alpha

Add SkCodec::FrameInfo::fAlphaType. The SkImageInfo for the SkCodec
specifies the SkAlphaType for the first frame, but the opacity can vary
from frame to frame.

When determining the required frame, also compute whether a frame has
alpha. Update how we determine the required frame, which had bugs.
(Update a test that had an incorrect required frame as a result.)

Add new test images covering cases that have been fixed:
- randPixelsAnim2.gif
It has the following frames:
A (keep)
B (keep) (subset)
C (disposePrevious) (covers B)
D (any) (does *not* cover B)

B and C depend on A, but D depends on B, since after disposing C, B
should be visible again.

- alphabetAnim.gif
Includes frames which fill the image size, with different disposal
methods and transparencies.

Change-Id: Ie086167711c4cac4931ed8c4ddaeb9c9b0b91fdb
Reviewed-on: https://skia-review.googlesource.com/9810
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoremove unused SkBitmap::copyPixelsTo
Mike Reed [Tue, 11 Apr 2017 03:31:23 +0000 (23:31 -0400)]
remove unused SkBitmap::copyPixelsTo

Needs https://codereview.chromium.org/2812853002/ to land first

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

7 years agoremove SkNx AVX code
Mike Klein [Mon, 10 Apr 2017 18:44:47 +0000 (14:44 -0400)]
remove SkNx AVX code

We can't realistically use AVX and SkNx together because of ODR
problems, so remove the code that may tempt us to try.

Remaining code paths using AVX:
  - one intrinsics-only routine in SkOpts_hsw.cpp
  - SkJumper

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

7 years agoFix symbolization of ASAN crashes
Kevin Lubick [Tue, 11 Apr 2017 12:51:33 +0000 (08:51 -0400)]
Fix symbolization of ASAN crashes

Bug: skia:
Change-Id: Id127a3c4a1a40bc6ddb0641c9d72f1a5960bbc6e
Reviewed-on: https://skia-review.googlesource.com/13125
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>

7 years agoAllow BF and BRD clients to request an output color space
Matt Sarett [Tue, 11 Apr 2017 13:51:32 +0000 (09:51 -0400)]
Allow BF and BRD clients to request an output color space

Bug: skia:
Change-Id: I0f0d3bfdd5c47544ab71167fd7984ee8e8ac5903
Reviewed-on: https://skia-review.googlesource.com/11601
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
7 years agoMake sure NaNs clamp to 0 in color look up tables
Matt Sarett [Tue, 11 Apr 2017 13:26:24 +0000 (09:26 -0400)]
Make sure NaNs clamp to 0 in color look up tables

This operation assumes 0-1 input and guarantees 0-1 output.
The old clamp was poorly written, causing the possibility
for NaNs to not be set to 0.

BUG=709941
Change-Id: I691f0494a562a329967f5b0149a1ba04cbeb8464
Reviewed-on: https://skia-review.googlesource.com/13134
Commit-Queue: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoSkCanvas constructor with legacy flag for Android framework
Matt Sarett [Tue, 11 Apr 2017 12:46:01 +0000 (08:46 -0400)]
SkCanvas constructor with legacy flag for Android framework

Bug: skia:
Change-Id: I5b268ad03dde075f2710196d5ad2bd19249557f7
Reviewed-on: https://skia-review.googlesource.com/11788
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
7 years agoRevert "Rm makeRenderTargetContext in favor of deferred version"
Robert Phillips [Tue, 11 Apr 2017 12:23:17 +0000 (12:23 +0000)]
Revert "Rm makeRenderTargetContext in favor of deferred version"

This reverts commit d83ec0441279b79551b4ecb4598696249ea55145.

Reason for revert: various bot failures

Original change's description:
> Rm makeRenderTargetContext in favor of deferred version
>
> Change-Id: Ifdf67453607256ba7cdb0837263377bd83907212
> Reviewed-on: https://skia-review.googlesource.com/13001
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>

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

Change-Id: I4e67a20cbe658b24725dcf386ac8bfdd127647ea
Reviewed-on: https://skia-review.googlesource.com/13131
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>

7 years agoRm makeRenderTargetContext in favor of deferred version
Robert Phillips [Mon, 10 Apr 2017 15:10:22 +0000 (11:10 -0400)]
Rm makeRenderTargetContext in favor of deferred version

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

7 years agoremove kReturnNullForEmpty_FinishFlag feature
Mike Klein [Mon, 10 Apr 2017 14:07:46 +0000 (10:07 -0400)]
remove kReturnNullForEmpty_FinishFlag feature

It's unused, and doesn't appear to be correct, returning nullptr too
early when we should return a non-empty SkMiniPicture.

The mini-recorder path will return a zero-allocation SkEmptyPicture anyway.

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

7 years agoSkImageFilter::onMakeColorSpace() - more overrides
Matt Sarett [Mon, 10 Apr 2017 20:35:33 +0000 (16:35 -0400)]
SkImageFilter::onMakeColorSpace() - more overrides

Fills out most of the simple implementations.
Improves 22 gms in gbr-8888.

Bug: skia:
Change-Id: I881ade140993568263de75be51aed240d2de8cc6
Reviewed-on: https://skia-review.googlesource.com/13126
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoAdd Galaxy S6 to CQ as an experimental bot.
Ben Wagner [Mon, 10 Apr 2017 19:09:02 +0000 (15:09 -0400)]
Add Galaxy S6 to CQ as an experimental bot.

BUG=skia:

Change-Id: I8455d5595c0d0700d23fde6171c578fcf3be9270
Reviewed-on: https://skia-review.googlesource.com/13100
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

7 years agogetDeferredTextureImageData(): preserve color space in legacy mode
Matt Sarett [Mon, 10 Apr 2017 15:03:27 +0000 (11:03 -0400)]
getDeferredTextureImageData(): preserve color space in legacy mode

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

7 years agoSkImageCacherator: Remove unneeded heuristic
Matt Sarett [Mon, 10 Apr 2017 15:13:00 +0000 (11:13 -0400)]
SkImageCacherator: Remove unneeded heuristic

This was the old way of handling color spaces.

This is now handled by chooseCacheFormat() / buildCacheInfo().

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

7 years agoPM/UPM conversion improvements
Brian Osman [Mon, 10 Apr 2017 17:42:48 +0000 (13:42 -0400)]
PM/UPM conversion improvements

Snap input values to N / 255 before doing PM/UPM conversions, and add
a new round-to-nearest conversion pair. With the pre-snapping, that
pair is chosen by (almost?) every GPU we have. This now lets us round
trip perfectly on Mali GPUs (which were falling back to SW before).

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

7 years agofix too-dark 565 (really, all legacy) gradients
Mike Klein [Mon, 10 Apr 2017 16:51:43 +0000 (12:51 -0400)]
fix too-dark 565 (really, all legacy) gradients

This CL reverts legacy destinations back to lerping bytes.
Lerping linear is only the correct behavior for gradients
drawing into colorspace-aware destinations.

As written we're lerping between de-sRGB'd colors but never
transforming the outputs back.  That leaves us in a weird
halfway-right-is-worse-than-wrong spot for legacy.

Change-Id: I79b85552b6913649afd2414205cf57108a8b93c6
Reviewed-on: https://skia-review.googlesource.com/13064
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agoremove unused lockPixelsAreWritable
Mike Reed [Mon, 10 Apr 2017 17:22:41 +0000 (13:22 -0400)]
remove unused lockPixelsAreWritable

Bug: skia:4328
Change-Id: I7271a95a52fe6e5de781f83e0d48af5b69892a95
Reviewed-on: https://skia-review.googlesource.com/13066
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoAdd MIPS Ci20 jobs
Kevin Lubick [Mon, 10 Apr 2017 17:05:49 +0000 (13:05 -0400)]
Add MIPS Ci20 jobs

Bug: skia:6423
NOTRY=true
Change-Id: I2193c49151359a174ffa071650e1dbd366c91b28
Reviewed-on: https://skia-review.googlesource.com/11783
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoRemove GeForce 320M bots
Eric Boren [Mon, 10 Apr 2017 16:57:37 +0000 (12:57 -0400)]
Remove GeForce 320M bots

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

7 years agofix -Fast bot
Mike Klein [Mon, 10 Apr 2017 16:23:21 +0000 (12:23 -0400)]
fix -Fast bot

N=8 on that bot.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Release-Fast

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

7 years agoconstexprify GrBlend.h and GrPorterDuffXferProcessor.cpp
Brian Salomon [Mon, 10 Apr 2017 15:17:14 +0000 (11:17 -0400)]
constexprify GrBlend.h and GrPorterDuffXferProcessor.cpp

Also remove some unused functions from GrBlend.h and related unit test.

Bug: skia:
Change-Id: Id8ad0057a02f65a9e19dc75e4b88709a762f4139
Reviewed-on: https://skia-review.googlesource.com/12623
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

7 years agoRemove Index_8 handling in cacherator heuristic code
Brian Osman [Mon, 10 Apr 2017 15:47:17 +0000 (11:47 -0400)]
Remove Index_8 handling in cacherator heuristic code

Constructor changes the color type to N32 now, so this
code is never needed.

Bug: skia:
Change-Id: If464440fed799122fed810d870f5d6d9a932bf12
Reviewed-on: https://skia-review.googlesource.com/13000
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
7 years agoRecipes: Remove depot_tools path hack
Eric Boren [Mon, 10 Apr 2017 15:23:04 +0000 (11:23 -0400)]
Recipes: Remove depot_tools path hack

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

7 years agoFix BundleRecipes depending on Release-Shared build
Eric Boren [Mon, 10 Apr 2017 15:00:09 +0000 (11:00 -0400)]
Fix BundleRecipes depending on Release-Shared build

It doesn't create an actual dependency, but it does cause the
Release-Shared build to be added to the tasks DAG, where it would be
orphaned if not for the other housekeeper.

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

7 years agoAdd multi-stop SkJumper stage.
Herb Derby [Mon, 10 Apr 2017 14:52:34 +0000 (10:52 -0400)]
Add multi-stop SkJumper stage.

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

Change-Id: I954d02638a785bec284d2fdf8f46abfccd474e7a
Reviewed-on: https://skia-review.googlesource.com/10211
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
7 years agoMove ref counting out of GrProcessor and into subclasses.
Brian Salomon [Mon, 10 Apr 2017 14:54:25 +0000 (10:54 -0400)]
Move ref counting out of GrProcessor and into subclasses.

This will allow different subclasses to use different models for lifetime management.

GrXferProcessor moves to simple ref counting since they don't own GrGpuResources.

This also constifies GrXferProcessor factories.

Change-Id: I6bea0ea8de718874063224232f9da50887868b16
Reviewed-on: https://skia-review.googlesource.com/11792
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoClean up no-longer-used recipes stuff
Eric Boren [Mon, 10 Apr 2017 13:56:10 +0000 (09:56 -0400)]
Clean up no-longer-used recipes stuff

- Remove buildbot logic
- Remove non-Gerrit logic
- Remove master, slave, and build number properties

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

7 years agoAdd SkImageFilter::makeColorSpace(SkColorSpaceXformer*)
Matt Sarett [Fri, 7 Apr 2017 20:54:04 +0000 (16:54 -0400)]
Add SkImageFilter::makeColorSpace(SkColorSpaceXformer*)

Plus two sample implementations.  Will fill out the
rest if the model looks ok.

Bug: skia:
Change-Id: Ie24ecd0cbc36263220cb1e506f7812c582554e50
Reviewed-on: https://skia-review.googlesource.com/12100
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>

7 years agoFix infinite loop in SkRTree::insert()
Mike Klein [Fri, 7 Apr 2017 14:46:39 +0000 (10:46 -0400)]
Fix infinite loop in SkRTree::insert()

When aspectRatio is not finite, insert() can fall into an infinite loop.
This happens if you pass SkRect::MakeLargest() to the factory as bounds.

BUG=skia:5974

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

7 years agoMove recipe content from modules back into recipes
Eric Boren [Mon, 10 Apr 2017 12:19:10 +0000 (08:19 -0400)]
Move recipe content from modules back into recipes

At one point I moved the contents of the recipes into modules so that
they could be shared between repos. It turns out that we don't need
that, and it adds complexity.

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

7 years agoconsolidate read/writePixels in GrSurfaceContext
Robert Phillips [Mon, 10 Apr 2017 12:19:26 +0000 (08:19 -0400)]
consolidate read/writePixels in GrSurfaceContext

Change-Id: I118fcd49990597d4dfea92efd3f9d99e52fdbfab
Reviewed-on: https://skia-review.googlesource.com/11481
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
7 years agoRename recipes: swarm_[name] -> [name]
Eric Boren [Mon, 10 Apr 2017 12:14:33 +0000 (08:14 -0400)]
Rename recipes: swarm_[name] -> [name]

Bug: skia:6473
Change-Id: Id78f0b5cb50ae2243b9a5aed8e552f7ed8202228
Reviewed-on: https://skia-review.googlesource.com/12060
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
7 years agoUpdate SKP version
UpdateSKPs [Sun, 9 Apr 2017 07:42:36 +0000 (07:42 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

Change-Id: Ia2240c06c3d778874de32cb1feba672f6e557aa2
Reviewed-on: https://skia-review.googlesource.com/12952
Reviewed-by: update-skps <update-skps@skia.org>
Commit-Queue: update-skps <update-skps@skia.org>

7 years agoUpdate SKP version
UpdateSKPs [Sun, 9 Apr 2017 06:54:35 +0000 (06:54 +0000)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

Change-Id: Ib8926f5626f9d99aafc305b7172179f3d0bc573f
Reviewed-on: https://skia-review.googlesource.com/12950
Reviewed-by: update-skps <update-skps@skia.org>
Commit-Queue: update-skps <update-skps@skia.org>

7 years agoFix GrGLSync definition
Brian Salomon [Sat, 8 Apr 2017 13:31:29 +0000 (09:31 -0400)]
Fix GrGLSync definition

By fixing this some ugly casts are avoided in setting up Chrome's GrGLInterface

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

7 years agoRevert "Revert "Create GrXferProcessor while doing GrProcessorSet analysis.""
Brian Salomon [Sat, 8 Apr 2017 11:38:53 +0000 (07:38 -0400)]
Revert "Revert "Create GrXferProcessor while doing GrProcessorSet analysis.""

This reverts commit 5dac9b3b5bf7e9c06c207cb92e257535c7d9ec95.

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

7 years agoRevert "Create GrXferProcessor while doing GrProcessorSet analysis."
Brian Salomon [Sat, 8 Apr 2017 02:53:30 +0000 (02:53 +0000)]
Revert "Create GrXferProcessor while doing GrProcessorSet analysis."

This reverts commit 0ae0e23696f2ef08503040f8c02765eb58b26ddf.

Reason for revert: static assert failure on ios build

Original change's description:
> Create GrXferProcessor while doing GrProcessorSet analysis.
>
>
> Bug: skia:
> Change-Id: I62a628f9c0536ffb05c8f9d0c9ded5657f93b48e
> Reviewed-on: https://skia-review.googlesource.com/11482
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
>

TBR=egdaniel@google.com,bsalomon@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

7 years agoCreate GrXferProcessor while doing GrProcessorSet analysis.
Brian Salomon [Fri, 7 Apr 2017 19:37:58 +0000 (15:37 -0400)]
Create GrXferProcessor while doing GrProcessorSet analysis.

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

7 years agoremove obsolete SK_SUPPORT_LEGACY_SCALARMUL code
Mike Reed [Fri, 7 Apr 2017 23:57:30 +0000 (19:57 -0400)]
remove obsolete SK_SUPPORT_LEGACY_SCALARMUL code

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

7 years agoSet the kMultiMaster_FontFlag in DirectWrite.
Ben Wagner [Fri, 7 Apr 2017 20:07:46 +0000 (16:07 -0400)]
Set the kMultiMaster_FontFlag in DirectWrite.

DirectWrite can now produce system font typefaces which are variations,
so mark these as multiple masters so printing knows what to do.

BUG=chromium:697916

Change-Id: Idf09ebba3c7002a09ff2e4a2dbae13dbce4e79d4
Reviewed-on: https://skia-review.googlesource.com/12101
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
7 years agoMake SkColorSetA() a constexpr function.
Lei Zhang [Fri, 7 Apr 2017 19:28:21 +0000 (12:28 -0700)]
Make SkColorSetA() a constexpr function.

This gives compilers a strong hint that SkColor constants to be computed
at compile time.

Change-Id: I09c8a7fd23e4488f8b101f53d67a155f64d5d423
Reviewed-on: https://skia-review.googlesource.com/12056
Commit-Queue: Lei Zhang <thestig@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
7 years agoConvert Sk4fGradientInterval to (bias, factor) format
Florin Malita [Fri, 7 Apr 2017 18:56:14 +0000 (14:56 -0400)]
Convert Sk4fGradientInterval to (bias, factor) format

And rename some fileds:

 * p0, p1   -> t0, t1
 * fC0, fDc -> fCb, fCg

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

7 years agoAllow Vulkan to upload to main mip level without uploading to all levels.
Greg Daniel [Fri, 7 Apr 2017 18:42:23 +0000 (14:42 -0400)]
Allow Vulkan to upload to main mip level without uploading to all levels.

It should be allowed for the client to upload original data to a texture via
writePixels and then we just regenerate the mipmaps. I think it also resonable
to limit this to either writting to all levels or just the top level.

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

7 years agomake SkAutoTMalloc self-move safe
Mike Klein [Fri, 7 Apr 2017 18:18:29 +0000 (14:18 -0400)]
make SkAutoTMalloc self-move safe

We were just combing through possible changes that might have affected
the attached bug, this popped out as pretty obviously unsafe.

This doesn't explain the Chrome bug...
SkAutoTMalloc and SKAutoSTMalloc are separate types.  :(

The new test fails and crashes before, passes after.

Change-Id: I033f488a7f644b7a70e612c8535fedfac35c76db
Reviewed-on: https://skia-review.googlesource.com/11797
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
7 years agoSkTypeface:: populate_glyph_to_unicode uniformly across platforms
Hal Canary [Fri, 7 Apr 2017 15:49:20 +0000 (11:49 -0400)]
SkTypeface:: populate_glyph_to_unicode uniformly across platforms

Change-Id: I7edce3c38b4dc0261d425c26a443df9a1f25b32e
Reviewed-on: https://skia-review.googlesource.com/11786
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

7 years agojumper, byte_tables + byte_tables_rgb
Mike Klein [Fri, 7 Apr 2017 17:09:29 +0000 (13:09 -0400)]
jumper, byte_tables + byte_tables_rgb

Factors out a function F from_byte(U8) too.

Change-Id: Ib739ccbd509ddf25d2bfb7751ba6eaf51b16c12f
Reviewed-on: https://skia-review.googlesource.com/11791
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

7 years agocacherator upscales colortables to unify caching
Mike Reed [Fri, 7 Apr 2017 16:04:23 +0000 (12:04 -0400)]
cacherator upscales colortables to unify caching

Bug: skia:
Change-Id: Ib63f96b83d696743bbe4335c998acd4d2ea8acdb
Reviewed-on: https://skia-review.googlesource.com/11787
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>

7 years agoSkMultiPictureDocument : clean up MultiPictureDocumentReader interface
Hal Canary [Mon, 3 Apr 2017 20:06:42 +0000 (16:06 -0400)]
SkMultiPictureDocument : clean up MultiPictureDocumentReader interface

Motivation:  We may want to make SkMultiPictureDocument.h public in the
future.

Change-Id: Ie97b88d51a179c2283155d65bcadee32178115ca
Reviewed-on: https://skia-review.googlesource.com/11402
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Herb Derby <herb@google.com>