Commit Graph

24957 Commits

Author SHA1 Message Date
Mike Klein
eea7c16d59 Add Matrix colorfilter pipeline stages.
This breaks the color filter down into a couple logical steps:
  - go to unpremul
  - apply the 4x5 matrix
  - clamp to [0,1]
  - go to premul

Because we already have handy premul clamp stages, we swap the order of clamp and premul.  This is lossless.

While adding our stages to the pipeline, we analyze the matrix to see if we can skip any steps:
  - we can skip unpremul if the shader is opaque (alphas are all 1 ~~~> we're already unpremul);
  - we can skip the premul back if the color filter always produces opaque (here, are the inputs opaque and do we keep them that way, but we could also check for an explicit 0 0 0 0 1 alpha row);
  - we can skip the clamp_0 if the matrix can never produce a value less than 0;
  - we can skip the clamp_1 if the matrix can never produce a value greater than 1.

The only thing that should seem missing is per-pixel alpha checks.  We don't do those here, but instead make up for it by operating on 4-8 pixels at a time.
We don't split the 4x5 matrix into a 4x4 and 1x4 translate.  We could, but when we have FMA (new x86, all ARMv8) we might as well work the translate for free into the FMAs.

This makes gm/fadefilter.cpp draw differently in sRGB and F16 modes, bringing them in line with the GPU sRGB and GPU f16 configs.  It's unclear to me what was wrong with the old CPU implementation.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4346
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Change-Id: I14082ded8fb8d63354167d9e6b3f8058f840253e
Reviewed-on: https://skia-review.googlesource.com/4346
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-03 15:49:24 +00:00
Matt Sarett
70ac8a9d09 Fix bitmap shaders gm
BUG=skia:

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

Change-Id: If3938e529fbf82830048d3c194673603d509bf28
Reviewed-on: https://skia-review.googlesource.com/4373
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-03 15:33:07 +00:00
benjaminwagner
dc46bf10ae Revert of Try to use only std::aligned_storage. (patchset #2 id:20001 of https://codereview.chromium.org/2468243002/ )
Reason for revert:
DM failure: https://luci-milo.appspot.com/swarming/task/324387bf30100f10

c:\b\work\skia\src\core\sklinearbitmappipeline.cpp:49: fatal error: "assert(sizeof(Variant) <= sizeof(fSpace))"

Original issue's description:
> Try to use only std::aligned_storage. This does not change the API.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2468243002
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/e736e0c2d52a29a3b88a29ab39b3a90a5a2443a0

TBR=mtklein@chromium.org,bsalomon@google.com,mtklein@google.com,reed@google.com,herb@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/2474073002
2016-11-03 08:08:23 -07:00
herb
e736e0c2d5 Try to use only std::aligned_storage. This does not change the API.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2468243002
TBR=reed@google.com

Review-Url: https://codereview.chromium.org/2468243002
2016-11-03 07:34:15 -07:00
Brian Salomon
42cb490f37 Exclude Nexus Player from gpudft for flakiness
BUG=skia:5926

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

Change-Id: Ic79b0e2f85f9772afc5a6eae9617a688a8451933
Reviewed-on: https://skia-review.googlesource.com/4324
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2016-11-03 14:28:41 +00:00
Mike Klein
1ec0dbed1b MatrixColorFilter: convert transpose to [0,1] while transposing.
This seems like a no brainer.

BUG=skia:

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

Change-Id: I761c9c696ef9389a25ac30680e7c2bbd43c7affb
Reviewed-on: https://skia-review.googlesource.com/4323
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2016-11-03 14:14:27 +00:00
Ben Wagner
a9cc604b9c Fix case of hex number.
BUG=skia:

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

Change-Id: Ic19ce3795dce6f2a854a061e2e127ced4edce941
Reviewed-on: https://skia-review.googlesource.com/4370
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2016-11-03 14:01:10 +00:00
Ben Wagner
a22254900c Omit msaa on iPad4.
BUG=skia:

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

Change-Id: I48e6123b464ca6487251284f07e13460cace8782
Reviewed-on: https://skia-review.googlesource.com/4369
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2016-11-03 13:27:34 +00:00
Mike Reed
a964a29141 add fatstroke sample
BUG=skia:

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

Change-Id: Ib9872fba7f9f939322bbf943be3fa433721da899
Reviewed-on: https://skia-review.googlesource.com/4347
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-03 02:30:52 +00:00
Mike Klein
13078c8f33 GN android flavor windows support
GN is a .bat, fetch-gn is a Python script, ninja is an .exe.
Just the same stuff gn_flavor does in the same way.

TBR=borenet@google.com

BUG=skia:

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

Change-Id: I89ce3711a6dea46d32fe03c5719ef635defe54f7
Reviewed-on: https://skia-review.googlesource.com/4321
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-03 00:28:09 +00:00
Mike Klein
0d1708e6b7 Run gen_tasks.go for new package version.
I'm learning...

TBR=borenet@google.com

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

Change-Id: I1ae6572b8c1b8722a738e0857bfd85be6640f312
Reviewed-on: https://skia-review.googlesource.com/4367
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-02 22:31:44 +00:00
Mike Klein
efd14d85ec Trim unused files with long paths from Windows NDK package.
Version 1 uploaded to CIPD but not Google Storage.  So this is 0 -> 2.

BUG=skia:

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

Change-Id: I42597c68e309f861021e16d689088869975e4329
Reviewed-on: https://skia-review.googlesource.com/4361
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-02 22:24:42 +00:00
Ben Wagner
ef07565f65 Blame this CL for GTX660 changes.
Updating driver from 372.90 to 375.70.

BUG=skia:
NOTRY=true

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

Change-Id: I289e6599144474b60ebc0caf2ed3d8fa13191295
Reviewed-on: https://skia-review.googlesource.com/4366
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2016-11-02 22:03:53 +00:00
Ben Wagner
7ecc59610d Remove SkAutoTDeleteArray
This class is already just an alias for std::unique_ptr<T[]>, so replace
all uses with that and delete the class.

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot,Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN-Trybot

Change-Id: I40668d398356a22da071ee791666c7f728b59266
Reviewed-on: https://skia-review.googlesource.com/4362
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-02 21:30:38 +00:00
Ben Wagner
d5def99232 Remove SK_SUPPORT_LEGACY_SHADER_ASALOCALMATRIXSHADER
This is no longer used and can be removed.

Change-Id: I6aab1cf243aa1f09bdcd26517a392bbcf11c9444
Reviewed-on: https://skia-review.googlesource.com/4360
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-11-02 21:20:43 +00:00
Ben Wagner
eac8225c76 Add recipe support for PixelC and new Broadwell NUC.
BUG=skia:

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

Change-Id: I998327e58ba2b1e783527e58ee4fa9b1c5218b13
Reviewed-on: https://skia-review.googlesource.com/4318
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2016-11-02 20:41:30 +00:00
Mike Klein
21f364df99 We don't need no SDK.
The buildbot bots don't use this package, so the buildbotless ones don't need it either.

BUG=skia:

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

Change-Id: Ife1a31a8a33ea99a925834ddff13d4866eb52b6d
Reviewed-on: https://skia-review.googlesource.com/4317
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
2016-11-02 20:11:31 +00:00
fmalita
cc34176c04 Fix GradientShaderBase4fContext::Interval fuzzer assert
Although the iterator ensures v0 != v1, 2 - v0 may still be equal to
2 - v1 for very small values due to limited float precision.

We need to recheck the inequality to avoid triggering Interval asserts.

BUG=skia:5903
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2474463002

Review-Url: https://codereview.chromium.org/2474463002
2016-11-02 13:10:51 -07:00
Mike Klein
e9215f0e24 Shorten android_ndk_windows to n to save some precious path budget.
We're going above 260 as-is.
If this doesn't work... hopefully we don't need any of the long-named files.

BUG=skia:

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

Change-Id: I3074c28adfbd4fccb5230eaacf2d6f0c4980bbbe
Reviewed-on: https://skia-review.googlesource.com/4316
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
2016-11-02 19:54:37 +00:00
Ben Wagner
5224515ca0 Freshen blacklists.
- GalaxyS3 and GalaxyS4 bots no longer exist.
   - Add gpudft config for all bots, per conversation with bsalomon. We may need to scale this back if the tests take too long to run.
 - Daisy and Tegra2 bots no longer exist.
 - Re-enable interlaced PNGs per conversation with scroggo.
 - Re-enable msaa on iOS per conversation with bsalomon and stephana.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4311
CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-GN_Android-Trybot;master.client.skia:Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Release-Trybot,Test-Win-MSVC-ShuttleC-GPU-iHD530-x86_64-Debug-Trybot

Change-Id: I12d6e1e2182f9706fda6bd88e1fd987dc2bc57cf
Reviewed-on: https://skia-review.googlesource.com/4311
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2016-11-02 19:24:57 +00:00
robertphillips
c3f4bf7ab3 Fix memory leak in https://skia-review.googlesource.com/c/4227/ (Back SkSpecialImage_Gpu with a GrTextureProxy)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2472703005

Review-Url: https://codereview.chromium.org/2472703005
2016-11-02 11:48:43 -07:00
Mike Klein
86c2c0f077 Add a Windows Android builder.
BUG=skia:

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

Change-Id: Ifd693f5de978565f694bc0173a1248e705303e68
Reviewed-on: https://skia-review.googlesource.com/4320
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-02 17:35:47 +00:00
Hal Canary
2f04712810 s/C++'s gmtime/POSIX's gmtime_r/
BUG=skia:5923

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

Change-Id: I258da9bfa98f16e1abdea0f18ae786f9df118a8e
Reviewed-on: https://skia-review.googlesource.com/4341
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-11-02 17:13:06 +00:00
Greg Daniel
e76071ca0f Update vulkan ranges to be 0 to 1 for all z values
The spec has been updated to require setting the range for z/depth values
to be 0-1 when the image is 2D instead of just ignoring the field as before.

BUG=skia:

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

Change-Id: Ic054ee732472cd9c69f7197fd62cb0cb4f2b26ce
Reviewed-on: https://skia-review.googlesource.com/4308
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2016-11-02 16:30:59 +00:00
Mike Klein
df707567a0 For debug builds, -O0 by default, adding -O1 only on bots.
BUG=skia:

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

Change-Id: Idc1435d75e51ea0b54d369efa91993d369aa74c0
Reviewed-on: https://skia-review.googlesource.com/4344
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-02 16:12:12 +00:00
Robert Phillips
abacf0978f Update ProxyTests
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4306

Change-Id: I0753047eeda71a22b6126f932fc14dd242c5a2e7
Reviewed-on: https://skia-review.googlesource.com/4306
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-11-02 16:06:25 +00:00
Robert Phillips
8bc06d07f5 Back SkSpecialImage_Gpu with a GrTextureProxy
This is split out of https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus))

