Commit Graph

46146 Commits

Author SHA1 Message Date
Mike Reed
d58b643f10 undo SkMatrix() cast -- must be done by sksl machine
Change-Id: Iec6ac37117470237873ad02b6dd471a4bd216d97
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264861
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-16 23:08:01 +00:00
Greg Daniel
9a48bebe6a Remove GrPixelConfig from validateSurfaceParams
This wasn't even used...

Bug: skia:6718
Change-Id: I6543fd11b1f0d9136088fda8c6962aebc16ae5cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264858
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-01-16 23:02:32 +00:00
Greg Daniel
3155f7fc0d Pass in a GrColorType into our Copy call.
This allows us to remove looking at the config to infer a color type when
setting up a Surface/RenderTargetContext for the copy.

Bug: skia:6718
Change-Id: I75b63480a84558c96b5eeb248cc6165f96b2a243
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264563
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-01-16 22:55:32 +00:00
Mike Klein
e3193ad4e1 little debug/profiling tool cleanups
- Can convert raw code to dylib in place.
- Can track one fewer pointer for JIT code: no need
  for both in-memory and dylib JITs at the same time.
- Remove disused fOriginalProgram.
- Split Program::eval/interpret to make profiles clearer.

Change-Id: I66d64a68016f1d1d7d19d5002927e9e277970612
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264816
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-01-16 22:54:11 +00:00
Ben Wagner
56a48bb1aa Avoid BOT/EOT setting in HarfBuzz.
Unlike many users of HarfBuzz, the Skia shaper sets HB_BUFFER_FLAG_BOT
and HB_BUFFER_FLAG_EOT flags to inform HarfBuzz that the full context
contains the beginning and end of the paragraph so that it can treat the
beginning and end of the context specially. In reality, the EOT flag
currently does nothing and the BOT flag only has the effect of adding a
dotted circle (if the font provides it) if the first codepoint in the text
and context is a unicode mark. This behavior is generally unwanted, so
just remove it with a note to revisit this decision should HarfBuzz ever
change the effect of these flags.

Bug: skia:9618
Change-Id: I6cdf86ff3499e1321b1212d63192a4a9c5847e39
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264686
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-01-16 22:48:16 +00:00
Florin Malita
d5c42c8c03 [skottie] Refactor property animators
Currently, property animators use lambda captures (std::function<>) to push
values to adapters and then to the scene graph.  Some downsides:

  * complex lambda captures are expensive in terms of object code size
  * adapters with multiple animated properties don't synchronize/quiesce: each individual property tick triggers a SG
    synchronization, possibly with inconsistent state (as animator running
    order is unspecified)
  * there is no enforced scoping, resulting in fragile constructs when SG
    fragments are discarded

This CL introduces a simplified and more robust animator pattern:

  * property animators are scoped to explicit containers
  * instead of capturing arbitrary value functors, animators only capture
    a pointer to the target value

Some implementation details:

  * keyframe/interpolation logic is pretty much unchanged (just relocated)
  * introduced AnimatablePropertyContainer - a base class for animatable
    adapters
  * legacy binding functions are refactored based on the new mechanism
    (they now/transitionally inject adapter objects)
  * converted a handful of effects, to exercise trivial refactoring patterns
  * converted the text animator goo, to exercise non-trivial refactoring:
    - detecting value changes is now trickier (no more lambda magic)
    - value adjustments must be hoisted into adapter logic (no more lambda magic)
    - all dependent animated values (selectors, etc) must be scoped to the
      text adapter to avoid lifetime issues

TBR=
Change-Id: Ia5821982f251de0de58fd3f87812219ff7fcc726
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263938
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2020-01-16 22:43:12 +00:00
Herb Derby
a8fa49016c Isolate updating grTextStrike
I'm isolating this code into a single routine, so I can change it
over to using a bulk API from the strike. The goal is to remove
all uses of bulk metrics and images.

Change-Id: I8c1c9a4e619962c8e35084c026a4c4553fbeb577
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264837
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-01-16 22:43:11 +00:00
Chris Dalton
84c8787702 Add a --scale flag to skpbench
Change-Id: Idd7698b59e09bdcc688ae3601d9ec343c37592d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264881
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-01-16 22:29:31 +00:00
Mike Reed
d4d3b33624 Make converting from 4x4 to 3x3 explicit
Change-Id: I4d190d6831cb517d5e9f22b3f872013367bddc08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264856
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-01-16 22:15:30 +00:00
Brian Salomon
fba4a15b14 Disallow GrTextureDomain::kIgnore_Mode in SkGpuBlurUtils::GaussianBlur.
Use clamp and require a src rect instead.

