Commit Graph

28117 Commits

Author SHA1 Message Date
Cary Clark
0418a888d3 add parameter names
Functions in SkPaint and SkCanvas are easier to write
about when all of their parameters are named.

Also, move GlyphCacheProc to private since the only
interface that returns it is already in private.

R=reed@google.com

Change-Id: Iaea46213d5614d564c1c3de99e6f96c5efaec4b1
Reviewed-on: https://skia-review.googlesource.com/16175
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2017-05-10 14:22:58 +00:00
Brian Salomon
1ffda0484d allow inf/nan in GrRect isect utility functions.
Separately we may want to determine why we get NaNs here in flutter.

Bug: skia:6607
Change-Id: Id90fff1ccf487794d55dc011b1a2d176cedb931a
Reviewed-on: https://skia-review.googlesource.com/16342
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-10 12:53:32 +00:00
recipe-roller
f55a62b03b Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
build:
  https://crrev.com/248dfae5042b4c64da3aceeda4cd86b6a26718ff Enforce strict coverage for math_utils recipe module (phajdan.jr@chromium.org)
  https://crrev.com/f61b8f4f27b631705aa4a42ed11cfbda1689f2a0 [pinpoint] Enable swarming on Pinpoint builder and change parent_buildername. (dtu@chromium.org)
  https://crrev.com/70c70024b138c06c7e76bc099bc9793bcb66be53 Enable Kitchen on all "chromium.fyi". (dnj@chromium.org)
  https://crrev.com/363c91e87561385daf733cd30aa1a4391dd249ee remote_run: Bump canary Kitchen version. (dnj@chromium.org)
recipe_engine:
  https://crrev.com/9f2573a386ee07450095cbeb3562df94a644962f bootstrap: show a better missing CIPD error (dnj@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I9a1478f3359ae342acfed3c17ebe56a6034eb749