The addition of the gpuMemorySize methods is for the SkSpecialImage cache.

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

Change-Id: Ia9b9d42fb2a0caf61bbfa3ebcc84308c56f541fc
Reviewed-on: https://skia-review.googlesource.com/4227
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-11-02 15:32:04 +00:00
Mike Klein
9caeb0bc83 Add a Windows Android NDK asset.
We can build for Android from Windows now.  I intend to add a bot to keep it that way, just like Build-Mac-Clang-arm64-Debug-GN_Android does for Mac.  The Windows Android builder will need this NDK.

BUG=skia:

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

DOCS_PREVIEW= https://skia.org/?cl=4280

Change-Id: Ifaeeb9b81822a410bdf79b39c7e66d0765f78e0b
Reviewed-on: https://skia-review.googlesource.com/4280
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-02 13:16:08 +00:00
Brian Osman
eb21ef6641 Loosen restriction on F16 surfaces - allow "legacy" F16 mode
BUG=skia:

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

Change-Id: I032cdf82468ca11639760eb99773a88a5808ebe6
Reviewed-on: https://skia-review.googlesource.com/4231
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-01 21:05:38 +00:00
Brian Osman
7039f74a8b Remove SkImageInfoIsGammaCorrect, etc...
Our internal definition is (and will continue to be) that anything with
a color space is gamma correct. F16 is irrelevant (whether or not we
choose to support untagged F16). This makes these helpers less than
helpful, and lets us remove them from (public) API.