Precursor to changing over to SkTileMode.

Possible perf regressions until we can incorporate domain optimizations
into effect factories rather than callers.

Make GrRRectBlurRectEffect use approx textures for its input mask
texture.

Change-Id: Id553016133c2fd522b7fa1e9759f176d354aa250
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264838
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-01-16 21:50:37 +00:00
Jim Van Verth
3b9c544bf8 Reland "Reland "Add new method for storing DrawOpAtlas texture index.""
This is a reland of dea2f34f09

Original change's description:
> Reland "Add new method for storing DrawOpAtlas texture index."
> 
> This is a reland of c8b2e61540
> 
> Original change's description:
> > Add new method for storing DrawOpAtlas texture index.
> > 
> > Storing the texture index in the lower bit of each texture coordinate
> > seems to have issues on certain iOS devices. Rather than do that, we
> > use the sign of the texture coordinate to act as our storage bit.
> > To manage encoding 0 we map [0, N] to [-1, -N-1] to represent a bit.
> > 
> > Change-Id: Ic588ee92cf858915a1833cf482d4b23bd11c1000
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263561
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> 
> Change-Id: I901502c3d83ff9727c51ad4447b0cee733257649
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264566
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Change-Id: I000bb74ca57e321084ca2d1d9dc2f0274880c0da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264689
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-01-16 21:50:36 +00:00
Robert Phillips
b0855273ab Add SkImage::CompressionType::kBC1_RGBA8_UNORM support
This is mainly so we can test the compression code on macOS.

Bug: skia:9680
Change-Id: Ie0a2eacfe9100ee4ce4cc94c878d3032d6985832
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264480
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-01-16 21:45:33 +00:00
Chris Dalton
b53bdf16aa Fix single-pass tessellator wedges
Change-Id: I5d7f4e2c0c3884e84633695967e6c4ed7c480d80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264819
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-01-16 21:45:32 +00:00
Michael Ludwig
1321a3d1e2 Re-enable QCOM_tiled_rendering, but check for gl functions
This enables tiled rendering when the extension is
reported AND the "optional" start and end tiling
gl functions were found.

Hopefully this will correct the hard crashes on the
Pixel 2XL waterfall bots, while still properly disabling
tiled rendering for the devices found in the Flutter bugs:

Bug: flutter:47164, flutter:47804
Change-Id: Ia96a89053305378d434304b7b4fbc0f5e49cd97e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264695
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-01-16 21:36:16 +00:00
Mike Klein
b147aceed7 DCI-P3 -> Display P3 in Skia
This keeps an alias so code keeps building.

Bug: skia:9792
Change-Id: If8575468d929d2ca28bc2f9e82de27291fb19aa1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264691
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-16 21:24:16 +00:00
Herb Derby
7b186101c3 Make glyph paths calculation positions from original data
The CTM of the path did not include the translate for the
origin. Directly transform outlines from original position instead of positions
relative to the initialOrigin. This allows the CTM to have the drawOrigin
translation, and the glyphMatrix to have the glyph origin translation.

Change-Id: I5b1595b2a8358f054f4cacd3e48fac78712c6980
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264681
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-01-16 20:36:57 +00:00
Mike Reed
c43f2a0898 mark all exerimental (3d) apis as such
Bug: skia:9768
Change-Id: I10d8d3507df15ad45d827d2210d5bf2250ac1aaf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264778
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-16 20:25:40 +00:00
Mike Klein
ea4459d6f8 add new debug/profiling mechanism
Dump the program code, link it into a dynamic library,
then dlopen() / dlsym() it to get the entry point.

This makes profiling in Instruments work,
and probably also makes gdb work better.

This is quite slow so I've made it opt-in,
opting only nanobench in for now.

$ ninja -C out nanobench
$ instruments -t "Time Profiler" out/nanobench --config 8888 -m bitmap_RGBA_8888_A_scale_bilerp --skvm
~~> https://screenshot.googleplex.com/nw1L83qjqV6
~~> https://screenshot.googleplex.com/49HSo6Xpzcs

