platform/upstream/libSkiaSharp.git
8 years agoWrite transparent pixels more often in SkGifImageReader
Matt Sarett [Thu, 3 Nov 2016 18:52:28 +0000 (14:52 -0400)]
Write transparent pixels more often in SkGifImageReader

This stems from a behavior difference between Skia and Chrome.
In Skia, we want to write transparent pixels as often as possible.
(It's faster than checking if we should skip each pixel.)
In Chrome, they avoid writing transparent pixels unless
absolutely necessary.

We were cautious about changing behavior when this first landed,
but this is easier to think about in a smaller change (right now).
(1) We can always write transparent pixels when we are writing
    an independent frame.
(2) There is no need for the progressiveDisplay() check.  We
    only ever use progressive display methods on the first
    frame - and the first frame is always independent.

BUG=skia:

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

Change-Id: I82048a08e2003aac216f483c7db8df997b687149
Reviewed-on: https://skia-review.googlesource.com/4379
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
8 years agoImplement SkNx_fma() for Sk4f on ARMv8.
Mike Klein [Thu, 3 Nov 2016 18:43:48 +0000 (14:43 -0400)]
Implement SkNx_fma() for Sk4f on ARMv8.

I was looking at the disassembly of matrix_4x5() and noticed it didn't have any FMAs.  This makes things that call SkNx_fma() actually use the FMA instruction.

BUG=skia:

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

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

8 years agoRemove SkAutoTDelete.
Ben Wagner [Thu, 3 Nov 2016 18:40:50 +0000 (14:40 -0400)]
Remove SkAutoTDelete.

Replace with std::unique_ptr.

Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176
Reviewed-on: https://skia-review.googlesource.com/4381
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
8 years agoFix kMediumQuality invMatrix setup for sizes == mip levels
fmalita [Thu, 3 Nov 2016 18:42:49 +0000 (11:42 -0700)]
Fix kMediumQuality invMatrix setup for sizes == mip levels

When downscaling with kMediumQuality in non-clamp mode, if we happen to hit a size == mip level, then SkBitmapProcInfo::init takes the trivial matrix path and doesn't set up a matrix for normalized coords on the assumption that we're going to ignore the transform.  But kMediumQuality disables allow_ignore_fractional_translate, so we take the filter path after all - but with an incorrect matrix.

R=reed@google.com
BUG=chromium:661180
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2476713002

Review-Url: https://codereview.chromium.org/2476713002

8 years agoFix quad convexity with only one backward dir
liyuqian [Thu, 3 Nov 2016 18:40:19 +0000 (11:40 -0700)]
Fix quad convexity with only one backward dir

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

Review-Url: https://codereview.chromium.org/2465253008

8 years agoRemove sk_linear_to_srgb_noclamp().
Mike Klein [Wed, 2 Nov 2016 18:47:07 +0000 (14:47 -0400)]
Remove sk_linear_to_srgb_noclamp().

We've just re-noticed this can happen:
  1) we have a properly premultiplied linear color;
  2) we convert that to sRGB;
  3) we convert that back to linear;
  4) that color does not appear to be premultiplied.

Removing sk_linear_to_srgb_noclamp(), and thus always clamping to [0,1] here in linear space, does not fix this problem.  However, it does help keep it from propagating too badly.

Just double-checked: the older Sk4f pipeline (SkXfermode4f, SkPM4fPriv, etc) already use sk_linear_to_srgb() exclusively, so they're already doing this same clamp.

BUG=skia:

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

Change-Id: I6352eb0ba969eb25674e8441e43bb51e1e1c0df3
Reviewed-on: https://skia-review.googlesource.com/4314
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

8 years agoUse temporary FBO for GrGLGpu::onReadPixels.
Brian Salomon [Thu, 3 Nov 2016 17:42:00 +0000 (13:42 -0400)]
Use temporary FBO for GrGLGpu::onReadPixels.

Allow configs to be supported as FBO attachments for copies/readbacks without being "renderable" elsewhere in Ganesh.