API change is just removal (of unused functions).

TBR=reed@google.com

BUG=skia:

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

Change-Id: Ia84a423548bfee14a3ba4a43d6d5b8c4686fb5ff
Reviewed-on: https://skia-review.googlesource.com/4228
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-01 20:55:51 +00:00
fmalita
afac581523 Sk4fLinearGradient fuzzer fixes
1) update in_range() to actually follow the documented rules regarding interval
   open/close endpoints

2) detect cases where the intervals provide negligible advance and fall back
   to using a color average

BUG=skia:5647
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2472483002

Review-Url: https://codereview.chromium.org/2472483002
2016-11-01 13:41:34 -07:00
Mike Reed
08ed0d4926 remove legacy flags from g3
BUG=skia:

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

Change-Id: Icb3e8f132975d1ef2b6b89de05b49f89e2424f78
Reviewed-on: https://skia-review.googlesource.com/4225
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-01 19:44:15 +00:00
Kevin Lubick
2f535cecd0 Make fuzzers use cleaner interface
signalBoring() no longer exists.  When the fuzzer runs out of randomness,
it just returns 0.  Fuzzers should not go into infinite loops if this
happens.  do while loops are particularly error-prone.

BUG=skia:

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

Change-Id: Iebcfc14cc6b0a19c5dd015cd39875c81fa44003e
Reviewed-on: https://skia-review.googlesource.com/3963
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-01 19:23:16 +00:00
Mike Klein
1f49f26353 SkRasterPipeline: implement SkLumaColorFilter
After getting discouraged by the non-separable xfermodes, I decided to look at filling out the color filters instead.  This one's nice and easy.

