This reverts commit 1e946aa24b.
Reason for revert: Failing TSAN.
Original change's description:
> Add less granular version of GrFence for older Metal versions.
>
> Rather than use MTLSharedEvent, we create a semaphore and
> signal it within the current command buffer's completion handler.
> The pointer to the semaphore is cast as GrFence and returned.
> The waitFence method recasts it and waits on the semaphore.
>
> Bug: skia:8243
> Change-Id: I2c854c65a62786fe8031794008eb6844974ebefd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245583
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
TBR=egdaniel@google.com,jvanverth@google.com
Change-Id: I1b8ccb5944db2d28ceb92361d4d43d7058d0753c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8243
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245717
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
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/beadb7584b9086527329b8054230344de88d1873 Revert "[futures:examples/background_helper] Speculatively switch to os._exit" (tandrii@google.com)
TBR=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ia26af8c1e3b086295fe729715753d0fa704df1b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245716
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>
Previously the pixel data passed to the client was only valid during
the client's callback. This meant if the client wanted to defer
processing of the data a copy was necessary.
Now we pass an object to the callback and the pixel lifetime is tied
to the lifetime of that object.
The object may be holding a GPU transfer buffer mapped. We don't assume
that the object will be released on the direct GrContext thread. So
when the object is destroyed it posts a message to a new type,
GrClientMappedBufferManager, hanging off the direct context. The direct
context will periodically check for messages and unmap and then unref
buffers so that they can be reused. Currently this is done in
GrContext::performDeferredCleanup() and GrDrawingManager::flush().
The old API is kept around for backwards compatibility but it is
reimplemented as a bridge on top of the new mechanism.
Also a utility function to SkImageInfo is added to directly make a new
info with a specified dimensions rather than passing the width and
height separately to makeWH().
Bug: chromium:973403
Bug: skia:8962
Change-Id: Id5cf04235376170142a48e90d3ecd13fd021a2a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245457
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
- add a unit test reproducing the bug
- fix SkRecorder::reset() to call resetCanvas(bounds) instead of
calling resetCanvas(w,h). (It was actually calling
resetCanvas(right,top), even worse...)
In short, because we were calling this old resetCanvas(), SkRecorder,
the SkCanvas* we record into, was presenting bad device bounds,
affecting code like where we query the clip to search an R-tree for ops
to draw. It was trimmed to only the positive/positive portion of the
actual bounds, so content like in the unit test that's all in negative
space was erroneously clipped out.
I'd like to get rid of these w/h methods altogether but they're still
used by some of our test tools and by Android.
Change-Id: Ie46f611250de4d655c4357823895ff885b4f3d59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245599
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: Iac3f65b7e85cb34febf30b7939080290a0738635
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245620
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Change-Id: I2bbef8af07f9a65c7a6577a00b1eb7a47c252f57
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245617
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
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/6b4c2a88f36eba12106e899b19c54c7b1d51b793 Run git_cl commands as a python step. (mmoss@google.com)
TBR=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I5898edded6bafac6a44e861efa5704ff976488d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245619
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>
Rather than use MTLSharedEvent, we create a semaphore and
signal it within the current command buffer's completion handler.
The pointer to the semaphore is cast as GrFence and returned.
The waitFence method recasts it and waits on the semaphore.
Bug: skia:8243
Change-Id: I2c854c65a62786fe8031794008eb6844974ebefd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245583
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This requires new instructions, but means that uniforms don't need
to be copied/expanded into the globals array. It also removes any
limit on the number of uniforms (other than instruction encoding),
and simplifies the memory layout (no need for slot tracking).
To help with this, added a Location struct that encapsulates the
information returned by the two variants of getLocation.
Change-Id: I961be74ea5fdf933da6c7ad284be9fc345cfd909
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245358
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Ifa364ee754fed40160bd161aea60ead2e9fb8414
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245616
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I6bfdbcfbfd53b60f8d9f5fee3d2621c3f3e8c147
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245476
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
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/39baf65a40b3d08e7cd414493fe607eaf18637d0 [futures:examples/background_helper] Speculatively switch to os._exit (iannucci@chromium.org)
TBR=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Ic893719d91560c9619e777e9ec91947029428866
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245559
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>
087f1384f2..f22f16d3c0
git log 087f1384f233..f22f16d3c0a8 --date=short --no-merges --format='%ad %ae %s'
2019-10-01 tobine@google.com Reland "Vulkan: Use VK repos' internal BUILD.gn files"
2019-10-01 timvp@google.com Vulkan: Enable dEQP-GLES31.functional.shaders.*
2019-10-01 timvp@google.com Vulkan: Full support for program interface queries
2019-10-01 jmadill@chromium.org Vulkan: Implement multi-threaded GL.
2019-10-01 cnorthrop@google.com Vulkan: Base/max level fixes and cleanup
2019-10-01 jaime@janeasystems.com GLES2: Use require_constant_initialization for g_Mutex
2019-10-01 cnorthrop@google.com Vulkan: Narrow skip lists for 3D and 2DArray tests to Compute
2019-10-01 courtneygo@google.com Update expectations for deqp failure
Created with:
gclient setdep -r third_party/externals/angle2@f22f16d3c0a8
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 rmistry@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=rmistry@google.com
Change-Id: Ibf4b42fff4b172269a9317535e29d35b891b1140
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245496
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
'resources/**/*' includes the entire resources directory, while
'resources/*' does not include the recursive contents.
Bug: skia: none
Change-Id: Iae5a41af0d62f3eb00098f83721f7f01f0b0ab5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245317
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
For motion blur we're sampling within some window around a given t.
If t is close to the layer in/out point, things get murky: for samples
which fall outside the layer lifespan, we skip drawing => fewer samples
are accumulated => the opacity of the result drops => visual glitches.
The solution is to modulate the frame alpha based on the number of
*visible* samples, and skip rendering when no samples are visible.
Bug: skia:9486
Change-Id: I8d9692ae1589b43d9e6f728d7b7ac2fbf39153fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245363
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This looks like a _very_ minor perf and code size win.
Change-Id: Ieb9d07eb056f66fc90b0e3c36835cc05329ff7b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244920
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Just like https://skia-review.googlesource.com/c/skia/+/118681/,
but one more, and...
- GCC now needs libisl19
- more warnings to stifle... disable warnings-as-errors.
Cq-Include-Trybots: skia.primary:Build-Debian9-GCC-mips64el-Debug,Build-Debian9-GCC-mips64el-Release
Change-Id: I35c2f71caebb47bd1bd253923cbddbe3f9b95477
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245352
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Try to keep a consistent style for objective-C++ code.
Also, share code between both apps.
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm64-Debug-iOS_Metal,Build-Mac-Clang-arm64-Release-iOS_Metal
Change-Id: I4b749780c81319bd048f4295c21dfa91910e262d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241042
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Implements onTransferPixelsFrom, onTransferPixelsTo, onFinishFlush and
checkFinishProcs.
* Adds a bind() method for allocating dynamic buffer memory that can
be used by the GPU prior to mapping on the CPU
Bug: skia:8243
Change-Id: I366ec47bf1155797d9a9b0c9f33870e50c95e914
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244301
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: Idea9530028428c1a9d42e08a655457938b284b84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245261
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
71c1138d67..087f1384f2
git log 71c1138d6739..087f1384f233 --date=short --no-merges --format='%ad %ae %s'
2019-09-30 jmadill@chromium.org Vulkan: Introduce CommandQueue helper class.
2019-09-30 cnorthrop@google.com Vulkan: Refactor render target initialization for texture arrays
2019-09-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll ./third_party/spirv-tools/src 10951a7c9a13..85c67b5e08ee (4 commits)
Created with:
gclient setdep -r third_party/externals/angle2@087f1384f233
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 rmistry@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=rmistry@google.com
Change-Id: Iab9a334b250637a8a8d7aa96ae00fe381182a0f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245307
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Remove an assert (Metal backend has the same limitation).
Change-Id: Ic3b65781431e1280376aabb704cbf83e4557a7b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245256
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Better to just remove it (from all callers) and point them at filterColor4f()
than to try to make it more meaningful.
Change-Id: I6389650733e81ca2ff6968d6c0d30cf9947c0110
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245000
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Add version SkImageInfo::Make() that takes SkISize instead of separate
width and height.
Change-Id: I42aa79d23b19e22f5405631728c245b04bce0559
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245172
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: Idf9a84c0e05d233b9bef1e675f75d645a10c710c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244999
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
The lack of encapsulation was finally starting to bother me. Had to
change the Interpreter namespace to a struct so that it could be
friended, but otherwise this was a nice and simple cleanup.
Also updated the comments on the two run functions, and renamed
fInputSlots to fUniformSlots, to reflect recent clarification
around in vs. uniform.
Change-Id: I24bbc59778b3ab6448bffcf98133d5c149a060a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244883
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Also remove GrDawnRenderTarget::getResolveType() override (was removed
from base class).
Change-Id: Ie71e41d1542b9124464278aa0f266ce476915d51
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245159
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Give it its own header file.
Make it store SkISize rather than separate int w/h.
Change-Id: I732f2774c561decac743a950959a70cbc162b67b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245163
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Motivation: em-size is often results in huge bitmaps for each glyph
(e.g. 2556x2406 rgba pixels).
Define SK_PDF_BITMAP_GLYPH_RASTER_SIZE to 0 to get previous behaviour.
Define SK_PDF_BITMAP_GLYPH_RASTER_SIZE to a positive value to rasterize
at that font size rather than 64pt.
Bug: b/141094460
Bug: chromium:921585
Change-Id: I4523e512ec149cf02c985eb83f2e640a2c680d3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/245160
Commit-Queue: Hal Canary <halcanary@skia.org>
Reviewed-by: Ben Wagner <bungeman@google.com>