Commit Graph

43848 Commits

Author SHA1 Message Date
Michael Ludwig
9c853fa54a Fix non-zero special-image subsets in magnifier filter
This will let us re-land https://skia-review.googlesource.com/c/skia/+/237127
which makes non-zero subsets much more common. Confirmed that this CL and
the linked CL will now pass the CC unittests that caught the original failure.

Change-Id: Ic0393a574b2c19d92421a5deece81ab2ed70fc97
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237899
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-08-28 20:35:29 +00:00
Michael Ludwig
6c580f3cc1 Revert "Fix flutter roll"
This reverts commit 7be971fa3a.

Reason for revert: Flutter has been updated to new API, these patches
should not be necessary.

Original change's description:
> Fix flutter roll
>
> Flutter extends from the SkCanvasVirtualEnforcer, so the prior change
> to onDrawEdgeAAQuad to accept an SkColor4f instead of SkColor broke
> their build, the flutter roller, and--transitively--the G3 roller.
>
> This keeps the old onDrawEdgeAAQuad around as a no-op so their
> canvas_spy class can extend from it.
>
> TBR=bsalomon@google.com, stani@google.com
>
> Bug: skia:
> Change-Id: I3798ec60a21e90c3d3f5d59f19f7dbe62e37cbec
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237590
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

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

Change-Id: I2946043dbddfdfc8c853e68853a8a349db0b5ab1
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237901
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-08-28 19:50:56 +00:00
Leon Scroggins III
0e68f44212 SkAnimatedImage: Update HEIF duration
Bug: 139815242
Test: Manual

HEIF does not know the correct duration for a frame until it has been
decoded. Update the frame time after decoding.

Change-Id: I6c4d1f27ea927b27d4c435e6aca94d57126e1146
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237876
Reviewed-by: Chong Zhang <chz@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2019-08-28 19:49:06 +00:00
Jim Van Verth
066ceb15b6 Implement fences and semaphores for Metal.
GrFence is implemented by a single MTLSharedEvent where we increase the
value with each new invocation. GrSemaphore uses a MTLEvent (the
assumption here is that we are signaling and waiting on the same device)
with an associated value that defaults to 1. For generating a large
number of GrSemaphores at once it should be possible to use the same
MTLEvent but with different assigned values.

Bug: skia:8243
Change-Id: Ic7de2d9d295fbe51e67bc7c3c4354257cb0774d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233416
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-08-28 19:38:56 +00:00
Brian Osman
63655b5a21 Pin the GLSL version to be no larger than the GL version
Some Adreno 308 devices have a driver bug where the GLSL version is
higher than the GL version, and attempting to use shaders with that
version triggers an error.

Change-Id: I5c8996e9771983e547ec75e57b04e2584507727f
Bug: https://github.com/flutter/flutter/issues/36130
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237898
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-08-28 18:37:55 +00:00
Brian Salomon
76556a39ea Alpha8 support cleanup in GrGLCaps.
*Never renderable in ES but always texturable
*glTexStorage2D validity based on GL_EXT_texture_storage extension
*Move workarounds to workaround setup code

Change-Id: Id2b59ed8c65c88fea9e5cb671d34651dfb9b6a11
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237814
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-28 18:26:36 +00:00
recipe-roller
a268dfb74a 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.
recipe_engine:
  https://crrev.com/9ca245a1dc39e1fe957a4c8fb1774b731bef5415 [json] Handle nonexistent JSON placeholder file (olivernewman@google.com)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I1bbfa0594b77dca6af77d98b55a8c5391f03a02f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237916
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>
2019-08-28 17:29:06 +00:00
Ben Wagner
54aa8846e9 Add test for baseline snapping.
Change-Id: I895218ba087d2f04ee92bc6eaaaad780723a9202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237803
Auto-Submit: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-08-28 16:35:55 +00:00
Andy Weiss
ecd03db1e8 Override operator delete for GrCpuBuffer
GrCpuBuffer allocates extra space for a buffer in Make but using sized
delete will then lead to UB as operator delete is not implemented.