Reviewed-on: https://skia-review.googlesource.com/16361
Reviewed-by: Recipe Roller <recipe-roller@chromium.org>
Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
2017-05-10 11:43:35 +00:00
recipe-roller
ca572f9c90 Roll recipe dependencies (nontrivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


Please review the expectation changes, and LGTM+CQ.


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
build:
  https://crrev.com/d1cc05b08eb5bd2fe0b71fde4fcc5f5d1d65b5d6 swarming api: fix legacy way to specify isolated (maruel@chromium.org)


Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I0cbbff8ee1124ebaf40a20fbb0f780a6dca6537e
Reviewed-on: https://skia-review.googlesource.com/16320
Reviewed-by: Marc-Antoine Ruel <maruel@google.com>
Reviewed-by: Robbie Iannucci <iannucci@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-05-10 11:18:43 +00:00
Mike Klein
452a7a248b ok, fix typo: struct -> static
Change-Id: I2b26ccd017d9e66ced41a1af04929e2d83a5a2d5
Reviewed-on: https://skia-review.googlesource.com/16343
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-09 22:42:05 +00:00
Mike Klein
62669ad29c ok, add timer via
Change-Id: I3d25a2aa9ae6dacb52779142cea062c7d9df40f5
Reviewed-on: https://skia-review.googlesource.com/16238
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-09 22:00:39 +00:00
Brian Osman
25294d76b1 Pre-clamp path tolerance
GrDefaultPathRenderer was using GrPathUtils::worstCasePointCount, which
clamped the tolerance. Then it built geometry with the unclamped value,
leading to vertex overflow (found by canvas fuzzer). The new rule is if
you use GrPathUtils, your tolerance must come from scaleToleranceToSrc.

Bug: skia:6569
Change-Id: I851519db8e569e570c717033d697f3d4d3d787fb
Reviewed-on: https://skia-review.googlesource.com/16234
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-09 20:58:41 +00:00
Mike Klein
fdf31035a9 void SkColorFilter::onAppendStages(...)
SkColorFilter::onAppendStages() can't actually fail today.
Let's enforce that.  This means the fallback is now used
only for color filters that have not implemented onAppendStages().

Change-Id: Ica3939685694f6186727766b54914b9ba05ca68c
Reviewed-on: https://skia-review.googlesource.com/16231
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-09 20:04:44 +00:00
Mike Klein
b8fbab2a1c fix 565
Change-Id: Ibde5242dc4f66b720cb8be1e2d771ba88b12b496
Reviewed-on: https://skia-review.googlesource.com/16241
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-05-09 19:39:39 +00:00
Matt Sarett
d7093c2486 Add encode to bzl include paths
NOTRY=true

Bug: skia:
Change-Id: Ib37b9a0a5b3c07b0b78b389bd3003c350b49b53f
Reviewed-on: https://skia-review.googlesource.com/16232
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-09 19:32:19 +00:00
Greg Daniel
852d7155dd Create geometry shader modules in vulkan when using geom shaders
Looks like this was left off the original vulkan Geo shader change.
Bug: skia:
Change-Id: Iec1c09d6d7b347147e4237bad3e6b3eb4684154e
Reviewed-on: https://skia-review.googlesource.com/15813
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2017-05-09 19:30:19 +00:00
Brian Osman
ab8ce1a5ae Fixed distance field interpolation for gamma correct rendering
Bug: skia:
Change-Id: I9037decfeb9b2ab673434bb3c4b7f55aca186d68
Reviewed-on: https://skia-review.googlesource.com/13872
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-09 18:55:24 +00:00
Brian Osman
13dddce65f Added SkImage::MakeCrossContextFromEncoded
Designed for Flutter's threading architecture, with
an eye to being useful to other clients. Under the
hood, uses a new image generator class to lazily wrap
a texture for multiple GrContexts.

Re-land of https://skia-review.googlesource.com/c/14180/

Bug: skia:
Change-Id: I3dd382640629b79b3058f18fee68d043566e43e5
Reviewed-on: https://skia-review.googlesource.com/15895
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-09 18:45:04 +00:00
Robert Iannucci
3734c7d9e3 Manually roll recipes.
Include new --package option for recipes.py.

build:
  https://crrev.com/380216596a663dc45d6562b29bce3719e2620ac0 Bump bot environment "vpython". (dnj@chromium.org)
  https://crrev.com/226d6eadceee58fe6832679e39a040a46d5df989 Bump Kitchen canary, clear PYTHONPATH. (dnj@chromium.org)
  https://crrev.com/45f9beb12883c6b509c699c1dd1694be218c4740 Write uploaded log url to file in goma module (tikuta@google.com)
  https://crrev.com/5c6b5807ee3de9277b8c6e3182f621e4216e2eea WebRTC: Rename tools-webrtc -> tools_webrtc (kjellander@chromium.org)
  https://crrev.com/3090e9f2c42f7254fc9b42b21ed792e19d77e667 Manually roll depot_tools 69a239e:e2f9fee (phajdan.jr@chromium.org)
  https://crrev.com/e845e79d0cd39af876b4fff648c68bd023633c8a chromium_checkout: add non-fatal gclient validate step (phajdan.jr@chromium.org)
  https://crrev.com/3bed2fc03bc435464880411740b20031f80ed41c Remove old GYP compatibility targets from chromium_tests. (RELAND) (jbudorick@chromium.org)
  https://crrev.com/9b44962a1bfb8134ffac7f5606a11cb8ff8489e8 Flutter: Rev Android build tools to 23.0.3 (mit@google.com)
  https://crrev.com/6fa4d503d7ef77a951b446ca01b5b18a3c9fb79c remote_run: promote Kitchen canary to stable. (dnj@chromium.org)

depot_tools:
  https://crrev.com/4ebaaf9d9c1e24548f3c9f9f748e8631d091ecd0 Bump "vpython" version. (dnj@chromium.org)
  https://crrev.com/0bbd1c28d5827379f363f2a9170eeda27fd7b758 git-cl: upload to merge-base with master, not tip of origin/master (agable@chromium.org)
  https://crrev.com/e2f9feecaf4326cef699624d5f52b9f31ecbc104 Add validate command to gclient (phajdan.jr@chromium.org)

recipe_engine:
  https://crrev.com/66338449f4d727da096422c1df1b6654224d6512 [bootstrap] don't change directories when bootstrapping. (iannucci@chromium.org)
  https://crrev.com/487e5e371bf8140b0467c6366f94042581f5c63c [recipes.py] refactor PackageContext to remove unused --deps-path arg. (iannucci@chromium.org)
  https://crrev.com/92c5b73ff81fb30c80a33bab91be51551d5e67b7 Bump "vpython" bootstrap version. (dnj@chromium.org)
  https://crrev.com/d6c4a597be2da8be7971b4d5f66e3d95e8fc325c [recipes.py] refactor PackageContext to remove --no-fetch logic. (iannucci@chromium.org)
  https://crrev.com/cfeeb53051e02856a35395a69b09f822ad35e2e5 [doc/recipes.py] Improve copypasta bootstrap script. (iannucci@chromium.org)
  https://crrev.com/e90c11af854574dd68edd0e7c7a5e04ceb49ffd0 [recipes.cfg] remove support for api_version 1. (iannucci@chromium.org)
  https://crrev.com/497f5b7f92cea8e5273d56cc3cba876fb18b42d9 [doc/recipes.py] fix issue when running recipes.py from . (iannucci@chromium.org)
  https://crrev.com/e7bbbf6cfac944157d80cc92fd78837165e69d3f Fix a race crash when recipe expectations directory exists (phajdan.jr@chromium.org)
  https://crrev.com/bf2ff828987549b946135919bd1bffd6e42fd8fd [doc/recipes.py] Add option to recipes.py to allow it to work without .git (iannucci@chromium.org)

R=borenet@google.com

Bug: skia:
Change-Id: Ic7c20a7beb6165ea79194053016759722fea6a51
Reviewed-on: https://skia-review.googlesource.com/16201
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2017-05-09 18:42:14 +00:00
Matt Sarett
fe3190846c Add downsampling option to SkJpegEncoder
Bug: 713862
Change-Id: Ibad6ecf836ccfd355499e1bace7bcd4ba772a97a
Reviewed-on: https://skia-review.googlesource.com/15891
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-05-09 18:37:10 +00:00
Mike Reed
443531126a update dox for dithering
Bug: skia:6604
Change-Id: I21b505c54c1d43abf62b7c577e7dd88e53ed30fd
Reviewed-on: https://skia-review.googlesource.com/16156
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-05-09 18:37:09 +00:00
Mike Reed
7120b2d577 move set-text-matrix into private
Had no external callers, and was poorly named.

Bug: skia:
Change-Id: I5bed6853e9aa3b31fa106a436a73297bf55f0503
Reviewed-on: https://skia-review.googlesource.com/16155
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-05-09 18:32:05 +00:00
Matt Sarett
2e61b182da Add jpeg encoder alpha handling option
This instructs us on how to encode jpegs when the src
image has alpha.  The original behavior is to ignore
the alpha channel.  This CL adds the option to blend
the pixels onto opaque black.

Note that kBlendOnBlack and kIgnore are identical
unless the input alpha type is kUnpremul.

Bug: 713862
Bug: skia:1501
Change-Id: I4891c70bb0ccd83f7974c359bd40a2143b5c49ac
Reviewed-on: https://skia-review.googlesource.com/15817
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-09 18:32:04 +00:00
Mike Klein
ee2d9df087 make append_gamut_tranform() never fail
The only way it could ostensibly fail is if we get non-XYZ color
spaces, which should just not happen.  Assert that doesn't happen
and safely do nothing instead of failing.

This is one of the leaf nodes to getting SkCreateRasterPipelineBlitter
to never fail.  Next come SkColorFilter:: and SkShader::appendStages().

Change-Id: I5c7a8c63d0a9837e2e55208e1674796d86f45307
Reviewed-on: https://skia-review.googlesource.com/16002
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-05-09 18:16:51 +00:00
Greg Daniel
31ec144227 Add support for using texel buffers in Vulkan backend.
Bug: skia:
Change-Id: I5cc7b18263dbe28d5d8d89301111ef240109704a
Reviewed-on: https://skia-review.googlesource.com/15770
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-09 18:02:44 +00:00
Mike Klein
59da068d64 Tune down libpng in DM.
Timing `out/dm --src gm --config srgb -w foo` on my desktop,
   - wall time drops from 3.72 -> 2.17 seconds; and
   - CPU time drops from 64.9 -> 27.9 seconds.

So again, close to 2x speedup.
(In exchange, the .pngs of our GMs grow from 57M to 73M.)

Change-Id: I6e2e8c8bda6371e857c8db41ca3119402a9056ae
Reviewed-on: https://skia-review.googlesource.com/16000
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-09 17:54:54 +00:00
Matt Sarett
94fd06f074 Move SkPngEncoder into public API
Bug: 713862
Change-Id: I45068ed39affe41ffe0f29bf42c5ea1d9b0247ba
Reviewed-on: https://skia-review.googlesource.com/15897
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-09 17:46:30 +00:00
Mike Klein
6dfcecad33 Make SkColorFilter::appendStages() not fail.
This makes SkColorFilter::appendStages() first try onAppendStages(),
and if it's unimplemented or fails, fall back to filterSpan4f().

This also makes onAppendStages() private to try to ensure that
appendStages() is now its only caller, ensuring everyone goes
through this fallback path.

The fallback uses the color filter transformed into the dst colorspace
using our new SkColorSpaceXformer... that seem ok Matt?

Change-Id: I4751a6859596fa4f7e844e69ef0d986f005b52c7
Reviewed-on: https://skia-review.googlesource.com/16031
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-09 17:46:29 +00:00
Brian Salomon
2a55c8ef49 Avoid assertion in MSAA rendering buffer about indexed draw with zero index count
Also add some GrMesh::validate() calls earlier to make future debugging easier. Previously this only asserted when the draws executed, now it asserts as soon as the draw is prepared in the op subclass.

Bug: skia:
Change-Id: Ibdd4488b9a9263f0ed337a2c8c6066bc36297001
Reviewed-on: https://skia-review.googlesource.com/16029
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-09 17:41:28 +00:00
Eric Karl
5c77975e4c Add flag to avoid stencil buffers in Skia
Certain systems experience a leak in the GL driver associated with
stencil buffers. Attempts to avoid the leak (while still using stencil
buffers) dind't succeed. This patch adds a GrContextOption
fAvoidStencilBuffers. This disables certain path rendering modes, as
well as stencil based masking/clipping.

Bug: 713854
Change-Id: Ifa6c0f2bd5ee395547bda9165d6c79d197ae8b8b
Reviewed-on: https://skia-review.googlesource.com/15253
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-09 17:41:25 +00:00
Hal Canary
fda4600e41 SkPerlinNoiseShader: handle pathological inputs
BUG=skia:6429
Change-Id: Ifc20c1f480c1396e40ab7fc3a3789aa7c2ae5d85
Reviewed-on: https://skia-review.googlesource.com/15896
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2017-05-09 17:36:27 +00:00
Matt Sarett
8734566151 Convert color to dst (once) in color shaders
BUG=skia:

Change-Id: Ideba16972b82fc26766349c808ae406e5ea23163
Reviewed-on: https://skia-review.googlesource.com/9418
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-09 17:36:23 +00:00
Robert Phillips
c84c030295 Add debug-only helper methods to get #ops & #clips per opList
These are being/will be used to determine the correct amout of memory to preallocate for ops & clips in the opLists.

Change-Id: I98ebaec8a6e72a43d97101aca5fbc58264964ebd
Reviewed-on: https://skia-review.googlesource.com/15882
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-05-09 17:31:23 +00:00
Eric Boren
234fc140eb [recipes] Remove inputs to BundleRecipes task
This should enable deduplication.

Bug: skia:
Change-Id: I2be98f648acd666c420885f08377c256f9102a8f
Reviewed-on: https://skia-review.googlesource.com/14651
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2017-05-09 17:31:22 +00:00
Robert Phillips
6410d29e11 Remove 'fDrawFace' from GrPipeline
This will, hopefully, unblock the roll.

Change-Id: I2e33ccca7161334cdecd881e2699ae0c61ba2a31
Reviewed-on: https://skia-review.googlesource.com/16101
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-05-09 12:31:37 +00:00
Brian Osman
d2da87d0b8 Forward getGrContext in color space xform canvas
Bug: chromium:719664
Change-Id: I7477c1eb0479d5305233dc6a643280d88029bd17
Reviewed-on: https://skia-review.googlesource.com/15888
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-09 03:52:04 +00:00
Mike Reed
7f1d020bbf remove (possibly slow) call to refEncoded in getDeferredTextureImageData
- explicitly reject already-texture-backed and picture-backed

Needed to add a virtual to image_base and generator to distinguish
generators that can (or cannot) natively "generate" on the gpu (e.g. pictures)
Bug: 646089
Change-Id: I3aea22f89b31009ecbb3bd50d88512e6532f0a0f

Change-Id: I3aea22f89b31009ecbb3bd50d88512e6532f0a0f
Reviewed-on: https://skia-review.googlesource.com/15765
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-09 03:52:03 +00:00
Herb Derby
090fbf86cf Add radial gradient stage.
Change-Id: Ie1f9640f5149f21bd8b3b864ff8b176232e1b0a9
Reviewed-on: https://skia-review.googlesource.com/15461
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2017-05-09 03:46:57 +00:00
recipe-roller
599bf5831a Roll recipe dependencies (trivial).
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).