The motivation for this is to add support for int textures as srcs but not as dsts (at least initially) but to still be able to read them back. This means we don't pay for a unneeded GPU copy when reading back a GrSurface that is a GrTexture and not a GrRenderTarget.

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

Change-Id: I824a73c6b8c1b9634206d76ccf0848d5f9b64441
Reviewed-on: https://skia-review.googlesource.com/4345
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
8 years agoStreamline skia.h construction.
Mike Klein [Wed, 2 Nov 2016 13:14:55 +0000 (09:14 -0400)]
Streamline skia.h construction.

This moves the work of finding headers from `gn gen` time into the action itself.  We can do this safely now because we're constructing a skia.h.d deps file, which Ninja uses to track if-these-are-dirty-then-this-is-dirty relationships.  Everything can now live in one handy find_headers.py.

Upshot is, `gn gen` runs ~50ms faster, and I think the code's clearer this way too.

BUG=skia:

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

Change-Id: I2f1e7adf68be8e961eb77596786a795134bbb9a6
Reviewed-on: https://skia-review.googlesource.com/4065
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

8 years agoRevert "Add F16, SkColorSpaceXform support to SkBmpCodec"
Matt Sarett [Thu, 3 Nov 2016 17:27:12 +0000 (17:27 +0000)]
Revert "Add F16, SkColorSpaceXform support to SkBmpCodec"

This reverts commit d851795e7992565c1eb2b9474ee5ad01d1a01fad.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Add F16, SkColorSpaceXform support to SkBmpCodec
>
> BUG=skia:4895
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4300
>
> Change-Id: I2f2b8d3854ea3a8c5904dd3c5bea0342e2be9789
> Reviewed-on: https://skia-review.googlesource.com/4300
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

Speculative revert for MSAN

TBR=borenet@google.com,msarett@google.com,scroggo@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ie48c03c0c3156267763fbcf96818477567c5069d
Reviewed-on: https://skia-review.googlesource.com/4378
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
8 years agoBasic pipeline blend mode strength reductions:
Mike Klein [Thu, 3 Nov 2016 16:22:01 +0000 (12:22 -0400)]
Basic pipeline blend mode strength reductions:

  - when the shader is opaque, srcover becomes src
  - don't load dst when blitting in src mode with full coverage
  - fold coverage into src alpha when in srcover mode

It's not obvious that we can fold coverage into src alpha when using a 565 mask, so I've not attempted that.  What would we do about alpha?

Over all GMs this causes a single 1-bit difference in sRGB mode.  No 565 or f16 diffs.

BUG=skia:

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

Change-Id: Ib9161f498c4efa6b348ca74522166da64d09a7da
Reviewed-on: https://skia-review.googlesource.com/4349
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>

8 years agoadd include to remove legacy flag
Mike Reed [Thu, 3 Nov 2016 17:12:30 +0000 (13:12 -0400)]
add include to remove legacy flag

BUG=skia:

NOTRY=True

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

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

8 years agoCentralize computation of GrRenderTarget & GrTexture VRAM consumption
Robert Phillips [Thu, 3 Nov 2016 14:19:14 +0000 (10:19 -0400)]
Centralize computation of GrRenderTarget & GrTexture VRAM consumption

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

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

8 years agoAdd F16, SkColorSpaceXform support to SkBmpCodec
Matt Sarett [Wed, 2 Nov 2016 20:18:01 +0000 (16:18 -0400)]
Add F16, SkColorSpaceXform support to SkBmpCodec

BUG=skia:4895

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

Change-Id: I2f2b8d3854ea3a8c5904dd3c5bea0342e2be9789
Reviewed-on: https://skia-review.googlesource.com/4300
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>

8 years agoAdd Matrix colorfilter pipeline stages.
Mike Klein [Thu, 3 Nov 2016 14:20:35 +0000 (10:20 -0400)]
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>