Change-Id: I9f91c675149178021a7a05030541a5965afbbcb5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264748
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-01-16 19:59:54 +00:00
Mike Klein
9f64f4c377 purge all old debug hooks
I'm thinking of maybe starting fresh, and it'll help to have all this
out of my face.  We'll always have Git.

Change-Id: I838f2fc33e793cfb4a73655d74e9e990ca3be1fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264747
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-01-16 19:59:54 +00:00
Mike Reed
b18e74dcbd Expose camera matrix in SkCanvas
3 new getters:
- localToWorld
- localToCamera
- localToDevice (same as total-matrix)

The current tracking minimizes overhead, by using a computed inverse to
produce the localToWorld/Camera. This can be change as needed in the
future (more precision, but more memory/overhead), but for now is
sufficient to try out the new APIs.

Change-Id: I85440318f36dca935124b782e110fe9c0152ae7a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264648
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-01-16 19:35:40 +00:00
Chris Dalton
40a1cee16f Rewrite tessellation wedge generation to be done in a single pass
Change-Id: I66a9e1dff1b3d877012b38804cfb9d13f2b65f2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264579
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-01-16 18:45:35 +00:00
Hal Canary
2cd5d43f02 [minor] docs/examples: cleanup
Change-Id: I2dfec6de7c3ccd3f6b8ed63a9235c527fc648a1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264647
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2020-01-16 17:47:15 +00:00
Mike Klein
99e002f502 Revert "Simplify VertexRegenerator GrStrikeCache handling"
This reverts commit 59d529cafa.

Reason for revert: use-after-frees, *SAN bots

Original change's description:
> Simplify VertexRegenerator GrStrikeCache handling
> 
> The SubRun has access to the GrStrikeCache pointer, there is
> no need to pass it around the VertexRegenerator.
> 
> Change-Id: I867b1b29b29e595f92ad57505dcd27dd0f6b726f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264649
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,herb@google.com

Change-Id: I7de7841fdd1efb5df845613bd0116fbaf12d1c49
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264756
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-16 16:45:22 +00:00
Herb Derby
59d529cafa Simplify VertexRegenerator GrStrikeCache handling
The SubRun has access to the GrStrikeCache pointer, there is
no need to pass it around the VertexRegenerator.