More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
build:
  https://crrev.com/59b248f278e4828bbb0a8d8685975856a7f60509 Stop manually adding webkit_layout_tests if it's already configured src-side. (mcgreevy@chromium.org)
  https://crrev.com/ff38188006831a2f281b68c091a0c02f3fd51ec1 Migrate remaining chromium configs from depot_tools (machenbach@chromium.org)
  https://crrev.com/20950290930a4e7e2fb51f627b0066e883eefb3c Refactoring: rename obsolete v8 config (machenbach@chromium.org)
  https://crrev.com/4ac4debb7b303e5ce213acee4d0d6777299121be remote_run: Bump Kitchen, add LogDog tags. (dnj@chromium.org)
  https://crrev.com/f65b85259d62281f29e37ae28b002f6a98a486d8 Revert Kitchen bump. (dnj@chromium.org)
  https://crrev.com/577ed8c48dcad41653d0559a119abbb84f461afe remote_run: Decouple canary from Kitchen. (dnj@chromium.org)
  https://crrev.com/fa6566763ff505e21cb7a012ae31b363dc08aad6 Promote Win32 ASan to the main waterfall and remove Win SyzyASan. (ehmaldonado@chromium.org)
  https://crrev.com/671dc2edd993a46cb4d34621ed5e4c01b269d3a8 Enforce strict coverage for syzygy recipe module (phajdan.jr@chromium.org)