8 years agoFix bitmap shaders gm
Matt Sarett [Thu, 3 Nov 2016 14:55:08 +0000 (10:55 -0400)]
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>
8 years agoRevert of Try to use only std::aligned_storage. (patchset #2 id:20001 of https:/...
benjaminwagner [Thu, 3 Nov 2016 15:08:23 +0000 (08:08 -0700)]
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

8 years agoTry to use only std::aligned_storage. This does not change the API.
herb [Thu, 3 Nov 2016 14:34:15 +0000 (07:34 -0700)]
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

8 years agoExclude Nexus Player from gpudft for flakiness
Brian Salomon [Thu, 3 Nov 2016 14:08:47 +0000 (10:08 -0400)]
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>
8 years agoMatrixColorFilter: convert transpose to [0,1] while transposing.
Mike Klein [Thu, 3 Nov 2016 13:47:18 +0000 (09:47 -0400)]
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>
8 years agoFix case of hex number.
Ben Wagner [Thu, 3 Nov 2016 13:39:52 +0000 (09:39 -0400)]
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>

8 years agoOmit msaa on iPad4.
Ben Wagner [Thu, 3 Nov 2016 13:04:31 +0000 (09:04 -0400)]
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>

8 years agoadd fatstroke sample
Mike Reed [Thu, 3 Nov 2016 02:09:25 +0000 (22:09 -0400)]
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>

8 years agoGN android flavor windows support
Mike Klein [Thu, 3 Nov 2016 00:10:34 +0000 (20:10 -0400)]
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>
8 years agoRun gen_tasks.go for new package version.
Mike Klein [Wed, 2 Nov 2016 22:31:28 +0000 (18:31 -0400)]
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>
8 years agoTrim unused files with long paths from Windows NDK package.
Mike Klein [Wed, 2 Nov 2016 22:23:01 +0000 (18:23 -0400)]
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>
8 years agoBlame this CL for GTX660 changes.
Ben Wagner [Wed, 2 Nov 2016 22:02:26 +0000 (18:02 -0400)]
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>

8 years agoRemove SkAutoTDeleteArray
Ben Wagner [Wed, 2 Nov 2016 21:07:33 +0000 (17:07 -0400)]
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>
8 years agoRemove SK_SUPPORT_LEGACY_SHADER_ASALOCALMATRIXSHADER
Ben Wagner [Wed, 2 Nov 2016 20:41:42 +0000 (16:41 -0400)]
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>

8 years agoAdd recipe support for PixelC and new Broadwell NUC.
Ben Wagner [Wed, 2 Nov 2016 20:08:12 +0000 (16:08 -0400)]
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>
8 years agoWe don't need no SDK.
Mike Klein [Wed, 2 Nov 2016 20:06:40 +0000 (16:06 -0400)]
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>
8 years agoFix GradientShaderBase4fContext::Interval fuzzer assert
fmalita [Wed, 2 Nov 2016 20:10:51 +0000 (13:10 -0700)]
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

8 years agoShorten android_ndk_windows to n to save some precious path budget.
Mike Klein [Wed, 2 Nov 2016 19:44:26 +0000 (15:44 -0400)]
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>
8 years agoFreshen blacklists.
Ben Wagner [Wed, 2 Nov 2016 17:11:05 +0000 (13:11 -0400)]
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>

8 years agoFix memory leak in https://skia-review.googlesource.com/c/4227/ (Back SkSpecialImage_...
robertphillips [Wed, 2 Nov 2016 18:48:43 +0000 (11:48 -0700)]
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

8 years agoAdd a Windows Android builder.
Mike Klein [Wed, 2 Nov 2016 17:13:16 +0000 (13:13 -0400)]
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>

8 years agos/C++'s gmtime/POSIX's gmtime_r/
Hal Canary [Wed, 2 Nov 2016 16:37:56 +0000 (12:37 -0400)]
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>

8 years agoUpdate vulkan ranges to be 0 to 1 for all z values
Greg Daniel [Wed, 2 Nov 2016 15:57:06 +0000 (11:57 -0400)]
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>
8 years agoFor debug builds, -O0 by default, adding -O1 only on bots.
Mike Klein [Wed, 2 Nov 2016 15:47:50 +0000 (11:47 -0400)]
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>

8 years agoUpdate ProxyTests
Robert Phillips [Wed, 2 Nov 2016 14:23:32 +0000 (10:23 -0400)]
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>

8 years agoBack SkSpecialImage_Gpu with a GrTextureProxy
Robert Phillips [Tue, 1 Nov 2016 21:28:40 +0000 (17:28 -0400)]
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>

8 years agoAdd a Windows Android NDK asset.
Mike Klein [Tue, 1 Nov 2016 18:03:04 +0000 (14:03 -0400)]
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>

8 years agoLoosen restriction on F16 surfaces - allow "legacy" F16 mode
Brian Osman [Tue, 1 Nov 2016 20:30:21 +0000 (16:30 -0400)]
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>
8 years agoRemove SkImageInfoIsGammaCorrect, etc...
Brian Osman [Tue, 1 Nov 2016 19:56:16 +0000 (15:56 -0400)]
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>
8 years agoSk4fLinearGradient fuzzer fixes
fmalita [Tue, 1 Nov 2016 20:41:34 +0000 (13:41 -0700)]
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

8 years agoremove legacy flags from g3
Mike Reed [Tue, 1 Nov 2016 19:20:15 +0000 (15:20 -0400)]
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>

8 years agoMake fuzzers use cleaner interface
Kevin Lubick [Tue, 1 Nov 2016 19:01:12 +0000 (15:01 -0400)]
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>
8 years agoSkRasterPipeline: implement SkLumaColorFilter
Mike Klein [Mon, 31 Oct 2016 23:49:27 +0000 (19:49 -0400)]
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>

8 years agofixed skslc's handling of ivec(vec)
Ethan Nicholas [Tue, 1 Nov 2016 15:57:42 +0000 (11:57 -0400)]
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>
8 years agoDelete qcms
Matt Sarett [Tue, 1 Nov 2016 16:19:50 +0000 (12:19 -0400)]
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>

8 years agoAllow most third_party targets to use system libraries if asked.
Mike Klein [Tue, 1 Nov 2016 15:46:10 +0000 (11:46 -0400)]
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>
8 years agohide setImageFilter(ptr)
Mike Reed [Tue, 1 Nov 2016 15:22:05 +0000 (11:22 -0400)]
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>

8 years agoRemove GrStencilSettings from GrPipeline
csmartdalton [Tue, 1 Nov 2016 15:55:55 +0000 (08:55 -0700)]
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

8 years agoSkPDF: Always individually position glyphs in Windows.
Hal Canary [Mon, 31 Oct 2016 16:40:49 +0000 (12:40 -0400)]
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>

8 years agoReport repetition count in SkCodec
scroggo [Tue, 1 Nov 2016 15:28:28 +0000 (08:28 -0700)]
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

8 years agoMove memoization of multisample specs id to GrRenderTarget
csmartdalton [Tue, 1 Nov 2016 14:03:59 +0000 (07:03 -0700)]
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

8 years agoTEMPORARY: track stencil clip state in GrRenderTargetOpList
csmartdalton [Tue, 1 Nov 2016 14:03:03 +0000 (07:03 -0700)]
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

8 years agoRemove check of INITIALIZATION_FAILED in qcomm vulkan runs
Greg Daniel [Mon, 31 Oct 2016 20:34:42 +0000 (16:34 -0400)]
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>

8 years agoAdd SkShadowMaskFilter
Jim Van Verth [Mon, 31 Oct 2016 20:06:51 +0000 (16:06 -0400)]
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>

8 years agoAlways write files in binary mode when unzipping
Brian Osman [Mon, 31 Oct 2016 19:28:10 +0000 (15:28 -0400)]
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>

8 years agoremove lots of legacy flags
Mike Reed [Mon, 31 Oct 2016 19:11:04 +0000 (15:11 -0400)]
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>

8 years agoUse correct color table for prior GIF frames
Leon Scroggins III [Mon, 31 Oct 2016 18:08:56 +0000 (14:08 -0400)]
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>

8 years agoTag images as sRGB by default in SkCodec
Matt Sarett [Mon, 31 Oct 2016 01:25:34 +0000 (21:25 -0400)]
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>

8 years agoFork skia_vulkan_sdk default value on is_android.
Mike Klein [Mon, 31 Oct 2016 17:44:49 +0000 (13:44 -0400)]
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>

8 years agoAdd GrNextSizePow2
Robert Phillips [Fri, 28 Oct 2016 16:15:03 +0000 (12:15 -0400)]
Add GrNextSizePow2

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

BUG=skia:5882

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

8 years agoReject non-D50 matrices from ICC profiles
Matt Sarett [Mon, 31 Oct 2016 17:41:57 +0000 (13:41 -0400)]
Reject non-D50 matrices from ICC profiles

BUG:660838

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

Change-Id: Ib57eb3705d6fe638e3a9cb56788937fc7e282847
Reviewed-on: https://skia-review.googlesource.com/4200
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
8 years agoUpdate Nexus6p to MR1 build.
Ben Wagner [Mon, 31 Oct 2016 16:18:40 +0000 (12:18 -0400)]
Update Nexus6p to MR1 build.

BUG=skia:5908

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4157
CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-GN_Android_Vulkan

Change-Id: I7b670f878e5df9c5785b56fd5694c7601655710a
Reviewed-on: https://skia-review.googlesource.com/4157
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>

8 years agoremove bunch of legacy flags
Mike Reed [Mon, 31 Oct 2016 16:52:04 +0000 (12:52 -0400)]
remove bunch of legacy flags

BUG=skia:

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

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

8 years agoremove legacy xfermode build flag
Mike Reed [Mon, 31 Oct 2016 16:31:12 +0000 (12:31 -0400)]
remove legacy xfermode build flag

BUG=skia:

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

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

8 years agoMinor fix to GN for vulkan android builds
Greg Daniel [Mon, 31 Oct 2016 15:19:59 +0000 (11:19 -0400)]
Minor fix to GN for vulkan android builds

BUG=skia:

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

Change-Id: Ib6a630bbdaf503ff44fbc699aaffdf13ee9c2b59
Reviewed-on: https://skia-review.googlesource.com/4155
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
8 years agoScript to fix GN generated solutions
Brian Osman [Mon, 31 Oct 2016 16:37:01 +0000 (12:37 -0400)]
Script to fix GN generated solutions

Assumes that all GN configurations are in 'out'. Takes the name of a
single directory (which should have been generated with --ide=vs) as
input. Creates a new solution and project tree in 'out/sln/skia.sln'
with one configuration per directory in 'out'.

Example: From skia directory, run 'python fix-gn-sln.py Debug'

BUG=skia:

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

Change-Id: I797b779eb5bc30cec0e6741d4262894fc0648e97
Reviewed-on: https://skia-review.googlesource.com/4158
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
8 years agoReland "Build SkRawCodec in GN"
scroggo [Mon, 31 Oct 2016 16:02:57 +0000 (09:02 -0700)]
Reland "Build SkRawCodec in GN"

Add BUILD.gn files for dng_sdk and piex and updated BUILD.gn to
build SkRawCodec.

We stopped testing raw images when we switched to GN, so this will
bring back our testing.

Leave SkRawCodec disabled on Windows, where we've had problems in the
past.

Originally landed in issue 4603. Reverted due to build errors.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2463433002

Review-Url: https://codereview.chromium.org/2463433002

8 years agoDraw Alpha8 + color filter correctly in software
Matt Sarett [Fri, 28 Oct 2016 17:25:40 +0000 (13:25 -0400)]
Draw Alpha8 + color filter correctly in software

This makes the behavior match our gpu backend.

BUG=android:31019366

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

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

8 years agoupdate SkFixed15 float conversion notes.
Mike Klein [Mon, 31 Oct 2016 14:08:55 +0000 (10:08 -0400)]
update SkFixed15 float conversion notes.

BUG=skia:

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

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

8 years agoFix GN config for skpbench
Jim Van Verth [Mon, 31 Oct 2016 13:52:33 +0000 (09:52 -0400)]
Fix GN config for skpbench

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

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

8 years agoAdd missing sk_tool_utils flags_common dependency
fmalita [Mon, 31 Oct 2016 14:22:24 +0000 (07:22 -0700)]
Add missing sk_tool_utils flags_common dependency

Not sure why this is only a problem on my workstation, but SampleApp linking is borked with

obj/gyp/../tools/sk_tool_utils.sk_tool_utils.o: In function `sk_tool_utils::platform_os_name()':
/mnt/screamin/src/blink/src/third_party/skia/out/Debug/../../tools/sk_tool_utils.cpp:128: undefined reference to `FLAGS_key'
/mnt/screamin/src/blink/src/third_party/skia/out/Debug/../../tools/sk_tool_utils.cpp:129: undefined reference to `FLAGS_key'
/mnt/screamin/src/blink/src/third_party/skia/out/Debug/../../tools/sk_tool_utils.cpp:127: undefined reference to `FLAGS_key'
obj/gyp/../tools/sk_tool_utils.sk_tool_utils.o: In function `sk_tool_utils::major_platform_os_name()':
/mnt/screamin/src/blink/src/third_party/skia/out/Debug/../../tools/sk_tool_utils.cpp:140: undefined reference to `FLAGS_key'
/mnt/screamin/src/blink/src/third_party/skia/out/Debug/../../tools/sk_tool_utils.cpp:141: undefined reference to `FLAGS_key'
obj/gyp/../tools/sk_tool_utils.sk_tool_utils.o:/mnt/screamin/src/blink/src/third_party/skia/out/Debug/../../tools/sk_tool_utils.cpp:139: more undefined references to `FLAGS_key' follow
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

R=mtklein@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2464903002

Review-Url: https://codereview.chromium.org/2464903002

8 years agoDisable some SkDebugfs for dbg bots debugging
liyuqian [Mon, 31 Oct 2016 14:19:35 +0000 (07:19 -0700)]
Disable some SkDebugfs for dbg bots debugging

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

Review-Url: https://codereview.chromium.org/2464893002

8 years agoSkPixmap::getColor()
Hal Canary [Mon, 31 Oct 2016 13:38:12 +0000 (09:38 -0400)]
SkPixmap::getColor()

Implement SkBitmap::getColor() in terms of SkPixmap::getColor().

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

Change-Id: I6192a7979d82b3d301a06ae1339bcab4c7ebf7c1
Reviewed-on: https://skia-review.googlesource.com/4160
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

8 years agoSkFixed15
Mike Klein [Mon, 31 Oct 2016 13:20:54 +0000 (09:20 -0400)]
SkFixed15

BUG=skia:

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

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

8 years agoupdate androidsdkcanvas for SkBlendMode
reed [Mon, 31 Oct 2016 12:27:57 +0000 (05:27 -0700)]
update androidsdkcanvas for SkBlendMode

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

TBR=

Review-Url: https://codereview.chromium.org/2464433003

8 years agoadd isAlphaOnly() query
reed [Mon, 31 Oct 2016 12:27:28 +0000 (05:27 -0700)]
add isAlphaOnly() query

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

TBR=

Review-Url: https://codereview.chromium.org/2461773002

8 years agoTreat a GIF with no color table as transparent
scroggo [Mon, 31 Oct 2016 11:45:10 +0000 (04:45 -0700)]
Treat a GIF with no color table as transparent

When checking to see whether a GIF has transparency to determine its
alpha type, treat an empty color table as having alpha, since we
will draw it as a transparent image.

(This is a separate bug from skbug.com/5883, but the image I used to
verify that bug was drawn to 565 as black. The fix is to not support
565 in that case, by changing its recommended alpha type.)

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

Review-Url: https://codereview.chromium.org/2461813002

8 years agoRevert "Speculative fix for flaky webp encode/decode on Nexus 5"
Matt Sarett [Mon, 31 Oct 2016 01:16:36 +0000 (01:16 +0000)]
Revert "Speculative fix for flaky webp encode/decode on Nexus 5"

This reverts commit 18a11a6f374fe430c8736c53ff4f8bc3c72cd54b.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Speculative fix for flaky webp encode/decode on Nexus 5
>
> I'm not really expecting this to work anymore...
>
> The docs don't say anything about the rgb pointer needing
> to stay valid, and it looks like we are done with it
> after the call to import.
>
> Still, worth a try I think.
>
> BUG=skia:5876
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4024
>
> Change-Id: I6e65ef96a2b661b01eb92bedab0acd73ed4f6218
> Reviewed-on: https://skia-review.googlesource.com/4024
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

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

Change-Id: Id764782ea58acc99e4719c0bff22619abaf9c6e5
Reviewed-on: https://skia-review.googlesource.com/4150
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
8 years agoUpdate SKP version
update-skps [Sun, 30 Oct 2016 09:12:18 +0000 (02:12 -0700)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

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

Review-Url: https://codereview.chromium.org/2461223002

8 years agoChange comments to refer to "render target context" rather than "draw context"
Brian Salomon [Sat, 29 Oct 2016 04:13:29 +0000 (00:13 -0400)]
Change comments to refer to "render target context" rather than "draw context"

BUG=skia:

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

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

8 years agoPrevent overflow by falling back to non-AA
liyuqian [Sat, 29 Oct 2016 00:16:53 +0000 (17:16 -0700)]
Prevent overflow by falling back to non-AA

This piece of code is directly copied from our old supersampling AA
code. I didn not preserve this code because it's not triggered by any Skia
tests. However, this will be critical to Chromium's tests as some
websites will generate huge paths!

I'm not so sure whether the long_running_idle_gmail_background_tbmv2 test
failed because of this. But I'm sure that www.nationalgeographic.com from
page_cycler_v2.typical_25 failed because of this.

BUG=chromium:660394

TBR=reed@google.com,caryclark@google.com

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

Review-Url: https://codereview.chromium.org/2461133002

8 years agoVarious fixes in VulkanWindowContext
Greg Daniel [Thu, 27 Oct 2016 20:37:17 +0000 (16:37 -0400)]
Various fixes in VulkanWindowContext

BUG=skia:

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

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

8 years agoFix bounds updates in vulkan discards
Greg Daniel [Fri, 28 Oct 2016 19:07:16 +0000 (15:07 -0400)]
Fix bounds updates in vulkan discards

BUG=skia:

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

Change-Id: If78abf6b5ff4e7d97768313dcf4f2a90a1020420
Reviewed-on: https://skia-review.googlesource.com/4147
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>

8 years agoremove xfermode from public api
Mike Reed [Fri, 28 Oct 2016 19:42:34 +0000 (15:42 -0400)]
remove xfermode from public api

BUG=skia:

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

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

Change-Id: I19cd056f2af778f10e8c6c2b7b2735593b43dbac
Reviewed-on: https://skia-review.googlesource.com/4020
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>

8 years agoRemove unneeded SkColorSpace constructor
Matt Sarett [Fri, 28 Oct 2016 16:51:08 +0000 (12:51 -0400)]
Remove unneeded SkColorSpace constructor
TBR=reed@google.com
BUG=skia:

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

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

8 years agoAdd tests for ColorSpacePrimaries to XYZD50
Matt Sarett [Fri, 28 Oct 2016 18:45:03 +0000 (14:45 -0400)]
Add tests for ColorSpacePrimaries to XYZD50

BUG=skia:

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

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

8 years agoFall back on stencil clip when SW mask fails to allocate
csmartdalton [Fri, 28 Oct 2016 19:01:10 +0000 (12:01 -0700)]
Fall back on stencil clip when SW mask fails to allocate

When generating a SW clip mask, we didn't used to verify that the
pixels had been successfully allocated. This would obviously crash
when the allocation was not successful. This change checks the
allocation first, and falls back on a stencil clip when it doesn't
succeed.

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

Review-Url: https://codereview.chromium.org/2456153003

8 years agoMake GrDrawContext be GrRenderTargetProxy-backed
Robert Phillips [Fri, 28 Oct 2016 17:25:24 +0000 (13:25 -0400)]
Make GrDrawContext be GrRenderTargetProxy-backed

This is split out of https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus))

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

CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android-Trybot

Change-Id: I1a47f19ed1ac0c249e6ccac8db74095d7f456db4
Reviewed-on: https://skia-review.googlesource.com/3841
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
8 years agoAdd GN config for Mac SampleApp
Jim Van Verth [Fri, 28 Oct 2016 17:35:50 +0000 (13:35 -0400)]
Add GN config for Mac SampleApp

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

Change-Id: I67e4456c8ccdb5413e86c442b759f6dff4de651b
Reviewed-on: https://skia-review.googlesource.com/4077
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
8 years agoDocumentation: SkBitmap->SkImage
Hal Canary [Fri, 28 Oct 2016 16:18:32 +0000 (12:18 -0400)]
Documentation: SkBitmap->SkImage

NOTRY=true
Change-Id: Ieb99a447b4198b1ba5d1bc17668b307d82d62be5
Reviewed-on: https://skia-review.googlesource.com/4121
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>

8 years agoReduced skslc memory consumption
ethannicholas [Fri, 28 Oct 2016 16:02:46 +0000 (09:02 -0700)]
Reduced skslc memory consumption

The big change here is smarter generic type handling which allows us to
keep far fewer entries in the core symboltable. This also comments out
a number of OpenGL builtin functions which Skia does not use and is
unlikely to in the future.
BUG=655673
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2442063002