This change overrides the delete operator to force the unsized variant
which gets rid of the UB at the cost of not taking advantage of sized
delete. Once P0722R1 is available to safely compute the full size of
the object inside delete, this code can change to use sized delete.

c.f. https://bugs.chromium.org/p/skia/issues/detail?id=6384
and http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0722r1.html

Change-Id: I8f9172c35d17a5acee777d802dfdb25f031868b4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237847
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-08-28 16:25:25 +00:00
Hal Canary
63b4d5880a SkPlainTextEditor/app: cycle typeface with ctrl-0
Change-Id: I0bcf38b0ec75a52df856948a85e5711a68e6585e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237430
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-28 15:55:36 +00:00
Hal Canary
a67523ae67 SkQP: Use SK_GL macro
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP,Test-Debian9-Clang-NUC7i5BNK-CPU-Emulator-x86-devrel-All-Android_SKQP

Change-Id: I9978cb3c2a2dc726a46d0377f84fceb879b73917
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237800
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-28 15:34:15 +00:00
Brian Salomon
b1ade2a426 Fix spirv-tools include path
Change-Id: I7574c8d99f0e68d753e5714731aec57e0b20f327
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237799
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2019-08-28 13:58:25 +00:00
Kevin Lubick
556df5b860 [canvaskit] Fix duplicate gold name
Change-Id: Ic62f44d20ff7ceba111260841d64322d1b6610f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237802
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-08-28 13:56:46 +00:00
Herb Derby
a4c7883c56 Cleanups around fRemoteGlyphStateMap
* Rename fRemoteGlyphStateMap -> fDescTorRemoteStrike
* Move map operations to be local
* Other cleanups

Change-Id: Ia5c4309e849d018903623f70595ae7238ceaec8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237496
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-28 13:56:35 +00:00
skia-recreate-skps
cd3216543d Update Go deps
Change-Id: I55f64eeb98c3f2ce769c4e4eebf553bb7d257c25
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237716
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2019-08-28 05:24:22 +00:00
skia-autoroll
73260e342e Roll third_party/externals/angle2 57ad1e1287dd..886698bc3fdd (7 commits)
57ad1e1287..886698bc3f