depot_tools:
  https://crrev.com/e39a9a46be39aac5fad2d66cf11ccdd6f8b9f081 Migrate remaining chromium configs to build repo (machenbach@chromium.org)
  https://crrev.com/b4a79690367881c427c9c5adf614823a01fc9990 Add back helper method still used in build repo (machenbach@chromium.org)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I0e5b52a9dac9408276d4adb021a20b1a6ec4c524
Reviewed-on: https://skia-review.googlesource.com/15883
Reviewed-by: Recipe Roller <recipe-roller@chromium.org>
Commit-Queue: Recipe Roller <recipe-roller@chromium.org>
2017-05-09 03:46:56 +00:00
Greg Daniel
8606cf836e Implement disconnect function for GrVkGpu
Apparently this was not added to Vk when it was added to GL. It may be
the cause of a flutter error they are seeing.
Bug: skia:
Change-Id: I4d4e9d1817b308b6c4f01e83f712eb3437e2ad71
Reviewed-on: https://skia-review.googlesource.com/15887
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-05-09 03:41:52 +00:00
Ethan Nicholas
0c9d13b97a Minor sksl parser cleanup
This adds a new method "checkNext" which is essentially a conditional
nextToken(). This allows for some simplification of the parser code,
but has no other effect.

Bug: skia:
Change-Id: I4e08fd5f2c69cbcb4c31fd936b3a65dc50347191
Reviewed-on: https://skia-review.googlesource.com/15881
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-05-09 03:41:51 +00:00
Mike Klein
892af1ec7b add a guide to contributing to SkJumper
Change-Id: Icd40cf5eff3d2156a3ca00d7950059d5b77f48bf
Reviewed-on: https://skia-review.googlesource.com/15890
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-08 23:40:14 +00:00
Brian Salomon
449d78f5a8 Revert "Added SkImage::MakeCrossContextFromEncoded"
This reverts commit 83b1b3db36.