There's only 1 GM that exercises this color filter, and it's drawing noticeably lighter now in f16 and sRGB configs.  565 is unchanged.  This makes me think the diffs are due to lost precision in the previous method, which was going through the default fallback to 8888 filterSpan().

I double checked: the f16 config now draws nearly identically to the gpuf16 config.  It used to be quite different.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4183
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Change-Id: Ic6feaecae5cf18493b5df89733f6a5ca362e9a75
Reviewed-on: https://skia-review.googlesource.com/4183
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-01 18:55:53 +00:00
Ethan Nicholas
4578a8e4a2 fixed skslc's handling of ivec(vec)
BUG=skia:

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

Change-Id: I9b32067af51f3a04efa702cf2eb1ac1ed480df6a
Reviewed-on: https://skia-review.googlesource.com/4222
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-11-01 17:46:51 +00:00
Matt Sarett
a9e9bfc6e4 Delete qcms
This was always intended to be a temporary dependency to use for
testing.  It has served its purpose.

Also, this has already been dropped (accidentally, I think) by
the new GN build.

TBR=reed@google.com

BUG=skia:

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

Change-Id: Ic72ee08bbfaf86ed86a4122fd38be2921eb1327e
Reviewed-on: https://skia-review.googlesource.com/4220
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2016-11-01 16:45:40 +00:00
Mike Klein
10d665d000 Allow most third_party targets to use system libraries if asked.
This extends the pattern in freetype2 to expat, icu, libjpeg-turbo, libpng, libwebp, and zlib, and gives all these an arg to control which to use.

Homebrew doesn't have dng_sdk, piex, or sftnly, or I'd have done the same for them too.

BUG=skia:

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

DOCS_PREVIEW= https://skia.org/?cl=4260

Change-Id: I82e780502bf2217336e791787f172a6fc8f55460
Reviewed-on: https://skia-review.googlesource.com/4260
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Hal Canary <halcanary@google.com>
2016-11-01 16:17:38 +00:00
Mike Reed
5e25717ab6 hide setImageFilter(ptr)
BUG=skia:

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

Change-Id: Iad792cfdf54087ad4c424fd268559c162a9a5f5c
Reviewed-on: https://skia-review.googlesource.com/4184
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-01 16:05:41 +00:00
csmartdalton
c633abbb34 Remove GrStencilSettings from GrPipeline
Updates the GrPipeline to have user stencil settings instead of actual
settings. This allows us to further defer creating and attaching a
stencil buffer.

This change is a partial step. The ultimate goal is to attach the
stencil buffer and create the stencil settings during render target
flush, but for the sake of keeping this CL smaller, we create the
stencil settings right before use for now.

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

Review-Url: https://codereview.chromium.org/2468653002
2016-11-01 08:55:55 -07:00
Hal Canary
7bb9301b16 SkPDF: Always individually position glyphs in Windows.
Confirmed to fix BUG=chromium:659604

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

Change-Id: Ied25284e285ee51ee1a4712b7e17d752f50d88d2
Reviewed-on: https://skia-review.googlesource.com/4202
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-11-01 15:38:44 +00:00
scroggo
e71b1a1496 Report repetition count in SkCodec
Add a new accessor to retrieve the repetition count.

Remove constants (and corresponding copyright) in SkCodecAnimation.
These may make sense for the calling code, but are not needed here.