Committed: https://skia.googlesource.com/skia/+/cffaa70896fa5bc6c7bf98abbaafb1a755b49762
Review-Url: https://codereview.chromium.org/2442063002

8 years agoMake addTexture/BufferAccess on GrProcessor non-virtual
Brian Salomon [Fri, 28 Oct 2016 15:25:52 +0000 (11:25 -0400)]
Make addTexture/BufferAccess on GrProcessor non-virtual

Perhaps these needed to be virtual in the past, but no longer.

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

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

8 years agoAdd SampleApp support to GN (win and linux), take two.
Jim Van Verth [Fri, 28 Oct 2016 14:38:08 +0000 (10:38 -0400)]
Add SampleApp support to GN (win and linux), take two.

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

Change-Id: I2b25c3e48992e63d2990c8ac77363eff4ddd926d
Reviewed-on: https://skia-review.googlesource.com/4075
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>

8 years agoAdd support for lib_dirs to gn_to_cmake.py.
Ben Wagner [Thu, 27 Oct 2016 22:47:54 +0000 (18:47 -0400)]
Add support for lib_dirs to gn_to_cmake.py.

The vulcan code uses lib_dirs to point to the libs in the SDK.

Change-Id: I4a1a4235b8534f3f937640b10f9758b0c70434c9
Reviewed-on: https://skia-review.googlesource.com/4003
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>

8 years agoRevert "Build SkRawCodec in GN"
Leon Scroggins [Fri, 28 Oct 2016 14:09:35 +0000 (14:09 +0000)]
Revert "Build SkRawCodec in GN"

This reverts commit 04b1f461aa49c91ffbc484b88b32489efca55bab.

Reason for revert: Breaking build bots

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

Change-Id: I26c71116ad19b3c494fd632fcc6309bc2ae0d828
Reviewed-on: https://skia-review.googlesource.com/4100
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
8 years agoBuild SkRawCodec in GN
Leon Scroggins III [Fri, 28 Oct 2016 13:17:20 +0000 (09:17 -0400)]
Build SkRawCodec in GN

Add BUILD.gn files for dng_sdk and piex and updated BUILD.gn to
build SkRawCodec.

We stopped testing raw images when we switched to GN, so this will
bring back our testing.

Leave SkRawCodec disabled on Windows, where we've had problems in the
past.

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

Change-Id: I956949506200b766a2f7efb18e0486f3a2f93a1c
Reviewed-on: https://skia-review.googlesource.com/4063
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>