Reason for revert: unit test failing and asan leaks

Original change's description:
> Added SkImage::MakeCrossContextFromEncoded
> 
> Designed for Flutter's threading architecture, with
> an eye to being useful to other clients. Under the
> hood, uses a new image generator class to lazily wrap
> a texture for multiple GrContexts.
> 
> Bug: skia:
> Change-Id: I6c37b12c8ab5bce94b91190e5f0beb91d31ae81b
> Reviewed-on: https://skia-review.googlesource.com/14180
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I1f0bf580aa0ea2d132e18b64ff610ddac9d073a7
Reviewed-on: https://skia-review.googlesource.com/15892
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-08 20:46:26 +00:00
Ethan Nicholas
823bdd96ef fixed InstanceProcessor SkSL code
Bug: skia:5935
Change-Id: I9ca0e8a7bd30886d8240e338eefbfab368935ac5
Reviewed-on: https://skia-review.googlesource.com/15627
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-05-08 20:07:35 +00:00
Mike Klein
d1835d7491 "can we?" -> "do we want to?" for SkRasterPipelineBlitter
There has been a supported() function in SkRasterPipelineBlitter.cpp for
a long time that's becoming increasingly misnamed.  That blitter ought
to be able to handle all destination formats.

This CL moves that logic outside to the creator of the blitter, changing
it from "can we handle this format?" to "do we want to use this blitter
for this format?".