Change-Id: I867b1b29b29e595f92ad57505dcd27dd0f6b726f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264649
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-01-16 16:09:22 +00:00
Herb Derby
62b12feef7 Handle color and translation outside of VertexRegenerator
Change-Id: Ia06186328bd6fdc12f42355ec8fea9fc82ff51a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264425
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-01-16 16:04:22 +00:00
Mike Reed
c4b8eefe56 move SkV3 into header
Change-Id: I20284b415bbfe5ecc15fe9fe47dcbb65850d4368
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264682
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-16 11:34:32 +00:00
skia-autoroll
2900040bc4 Roll third_party/externals/swiftshader 146e16f68fdc..5fc197dc7669 (10 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/146e16f68fdc..5fc197dc7669

git log 146e16f68fdc..5fc197dc7669 --date=short --first-parent --format='%ad %ae %s'
2020-01-15 jonahr@google.com Disable MSVC warning 4065
2020-01-15 bclayton@google.com Vulkan: Disable SPIR-V preprocessing when debugging
2020-01-15 capn@google.com Produce less debug info in Kokoro builds
2020-01-15 capn@google.com Refactor binary group operations
2020-01-15 capn@google.com Replace positive/negative_inf() with infinity()
2020-01-15 bclayton@google.com SpirvShader: Stub OpenCL.DebugInfo.100
2020-01-15 bclayton@google.com System/Types.hpp: Make vec(T replicate) constexpr
2020-01-15 bclayton@google.com SpirvShaderDebugger: Add flag for printing opcodes
2020-01-15 bclayton@google.com SpirvShader: 2-way imported extensions lookup
2020-01-15 bclayton@google.com .vscode: Add spirv-tools-ext to include path

Created with:
  gclient setdep -r third_party/externals/swiftshader@5fc197dc7669

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC mtklein@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: mtklein@google.com
Change-Id: Ib7ec099590c04ce46b94f6299c894508095f677f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264717
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-16 04:56:07 +00:00
skia-autoroll
bffef27297 Roll third_party/externals/angle2 86f730971751..a7b91502cd7f (2 commits)
86f7309717..a7b91502cd

git log 86f730971751..a7b91502cd7f --date=short --first-parent --format='%ad %ae %s'
2020-01-15 ianelliott@google.com Vulkan: Updated expectations after recent fixes
2020-01-15 artyom@fb.com Fixing OVR_multiview and OVR_multiview2 issues

Created with:
  gclient setdep -r third_party/externals/angle2@a7b91502cd7f

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC mtklein@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
Tbr: mtklein@google.com
Change-Id: I2128ff2e6aa284d2fe628b47310529570537c46b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264718
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-16 04:51:11 +00:00
skia-autoroll
0764e73894 Roll ../src b83f9414fec4..98818e570034 (437 commits)
b83f9414fe..98818e5700


Created with:
  gclient setdep -r ../src@98818e5700

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC mtklein@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Bug: None
Tbr: mtklein@google.com
Change-Id: I550c14f8b593dbf1dd3cf247f83ee04b00a62e05
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264716
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-16 04:51:01 +00:00
Jim Van Verth
7edb0eb8a4 Revert "Reland "Add new method for storing DrawOpAtlas texture index.""
This reverts commit dea2f34f09.

Reason for revert: Seeing unexplained glitches on Pixel3 and Pixel4 in fontcache-mt.

Original change's description:
> Reland "Add new method for storing DrawOpAtlas texture index."
> 
> This is a reland of c8b2e61540
> 
> Original change's description:
> > Add new method for storing DrawOpAtlas texture index.
> > 
> > Storing the texture index in the lower bit of each texture coordinate
> > seems to have issues on certain iOS devices. Rather than do that, we
> > use the sign of the texture coordinate to act as our storage bit.
> > To manage encoding 0 we map [0, N] to [-1, -N-1] to represent a bit.
> > 
> > Change-Id: Ic588ee92cf858915a1833cf482d4b23bd11c1000
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263561
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> 
> Change-Id: I901502c3d83ff9727c51ad4447b0cee733257649
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264566
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

TBR=jvanverth@google.com,brianosman@google.com

Change-Id: I8e5cbd61ba768e5b4b6df66189239e077b7327c4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264653
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-01-15 21:57:09 +00:00
Julia Lavrova
9bd8351ef3 RTL Paragraph + all it causes
Change-Id: Ia8711bf8a002af7ca9ae603cdd9a109c8af86360
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264640
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-01-15 21:25:16 +00:00
Herb Derby
23f29761a6 Redo glyph quad regeneration
Lift all the invariants for the loop into the onPrepare loops
from regenerate and updateTextureCoordinatesMaybeStrike.

* Simplify looping over geos and subRuns
* remove VertexRegenerator::Result
* remove fCurrGlyph

Change-Id: I75445c6d7113207a3b1544154b605af2c4cfcb31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263778
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-01-15 20:22:24 +00:00
Mike Klein
7dd6098747 fix SkMatrixConvolutionImageFilter unpremul
Caveat... I have no idea what this filter does.  I just looked at some
code that appeared to be unpremultiplying in a dodgy way and rewrote it
to be simpler.  This fixes the GM on Mac.

PS2 unpremultiplies in place, and leaves the bitmap tagged premul.
This feels funny, but I think it's consistent with the old behavior.
I want to see if this is why the layout tests fail.

PS3 reverts an unimportant diff.

Bug: skia:9784
Change-Id: Id5ddbc6424833706d21f279f6adfce71f6d9f9e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264577
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-01-15 20:12:14 +00:00
recipe-roller
3c9d77622c 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.
depot_tools:
  https://crrev.com/e9730d75a00548a22e4392567243969d85c02dd4 subprocess2: Ensure environment keys and values are strings on Python 3 (raul@tambre.ee)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I8fc124763be57b9182d299986ca3700ef88ab9ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264656
Reviewed-by: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
2020-01-15 20:07:15 +00:00
Chris Dalton
0f6bb8a62f Add a temporary job to test GrGpuTessellationPathRenderer
Change-Id: Id55d47c97102367face69bfaa32d82e7db4ce2e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264500
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-01-15 19:30:55 +00:00
Mike Reed
ee0a03a3f3 experimental: saveCamera()
bug: skia:9768
Change-Id: I84b8f32933023d3376b51c2b93cc843863008828
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264476
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-01-15 19:27:34 +00:00
Hal Canary
8800042f69 docs/examples: REG_FIDDLE_ANIMATED
I also added the `get_examples.py` script which pulls down new fiddles.

Change-Id: I953e461685a4d118ac4e425453e47d665a485aa2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264570
Commit-Queue: Hal Canary <halcanary@skia.org>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2020-01-15 19:02:25 +00:00
Julia Lavrova
4cf1874981 Fixing the cache
Change-Id: Ief6ce50095c73498307748d30608100c10790746
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264399
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-01-15 16:58:14 +00:00
Jim Van Verth
dea2f34f09 Reland "Add new method for storing DrawOpAtlas texture index."
This is a reland of c8b2e61540

Original change's description:
> Add new method for storing DrawOpAtlas texture index.
> 
> Storing the texture index in the lower bit of each texture coordinate
> seems to have issues on certain iOS devices. Rather than do that, we
> use the sign of the texture coordinate to act as our storage bit.
> To manage encoding 0 we map [0, N] to [-1, -N-1] to represent a bit.
> 
> Change-Id: Ic588ee92cf858915a1833cf482d4b23bd11c1000
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263561
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Change-Id: I901502c3d83ff9727c51ad4447b0cee733257649
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264566
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-01-15 16:21:14 +00:00
Herb Derby
435adfe71a Simplify translation calculation for mustRegenerate
Change-Id: Ie3545aae753e5ecb45f17c6fefa778c38f9507fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264419
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-01-15 15:49:54 +00:00
Mike Klein
d1b347ee05 add a note about P3 gamuts
Change-Id: I50322fff140f962a9b7cffb60cdef68e25715a5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264576
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-01-15 15:15:44 +00:00
Greg Daniel
c71c796f3a Remove various uses of GrPixelConfig from GrSurfaceProxy.
Bug: skia:6718
Change-Id: I96e15f92a7a8db2b2a1445baa83c67dd25cc2a96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264423
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-01-15 14:49:24 +00:00
Bryce Thomas
1fa54044ef rm CanvasKit.HEAPU8.buffer caching (fix UAF bug).
Cached references to the WASM heap buffer are invalid following memory growth:
https://github.com/emscripten-core/emscripten/issues/6747#issuecomment-400081465.
This change replaces references to the cached CanvasKit.buffer with direct
references to CanvasKit.HEAPU8.buffer.  The symptom of this bug is a Javascript
error thrown in the Chrome console: "Uncaught TypeError: Cannot perform
Construct on a neutered ArrayBuffer", causing the operation in question to fail.

Bug: NONE
Change-Id: I27462e80db1d33e0e77ee7295b25039c9036d2e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264477
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-15 14:48:36 +00:00
Kevin Lubick
a4f218dd68 Add support for reading .skp files in CanvasKit.
Bug: skia:9760
Change-Id: Ifecd819a0e4b6b8f8818ce593afd546e10c36df3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262159
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-01-15 14:46:37 +00:00
Adlai Holler
bd1466cd4e Add a new gm for large kernel matrix convolution
As a precursor to 263495, we need test coverage for this.

According to Skia Gold, the current matrix convolution implementation test is showing very different results on CPU & GPU. On the CPU, the last test case turns blue! See closest negative here: https://gold.skia.org/search?fdiffmax=-1&fref=false&frgbamax=255&frgbamin=0&head=true&include=false&limit=50&master=false&match=name&metric=combined&neg=true&new_clstore=true&offset=0&pos=true&query=cpu_or_gpu%3DGPU%26name%3Dmatrixconvolution_color%26source_type%3Dgm&sort=desc&unt=true

Change-Id: I4569e0fd0ec953dc75dbb99516d69741514efb60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264517
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-01-15 14:44:54 +00:00
skia-autoroll
7655168e68 Roll third_party/externals/angle2 8b3a0fa81050..86f730971751 (12 commits)
8b3a0fa810..86f7309717

git log 8b3a0fa81050..86f730971751 --date=short --first-parent --format='%ad %ae %s'
2020-01-14 kbr@chromium.org Upstream support for iOS Simulator.
2020-01-14 syoussefi@chromium.org Add a test to expose translator bug w.r.t short circuiting
2020-01-14 syoussefi@chromium.org Vulkan: Remove row->col major shader transformation
2020-01-14 jie.a.chen@intel.com Add P010 stream test
2020-01-14 jmadill@chromium.org Invoke the standalone test harness runner.
2020-01-14 jmadill@chromium.org Fix test harness running disabled tests.
2020-01-14 jmadill@chromium.org Fix and improve UWP build.
2020-01-14 syoussefi@chromium.org Vulkan: Add test that exposes sampler refactor bug
2020-01-14 jmadill@chromium.org GN: Move util build code into util/BUILD.gn.
2020-01-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src b96d6528883e..834baaf8b227 (1 commits)
2020-01-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader b0ca2a89e255..488d35ac0b1c (9 commits)
2020-01-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src 18b3b94567a9..8013d477aeac (1 commits)

Created with:
  gclient setdep -r third_party/externals/angle2@86f730971751

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC mtklein@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
Tbr: mtklein@google.com
Change-Id: Ie61e749647b757884bdc3c4ad181666f91a5836d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264511
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-15 04:40:42 +00:00
skia-autoroll
0a9fffb2d5 Roll ../src e2015449184d..b83f9414fec4 (758 commits)
e201544918..b83f9414fe


Created with:
  gclient setdep -r ../src@b83f9414fe

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/chromium-skia-autoroll
Please CC mtklein@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Bug: None
Tbr: mtklein@google.com
Change-Id: Ibb2c8c43578b283f8a8d3cb84c993483607fd0a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264512
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-15 04:38:42 +00:00
skia-autoroll
9d282e5537 Roll third_party/externals/swiftshader f6d3cbb28303..146e16f68fdc (18 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/f6d3cbb28303..146e16f68fdc

git log f6d3cbb28303..146e16f68fdc --date=short --first-parent --format='%ad %ae %s'
2020-01-14 bclayton@google.com C++14: Use enum class builtin hashing
2020-01-14 bclayton@google.com C++14: Use std::enable_if_t instead of our own
2020-01-14 chrisforbes@google.com Add initial stub implementation of AHB
2020-01-13 bclayton@google.com Vulkan/Debug: Fix `DAP_LOG` macro
2020-01-13 bclayton@google.com CMakeLists.txt: Copy OpenCLDebugInfo100.h to new dir
2020-01-13 bclayton@google.com .vscode: Define ENABLE_VK_DEBUGGER
2020-01-13 bclayton@google.com Regres: Roll dEQP 1.1.6 forward
2020-01-13 capn@google.com Rename NonNormalized to Unnormalized
2020-01-13 capn@google.com Disable the GL_NV_framebuffer_blit extension
2020-01-13 capn@google.com Disable the GL_APPLE_texture_format_BGRA8888 extension
2020-01-13 capn@google.com Allow verbal bug IDs
2020-01-13 capn@google.com Validate the bug ID format in Kokoro presubmit
2020-01-11 bclayton@google.com Pipeline: Implement the SpirvShader debugger.
2020-01-11 swiftshader.regress@gmail.com Regres: Update test lists @ 0f8f361a
2020-01-10 swiftshader.regress@gmail.com Regres: Update test lists @ 110236f3
2020-01-10 sugoi@google.com Removed a few parentheses for slightly better clang formatting
2020-01-10 sugoi@google.com A2R10G10B10 Support
2020-01-10 ianelliott@google.com Change sampledImageIntegerSampleCounts to sampleCounts

Created with:
  gclient setdep -r third_party/externals/swiftshader@146e16f68fdc

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC mtklein@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: mtklein@google.com
Change-Id: Idad9a090e16a4d41bd89347444b114348e7c334e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264510
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-01-15 04:33:02 +00:00
Brian Salomon
9d91492203 Revert "Make SkGpuBlurUtils take SkTileMode"
This reverts commit 1817e70938.

Reason for revert: a few bad GMs on a few devices.

Original change's description:
> Make SkGpuBlurUtils take SkTileMode
> 
> This is to get ready for moving all of our texture domain
> implementation into GrTextureEffect.
> 
> This may cause a short term perf regression we might make GrDomainEffect
> with unnecessary shader clamping.
> 
> Change-Id: I04d9c4c6999539cfd35bda07b943c3b7eb224df8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264397
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>

TBR=bsalomon@google.com,michaelludwig@google.com

Change-Id: I5ec44a94e6d8ba62f16a43ea1f01e4471c13bf06
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264430
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-01-15 02:46:08 +00:00
Mike Klein
03d89ef5f8 make sure each sample() call uses the same uniforms
As written each sample() call uses its own uniforms,
which amplifies register pressure immensely, especially
for repeat, mirror, and bicubic.

Change-Id: I13043c4cdea530defe79dbf4b66201f2b2f8c3f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264475
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-15 00:25:58 +00:00