git log 57ad1e1287dd..886698bc3fdd --date=short --no-merges --format='%ad %ae %s'
2019-08-27 jmadill@chromium.org Vulkan: Style cleanups to TextureVk.
2019-08-27 jmadill@chromium.org Vulkan: Remove command buffer param from initImage.
2019-08-27 ianelliott@google.com Vulkan: Enable the official GLES1 conformance tests
2019-08-27 geofflang@chromium.org GL: Check for errors around GL calls.
2019-08-27 geofflang@chromium.org Fix a typo in the GL_NUM_REQUESTABLE_EXTENSIONS_ANGLE enum value.
2019-08-27 svaisanen@nvidia.com Remove skipping of several tests on NVIDIA since they are now passing
2019-08-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll ./third_party/spirv-tools/src 1eb89172a82b..15fc19d0912d (1 commits)

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

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 stani@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.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
TBR=stani@google.com
Change-Id: Ifcaa2f3494bb93f663adc8ef46aff65fc929947a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237656
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-08-28 05:22:02 +00:00
skia-autoroll
206ed6f9f3 Roll ../src 31c682b20741..c96d445dc9eb (397 commits)
31c682b207..c96d445dc9


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

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 stani@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.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Bug: None
TBR=stani@google.com
Change-Id: I122145ac9f9591ec3fbe2dc8d7cffa5a31c36dfc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237658
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-08-28 04:45:22 +00:00
skia-autoroll
e36b85f34d Roll third_party/externals/swiftshader 605f863173b6..cde4dd9601ce (9 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/605f863173b6..cde4dd9601ce

git log 605f863173b6..cde4dd9601ce --date=short --no-merges --format='%ad %ae %s'
2019-08-27 bclayton@google.com Device: Migrate Renderer to Yarn
2019-08-27 bclayton@google.com Device: Don't use a global for the cluster count.
2019-08-27 bclayton@google.com Some minor code tidying.
2019-08-27 bclayton@google.com Pipeline: Use Yarn to make compute multi-threaded.
2019-08-27 bclayton@google.com Vulkan: Build a yarn::Scheduler and pass it down to the vk::Queue.
2019-08-27 bclayton@google.com vk::Queue: Lazily construct Renderers
2019-08-27 bclayton@google.com Yarn: Don't zero-initialize data in Pool<T>::Item::construct()
2019-08-27 chrisforbes@google.com Pass draw-to-draw varying state directly to Renderer::draw
2019-08-27 chrisforbes@google.com Do not expose extensions for KHR_shader_draw_parameters and KHR_variable_pointers

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

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 stani@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.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
TBR=stani@google.com
Change-Id: I3e1adee21f0eeeb05798ab2d41e103ad1d285766
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237657
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-08-28 04:37:42 +00:00
Michael Ludwig
7be971fa3a Fix flutter roll
Flutter extends from the SkCanvasVirtualEnforcer, so the prior change
to onDrawEdgeAAQuad to accept an SkColor4f instead of SkColor broke
their build, the flutter roller, and--transitively--the G3 roller.

This keeps the old onDrawEdgeAAQuad around as a no-op so their
canvas_spy class can extend from it.

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

Bug: skia:
Change-Id: I3798ec60a21e90c3d3f5d59f19f7dbe62e37cbec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237590
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-08-28 02:33:22 +00:00
Michael Ludwig
fd849a537a Revert "Combine snapBackImage and snapSpecial"
This reverts commit 45739aa1d8.

Reason for revert: Looks like the magnifier filter doesn't handle subset origins correctly either, not caught by our tests, but does in layout tests.

Original change's description:
> Combine snapBackImage and snapSpecial
> 
> Previously, snapBackImage always made a copy since that is required for
> its use in saveBehind(). Backdrop filters also used snapBackImage because
> it relied on its subset SkIRect argument to avoid using the entire
> layer as input to the backdrop filter. The regular snapSpecial() originally
> did not take a subset at all. The GPU implementations of snapSpecial()
> and snapBackImage() were very similar. This merges them into a single call
> that takes a subset SkIRect and a boolean to control if the copy is required.
> 
> Only saveBehind() requires that the copy is made, due to how it bypasses
> the regular copy-on-write behavior managed by SkCanvas and SkSurface. The
> no-argument saveSpecial() is still provided, but it is defined to just snap
> the bounds of the device.
> 
> Flutter noticed a fairly serious performance regression on iOS that went
> back to this CL: 08b260c27b. It was determined that the only significant change in
> behavior that was active given their minimum working example was switching
> from snapSpecial() to snapBackImage(). Hopefully moving to a snapSpecial that
> takes a subset, but doesn't copy when there is a texture already available
> will restore the performance.
> 
> Bug: skia:9283, https://github.com/flutter/flutter/issues/36352, https://github.com/flutter/flutter/issues/37541, https://github.com/flutter/flutter/issues/36064
> Change-Id: I448f8886347a1e0f4da8f61279744bb9254f7752
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237127
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: I7fd897da8a50b2fc0079e2aed9b6ad4bed6d3879
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9283, https://github.com/flutter/flutter/issues/36352, https://github.com/flutter/flutter/issues/37541, https://github.com/flutter/flutter/issues/36064
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237616
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-08-27 23:56:54 +00:00
Michael Ludwig
a595f86428 Add Color4f variant for DrawEdgeAAQuad
Bug: chromium:795132,chromium:985500
Change-Id: Idbb4d45b29d2c0d0fd54b05b807086ecf0b8cf26
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237492
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-08-27 23:22:32 +00:00
Michael Ludwig
a5fa56e910 Revert "Calculate draw bounds in drawEdgeAAImageSet"
This reverts commit 977b50a7e0.

Reason for revert: Likely broke skia_renderer bots, https://test-results.appspot.com/data/layout_results/linux-rel/177320/vulkan_swiftshader_blink_web_tests%20%28with%20patch%29/layout-test-results/results.html

Original change's description:
> Calculate draw bounds in drawEdgeAAImageSet
> 
> This will allow SkiaRenderer to provide image filters on the SkPaint
> instead of using an explicit saveLayer, where they must calculate the
> draw bounds. Once SkiaRenderer provides filters that way, they will
> automatically take advantage of any implicit layer optimizations we can
> add down the road.
> 
> Bug: skia:9283
> Change-Id: I87adef336a08210d4d015e36c907e893a973947d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237477
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

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

Change-Id: I99d90f7beae89b509c35649dcfcdf392a47b3415
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9283
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237596
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-08-27 22:40:34 +00:00
Florin Malita
511d2c281c [skottie] Disable text baseline snapping
Change-Id: I51ba09c78d200986a3116774f5dfd3a02bb597e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237523
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-27 21:24:21 +00:00
recipe-roller
ddbf4db9cd 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.
recipe_engine:
  https://crrev.com/19c4fbe5a863665b045e2d510b7a368c18c46edb [swarming] Allow customizing test task ids. (mohrr@google.com)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Id90078c6f7c11c0f41f64e51dba6cfb95caf2961
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237520
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>
2019-08-27 21:19:22 +00:00
Michael Ludwig
45739aa1d8 Combine snapBackImage and snapSpecial
Previously, snapBackImage always made a copy since that is required for
its use in saveBehind(). Backdrop filters also used snapBackImage because
it relied on its subset SkIRect argument to avoid using the entire
layer as input to the backdrop filter. The regular snapSpecial() originally
did not take a subset at all. The GPU implementations of snapSpecial()
and snapBackImage() were very similar. This merges them into a single call
that takes a subset SkIRect and a boolean to control if the copy is required.

Only saveBehind() requires that the copy is made, due to how it bypasses
the regular copy-on-write behavior managed by SkCanvas and SkSurface. The
no-argument saveSpecial() is still provided, but it is defined to just snap
the bounds of the device.

Flutter noticed a fairly serious performance regression on iOS that went
back to this CL: 08b260c27b. It was determined that the only significant change in
behavior that was active given their minimum working example was switching
from snapSpecial() to snapBackImage(). Hopefully moving to a snapSpecial that
takes a subset, but doesn't copy when there is a texture already available
will restore the performance.

Bug: skia:9283, https://github.com/flutter/flutter/issues/36352, https://github.com/flutter/flutter/issues/37541, https://github.com/flutter/flutter/issues/36064
Change-Id: I448f8886347a1e0f4da8f61279744bb9254f7752
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237127
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-08-27 21:06:31 +00:00
Stephen White
b288c8dcc8 gn format third_party/dawn/BUILD.gn.
Change-Id: Idf163572eedac0b434fbe49ddb8bd8e5b4ca0adb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237519
Commit-Queue: Stephen White <senorblanco@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-08-27 21:01:20 +00:00
Hal Canary
a0b66fc79d SkPlainTextEditor: from experimental to modules
Change-Id: I8896283ee3a57af926a43f6647e27059d52dd7a8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237146
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-27 20:32:19 +00:00
Herb Derby
81578856e9 Check RemoteStrike pointer is still valid to send
Check to make sure that the RemoteStrike pointer from
RemoteStrikesToSend is still in the RemoteGlyphStateMap
in debug mode.

Change-Id: Id992a5190a161499792247c9f6dd0d46a4552db0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237489
Auto-Submit: Herb Derby <herb@google.com>
Commit-Queue: Khushal Sagar <khushalsagar@chromium.org>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
2019-08-27 20:15:59 +00:00
Ben Wagner
c17de1d2b7 Add a way to disable baseline snapping.
Skia has traditionally snapped horizontal and vertical baslines to
pixels as a kind of baseline hinting. This is a feature which cannot
reliably be implemented from the outside and tends to make static text
better looking by ensuring the baselines are consistent. However, with
animation like scrolling or flying and resizing text the animation
suffers. Allow the user to disable the baseline snapping.

Change-Id: I6ee1c12a07242d10c08ae4b75c73e4e28c860790
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237124
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-08-27 19:54:29 +00:00
Greg Daniel
dcf9ca1820 Have visitProxies take a GrTexutreProxy instead of GrSurfaceProxy.
Change-Id: Ic1508d7909c90298fdb906391f981505c3ed497e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237485
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-27 19:07:27 +00:00
Michael Ludwig
977b50a7e0 Calculate draw bounds in drawEdgeAAImageSet
This will allow SkiaRenderer to provide image filters on the SkPaint
instead of using an explicit saveLayer, where they must calculate the
draw bounds. Once SkiaRenderer provides filters that way, they will
automatically take advantage of any implicit layer optimizations we can
add down the road.

Bug: skia:9283
Change-Id: I87adef336a08210d4d015e36c907e893a973947d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237477
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-08-27 18:35:18 +00:00
Chris Dalton
6aeb8e84df Add renderTasks to the DAG before calling addDependency
This makes sure the dependent task is already in the DAG before a
textureResolveRenderTask calls "addBeforeLast".

Bug: skia:
Change-Id: Ib276d41c386fd3d5a237212d60d7bf67a662e419
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237257
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-08-27 18:24:27 +00:00
Greg Daniel
674ee74e88 Make sure we use clear load op on GrOpsTask as often as possible.
With this change we are also removing the code in the Gr*OpsRenderPass which
will dynamically change the load op for given clear calls. The load is is
set at creation time.

Change-Id: I19f0f37bb38f790b11052953106e0492e6f9fc87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237425
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2019-08-27 17:47:21 +00:00
Michael Ludwig
ea6fb83931 Fix subset errors in blur, matrix, and morphology filters
Encountered these errors previously, but did not recognize their cause
(see negative marked GM_imagemakewithfilter_crop results on gold). They
came up again when working on fixing snapBackImage() to avoid a copy,
which increased the likelihood of an input image with non-zero origin.

These changes fix the matrix convolution and morphology errors in that
GM so that it now matches the non-crop cases. These had been special
because the last row in that GM didn't require calling applyCropRectAndPad,
so it actually processed an image with a non-zero origin.

The blur fix was discovered when evaluating a blur with a sufficiently
large enough sigma that it needed to be decimated over multiple iterations.
In that case, the second iteration uses a new input proxy so it shouldn't
offset the source coordinates any more.

Change-Id: I7d51025140342c93ca798ca0708c8675ab411beb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237125
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-08-27 17:05:47 +00:00
Stephen White
d36dc302b9 Dawn: use Skia's copy of vulkan headers.
Remove use of Dawn's third_party vulkan headers and the BUILD.gn file
it rode in on.

Change-Id: Ibfb6f063cae291445e19a15d42e96279be072376
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237448
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-08-27 17:05:46 +00:00
Stephen White
15d0a26fc4 Add spirv-cross to DEPS.
Extract the appropriate parts of Dawn's third_party BUILD.gn for it, and
put them in their own BUILD.gn.

Change-Id: Iedfc11321ca5366499dfc8a1759d8aa08eb78931
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237442
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-27 16:40:23 +00:00
Stephen White
c445c7d5c8 Dawn: Remove spirv-tools and spirv-headers rules from Dawn build files.
Use Skia's copies in //third_party/externals/ instead.

Change-Id: I9cddb1d1268033fcc6f345b147495820bc1d308b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237439
Commit-Queue: Stephen White <senorblanco@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-27 15:25:21 +00:00
Mike Klein
334a642b20 remove unused sk_sp comparison operators
These unused comparison operators are the only users of
<functional> in SkRefCnt.h, for std::less.  <functional>
is an expensive header to compile, and SkRefCnt.h is popular,
so it helps to cut dependencies like this.

Mostly we just need to add #include <functional> in a few
places that were picking it up via SkRefCnt.h.

In SkPixmapPriv.h, it looked simpler to template the argument,
since everything was inline anyway.

Change-Id: I7c125bb26a04199847357c729a1b178256c6ef8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236942
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-27 14:52:01 +00:00
Michael Ludwig
e2cbd947b7 Fix long line
Change-Id: Ib7796c8a8455bf3454a7982fa9cd7e624160c4e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237126
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-08-27 14:36:01 +00:00
Michael Ludwig
f010089975 Revert "gpu: Update GrGLCaps usage of fTextureRectangle with chromium."
This reverts commit c43ab22a8c.

Reason for revert: crbug.com/998038

Original change's description:
> gpu: Update GrGLCaps usage of fTextureRectangle with chromium.
> 
> R=​bsalomon@google.com
> 
> Bug:900706
> Change-Id: I0ca0062f12f905c47e9f096acf675b93f131e390
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234990
> Commit-Queue: Khushal Sagar <khushalsagar@chromium.org>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,khushalsagar@chromium.org

Change-Id: Iebdaed117229987f23ec1b1ad48ec6719972ad95
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 900706
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237431
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-08-27 14:30:12 +00:00
Shachar Langbeheim
ebe48959ee compile.sh: Use emar in order to bundle libraries.
This is necessary in order to use emscripten's new compiler, as
described here:
https://bit.ly/2ZlwQmz

Change-Id: I66e0a6e4e403b7a9ba94860ea9cc7e53027d6f46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237396
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-27 13:33:20 +00:00
Mike Klein
48e08aa973 <ostream> -> <iosfwd>
<ostream> is one of the more expensive headers to include
and that's amplified by SkRefCnt.h's popularity.

We've been including <ostream> for sk_sp's operator<<.  That's only
used by Chromium and while we could just sprinkle in a bunch of .get()
calls and remove operator<<, when I started going through and actually
doing that I got the feeling I was making things pointlessly harder to
read and write, and wanted to find a way to make it actually work.

My next instinct was to template it without mentioning ostreams,

    template <typename OS, typename T>
    auto operator<<(OS& os, const sk_sp<T>& sp) -> decltype(os << sp.get()) {
        return os << sp.get();
    }

but that makes this operator<< ambiguous with some other templated operator<<
in GTest.  They got in first, so they win...

So ultimately, switch <ostream> to <iosfwd>.   Anyone using our
operator<<() presumably has <ostream> included already, and the #include
cost for <iosfwd> is small enough that I don't think we'll mind keeping
this around indefinitely.

To repro, look at before/after of -ftime-trace:

    ~/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++ -I. -Os -c src/core/SkCanvas.cpp -ftime-trace

I have tested locally that Chromium builds with this change.

Change-Id: I9decc2e65b5cc8fd07d8106a5eff81901aedd7d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237190
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-08-27 13:08:56 +00:00
Kevin Lubick
e384df4f5e [canvaskit] Add sundry APIs and tests
To the reviewer: I've tried to make it so each PS adds one new API.

Change-Id: I81fc85c7a93a19ce4fd725a125e138d35471e693
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237155
Reviewed-by: Mike Reed <reed@google.com>
2019-08-27 12:35:49 +00:00
recipe-roller
6064ecf7e9 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.
recipe_engine:
  https://crrev.com/c76e28ff61f722e8f67f06531e0fc31daa768837 [swarming] Roll client (joshuaseaton@google.com)


TBR=borenet@google.com

Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I10a9ded4a45d79e5343a8da877e49a0099051aaf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237354
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>
2019-08-27 06:09:13 +00:00
skia-recreate-skps
4b5d655619 Update Go deps
Change-Id: I640e8940661024dc8cdcd71201eac578a53b865c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237347
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2019-08-27 05:24:13 +00:00
skia-autoroll
07523989bb Roll third_party/externals/angle2 3c6b2e1613c8..57ad1e1287dd (8 commits)
3c6b2e1613..57ad1e1287

git log 3c6b2e1613c8..57ad1e1287dd --date=short --no-merges --format='%ad %ae %s'
2019-08-27 syoussefi@chromium.org Vulkan: Introduce ContextScoped
2019-08-26 shrekshao@google.com Implement Draw base vertex and base instance functions
2019-08-26 thakis@chromium.org Try to list files instead of directory in isolate for gl_cts data.
2019-08-26 lujc@google.com Use FenceNVID in place of GLuint handles
2019-08-26 jmadill@chromium.org Fix trace logging in Debug.
2019-08-26 ianelliott@google.com Vulkan: Enable ES1_VULKAN testing in end2end tests.
2019-08-26 cwallez@chromium.org LoggingAnnotator: don't output to trace file if there is no platform
2019-08-26 angle-autoroll@skia-public.iam.gserviceaccount.com Roll ./third_party/spirv-tools/src aef8f92b2bb6..1eb89172a82b (3 commits)

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

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 stani@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.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
TBR=stani@google.com
Change-Id: I0db13b4a1672283d42e76abcf8cfbd7123efd33a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237339
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-08-27 05:21:53 +00:00
skia-autoroll
479525fd8a Roll ../src 26bef9371198..31c682b20741 (361 commits)
26bef93711..31c682b207


Created with:
  gclient setdep -r ../src@31c682b207

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 stani@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.primary:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Bug: None
TBR=stani@google.com
Change-Id: I547a8f577d005a597eda31028ed85fb8f3b47d44
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237341
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-08-27 04:59:23 +00:00
skia-autoroll
e63dc15e38 Roll third_party/externals/swiftshader d6dc4b7e4533..605f863173b6 (4 commits)
https://swiftshader.googlesource.com/SwiftShader.git/+log/d6dc4b7e4533..605f863173b6

git log d6dc4b7e4533..605f863173b6 --date=short --no-merges --format='%ad %ae %s'
2019-08-26 chrisforbes@google.com Refactor framebuffer clear to be less redundant
2019-08-26 chrisforbes@google.com Refactor multiview support to remove some redundancy
2019-08-26 chrisforbes@google.com Fix misleading UNIMPLEMENTED in image load
2019-08-26 swiftshader.regress@gmail.com Regres: Update test lists @ d6dc4b7e

Created with:
  gclient setdep -r third_party/externals/swiftshader@605f863173b6

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 stani@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.primary:Test-Debian9-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
TBR=stani@google.com
Change-Id: Id3ed6d69800ad7048874386bc4521e3f2d00bdff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237340
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2019-08-27 04:38:13 +00:00
Khushal
c43ab22a8c gpu: Update GrGLCaps usage of fTextureRectangle with chromium.
R=bsalomon@google.com

Bug:900706
Change-Id: I0ca0062f12f905c47e9f096acf675b93f131e390
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234990
Commit-Queue: Khushal Sagar <khushalsagar@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-27 03:12:24 +00:00
Florin Malita
3c8f9cb45d [skottie] Harden motion blur
1) don't attempt to attach the effect when the layer is null

2) sksg::onRender can receive a null context - handle it gracefully

TBR=

Change-Id: I4fae08b15d448849c7c99b17df6811ad31f190c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237276
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-08-27 00:21:12 +00:00