In other CLs I'm working to make creating a pipeline blitter never fail.

Change-Id: Ie59fb8ec6e63d215d1baef439e464e8f0ab3ae4d
Reviewed-on: https://skia-review.googlesource.com/15842
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-08 20:05:44 +00:00
Brian Osman
83b1b3db36 Added SkImage::MakeCrossContextFromEncoded
Designed for Flutter's threading architecture, with
an eye to being useful to other clients. Under the
hood, uses a new image generator class to lazily wrap
a texture for multiple GrContexts.

Bug: skia:
Change-Id: I6c37b12c8ab5bce94b91190e5f0beb91d31ae81b
Reviewed-on: https://skia-review.googlesource.com/14180
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-08 19:56:27 +00:00
UpdateSKPs
aef837a542 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=update-skps@skia.org
NO_MERGE_BUILDS

Change-Id: I8919465322d3621689bcab4bb577b42b9fd736d7
Reviewed-on: https://skia-review.googlesource.com/15920
Reviewed-by: update-skps <update-skps@skia.org>
Commit-Queue: update-skps <update-skps@skia.org>
2017-05-08 19:36:39 +00:00
Hal Canary
9e1469657e SkAdvancedTypefaceMetrics: pack fields better
64-bit pointers: 88 -> 80 bytes
    32-bit pointers: 68 -> 64 bytes