kRepetitionCountInfinite corresponds to Blink's kAnimationLoopInfinite.
Move cLoopCountNotSeen to private. It is used to determine whether we
still need to parse. Add a new enum to the parse query - only parse
enough to determine the repetition count.

Unlike Chromium, SkGifCodec does not account for deleting the reader
(which SkGifCodec does not do) or failed decodes.

Add a test.

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

Review-Url: https://codereview.chromium.org/2447863002
2016-11-01 08:28:28 -07:00
csmartdalton
c25c5d73e9 Move memoization of multisample specs id to GrRenderTarget
GrGpu used to perform the memoization on behalf of GrRenderTarget via
a public accessor. This change updates GrRenderTarget to do its own
work.

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

Review-Url: https://codereview.chromium.org/2467593002
2016-11-01 07:03:59 -07:00
csmartdalton
7cdda99ac3 TEMPORARY: track stencil clip state in GrRenderTargetOpList
Tracks the stencil clip state in GrRenderTargetOpList instead of
GrStencilAttachment. This is a temporary move to unblock MDB, after
which point we will be able to overhaul clipping.

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

Review-Url: https://codereview.chromium.org/2468743002
2016-11-01 07:03:03 -07:00
Greg Daniel
8a8668b472 Remove check of INITIALIZATION_FAILED in qcomm vulkan runs
This was another workaround for a flaky bug that happened on Adreno devices.
With all the devices updated to newer drivers I want to see if it still
happens. I haven't been able to repo the original bug locally with multiple
runs, so I think it is time to step it up to the bots.

BUG=skia:

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

Change-Id: Idc260785096b054cf0fb30ce9ff0d97178c10ed6
Reviewed-on: https://skia-review.googlesource.com/4212
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2016-10-31 22:49:07 +00:00
Jim Van Verth
3c1b7db243 Add SkShadowMaskFilter
BUG=skia:

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

Change-Id: Idde7f7d6a61583a8be26df7a7c4b293c4710bccf
Reviewed-on: https://skia-review.googlesource.com/3824
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2016-10-31 20:29:30 +00:00
Brian Osman
18b8490085 Always write files in binary mode when unzipping
Prevents CRLF conversion on Windows, which was corrupting SKP files
downloaded with fetch-skps

BUG=skia:

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

Change-Id: Ia876f403d10792ee185d50a29fe30402b733441d
Reviewed-on: https://skia-review.googlesource.com/4210
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-10-31 20:01:33 +00:00
Mike Reed
09d9435835 remove lots of legacy flags
BUG=skia:

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

Change-Id: I49ae36a9b2bb51a6470638d3264923ff4a4dea0a
Reviewed-on: https://skia-review.googlesource.com/4209
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-31 19:35:15 +00:00
Leon Scroggins III
fc49b403eb Use correct color table for prior GIF frames
While investigating skbug.com/5883 I noticed that we use the color
table for the current frame even while recursively decoding frames that
the current frame depends on.

This CL updates fCurrColorTable, fCurrColorTableIsReal and fSwizzler
before decoding prior frames, and then sets them back afterwards.

Move telling the client about the color table into prepareToDecode,
since the other callers do not need to do so. (That is only necessary
for decoding to index 8, which is unsupported for frames with
dependencies.)

Add a test that exposes the bug. colorTables.gif has a local color
table in its second frame that does not match the global table used by
the first frame.

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

Change-Id: Id2dc9e3283adfd92801d2f38726afa74574b1955
Reviewed-on: https://skia-review.googlesource.com/4208
Reviewed-by: Joost Ouwerling <joostouwerling@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2016-10-31 19:23:10 +00:00
Matt Sarett
7f650bdfd8 Tag images as sRGB by default in SkCodec
Unmarked images should be treated as sRGB.

BUG=skia:4895

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

Change-Id: I5f8c308d22fd2d069cbfa89c5a5bb19ae6fde8bd
Reviewed-on: https://skia-review.googlesource.com/4151
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2016-10-31 19:19:33 +00:00
Mike Klein
4d598a35cd Fork skia_vulkan_sdk default value on is_android.
BUG=skia:

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

Change-Id: I091801af7e5e0093ef01a5708c0994928997ddf3
Reviewed-on: https://skia-review.googlesource.com/4205
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-31 18:41:13 +00:00