Change-Id: I2d6e186d15ad84a3b23bf8f6c816eaf482c3bdd5
Reviewed-on: https://skia-review.googlesource.com/15878
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-05-08 18:58:58 +00:00
Mike Klein
be25600e9e fix commented-out gaussian
The original was

  static inline float eval_gaussian(float x) {
      float factor = 1 - x;
      return sk_float_exp(-factor * factor * 4) - 0.018f;
  }

Change-Id: I0590f9b4b41870a0145a4fb7aff5ce3fa4d4e412
Reviewed-on: https://skia-review.googlesource.com/15781
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-08 18:53:58 +00:00
Jim Van Verth
e308a122ef Remove height functor for shadows and replace with plane equation params
Change-Id: I948eceb2c58dc50468993dba54c209f18e440e48
Reviewed-on: https://skia-review.googlesource.com/15873
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-05-08 18:42:48 +00:00
Chris Dalton
6f24180a99 vk: don't re-check the primitive type for each batch of a mesh
Bug: skia:
Change-Id: I00561d0a2d6296924ef0d8ee25fc7215832338d8
Reviewed-on: https://skia-review.googlesource.com/15832
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-05-08 18:27:47 +00:00
Robert Phillips
b37208f11a Revert "Revert "Re-enable deferred proxies in Chrome""
This reverts commit 05814de6ba.

Reason for revert: Chrome layout test suppressions have landed

Original change's description:
> Revert "Re-enable deferred proxies in Chrome"
> 
> This reverts commit 555c49c347.
> 
> Reason for revert: layout tests
> 
> Original change's description:
> > Re-enable deferred proxies in Chrome
> > 
> > Now that https://skia-review.googlesource.com/c/14605/ (Allow TextureSamplers to have null GrTexture pointer) has landed we should be able to re-enable deferred proxies in Chrome.
> > 
> > Bug: 715488
> > Change-Id: Ibd38e5ddf0558b94f09e29f17837e6abfd22fa34
> > Reviewed-on: https://skia-review.googlesource.com/15252
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> > 
> 
> TBR=bsalomon@google.com,robertphillips@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: Ie90e64a2e4d5efc4b6909a04f8a862dd3a708d97
> Reviewed-on: https://skia-review.googlesource.com/15809
> Reviewed-by: Robert Phillips <robertphillips@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: I957e8e59af2b2f441c75bae2eda4dcd5ed82b34d
Reviewed-on: https://skia-review.googlesource.com/15876
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-05-08 18:10:02 +00:00
Robert Phillips
49081d13ba Expand GrTextureProxy to handle highestFilterMode
Once TextureProxies aren't instantiated in the TextureSamplers, the they will need to be able to supply this information.

split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler))
Change-Id: I66555c0746131f565862f7a30d54ff1d458d2062
Reviewed-on: https://skia-review.googlesource.com/15819
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-08 18:07:07 +00:00
Florin Malita
26368c3300 Minimize computeTotalInverse()'s inputs
The helper doesn't need a full context rec - it only looks at the CTM
and external local matrix.  Pass these explicitly instead.
Change-Id: I6a5884f65cd383c2df0e8d83c9086789bd96f345
Reviewed-on: https://skia-review.googlesource.com/15870
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-08 18:04:57 +00:00
Chris Dalton
8e45b4f3a3 GL: track enabled vertex arrays as a count rather than a mask
Bug: skia:
Change-Id: I63e70ab844a7e04df20165aba025b963efcafa9e
Reviewed-on: https://skia-review.googlesource.com/15630
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-05-08 17:36:34 +00:00