This differed from the separate versions in that it snapped to zero.
It was also strictly worse than calling the two separate versions.
Most clients don't need the snapping, so just call the two existing
functions. For clients that need the snapping, call new variants of
each that do snap.
Change-Id: Ia4e09fd9651932fe15caeab1399df7f6281bdc17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205303
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: Ic6f86f615d046b7afdc8bd2fe21d76024d800613
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205348
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
No implementations remain.
Change-Id: I569d2ca9c69df27228a33dd433790c6c06aebe08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205340
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Implement gradient ramp using SG shader effects.
A couple of quirks:
- since the gradient type (linear/radial) is animatiable (?!),
update sksg::ShaderEffect to allow resetting the shader
- gradient ramp doesn't have an assigned/stable JSON effect type,
but the data is present; introduce a name-based effect lookup method
(used as a fallback when the type is not recognized)
Change-Id: I02bbd6c75c3af175b64c1df502aa52b7c0875162
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205342
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
When running Skia GPU blur on an iPhone X, I noticed a bit a of transparency seeping into my clamped blur on the right and/or bottom edges of certain-sized rectangular blurs with large blur radii.
I could only repro this on an iPhone X; I couldn't repro on a retina Macbook Pro or a 1x external screen.
I think the iPhone X GPU is rounding the sampling coordinate a little differently than most other GPUs or there's some floating point error involved in the shader that makes it sample pixels outside of the desired blur domain. Since the blur source is inside a scratch texture filled with transparent black, some undesirable transparent black gets pulled in when we're decimating and blurring the source.
Bug: https://bugs.chromium.org/p/skia/issues/detail?id=8942
Change-Id: Iff28c3ee5d069c6999a831d4b156a650be3a9eb8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205208
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit de206c75c2.
Reason for revert: Chrome is having issues with the switch to Mock in blink tests.
Original change's description:
> Remove the NullGL interface (and associated test context)
>
> Bug: skia:
> Change-Id: Ie3c9ee39fc1e0a4406de085c60d8433ffb4419df
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203708
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com
Change-Id: Iff0cbf29dcea26957efc800a8c33d0ad8285de0a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205343
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:8235 (Wuffs)
Bug: skia:8751 (Color correction)
Bug: skia:8762 (565)
This was brought up in https://skia-review.googlesource.com/c/skia/+/171645/1/src/codec/SkWuffsCodec.cpp#499
Remove the SkSwizzler and code that supports it (e.g.
SkWuffsSpySampler). In its place, use an SkDraw and draw from Wuffs'
working buffer into the output pixel memory. This trivially allows
support for 565 and f16, while removing the blend function that was
8888 specific. The draw operation also takes care of color correction
and allows arbitrary downscaling.
Add the intermediate subclass SkScalingCodec, to share methods between
SkWebpCodec and SkWuffsCodec.
Allowing arbitrary scaling from an SkCodec subclass is a bit of a break
from an original goal of SkCodec, which was to only do what the
underlying format supports naturally. Otherwise a client could just use
Skia to do effectively the same thing in a layer above SkCodec. (e.g.
jpegs can be downscaled by throwing away information during decode,
which libjpeg(-turbo) will do as requested. But gifs don't scale down
naturally in the same way, so SkGifCodec did not support downscaling
except when used with SkAndroidCodec.) But SkCodec has already deviated
from this goals in two ways. With SkAndroidCodec, sampling is done
inside SkGifCodec (and others) in order to save on memory allocation (we
can sample on a single line without allocating memory for the full size
image at its original size). (Note that this memory is not saved anyway
in SkWuffsCodec, because wuffs has its own image buffer.) The second
deviation is color correction, which could also be done in a layer
outside SkCodec. Since SkCodec is already doing this extra work,
simplify it.
Change-Id: If9a1698e0c353f60250aef5b6229855e6538a42d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/194186
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Nigel Tao <nigeltao@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/3c830222aedad072e0ee6c9feb55214cc24b36f1 git cl status: differentiate "dry-run" from generic "commit". (tandrii@chromium.org)
TBR=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Idbcbd14040ded6214638c45daa486265c654def5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205380
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>
3115a0fc17..6cb0cff573
git log 3115a0fc17fa..6cb0cff57376 --date=short --no-merges --format='%ad %ae %s'
2019-04-02 syoussefi@chromium.org Add a test for masked/scissored multi-attachment clear
2019-04-01 jmadill@chromium.org Add a presubmit builder.
2019-04-01 geofflang@chromium.org Add missing copyTexture functions in TextureNULL.
2019-04-01 jacek@codeweavers.com Correct case for includes.
2019-04-01 jonahr@google.com Ignore flaky failures from ANGLE's dEQP deps on Win/Linux/Mac.
2019-04-01 syoussefi@chromium.org Vulkan: Clear DS through render pass even if color is masked
2019-04-01 ynovikov@chromium.org Mark vertex attributes dirty during context switches
2019-04-01 jmadill@chromium.org Update texure cache after teleting bound texture.
2019-04-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll ./third_party/spirv-tools/src fcb845310450..320a7de5c9a5 (1 commits)
Created with:
gclient setdep -r third_party/externals/angle2@6cb0cff57376
The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=jlavrova@google.com
Change-Id: Ic866b8489a247bb402063c83e5bfe00339e6f932
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205365
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
e01c3e081f..b3f3a36219
Created with:
gclient setdep -r ../src@b3f3a36219
The AutoRoll server is located here: https://autoroll.skia.org/r/chromium-skia-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
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
TBR=jlavrova@google.com
Change-Id: I9b0b39ff752738435991f11e40addd2bdc755bd6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205364
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Change-Id: If5463ea352e4c8ec6cbb1e07cc9e461504d06b37
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205300
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Merge branch 'master' of https://skia.googlesource.com/skia into buildwasm
Two-part commit required, compile.sh changes first.
needed hashbang line to run in docker
Include wasm debugger in continuous build
Bug: skia:
Change-Id: I378bff703bdf884ca4da266d00069405ed8613d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205266
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Bug: chromium:947055
Change-Id: Ic110a1c4e83af0a8efa47ebf2dd035dfdb0e7af0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204725
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
We were crashing when trying to write an image on android.
Bug: skia:
Change-Id: Id8a4e07ea2385838e122291530710e2e4e74dd8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205209
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Currently, gradients are PaintNode subclasses - which limits their
applicability to leaf DAG nodes.
In order to support generalized gradient/shader effects:
* introduce a new Shader base class
* refactor gradients as Shader subclasses
* introduce ShaderPaint (to support current Gradient-as-paint use)
* introduce ShaderEffect (to support future Gradient-as-effect use)
Tangentially:
* rename SkSGPaintNode.h -> SkSGPaint.h
* consolidate sksg::Color into SkSGPaint.h
Change-Id: I94ba949f4504c09cfde4a4f030d927411fdd66a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205263
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
CoreGraphics requires a full data copy for all operations involving font
tables or data. As a result, cache the font data stream either from font
creation or from when reconstructing the font stream from cg. This greatly
increases the speed and decreases memory use in common use cases with
variable fonts and shaping.
Change-Id: Ife0646987268cb7be3f56ba9c2aa2b62cb3777d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204720
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This removes a case where we can get the first ref on a GrGpuResource outside of
GrResourceCache.
Bug: skia:8927
Change-Id: I4068aff2f91a2e11ada059f4ef406a620140319b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204770
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This probably isn't a huge change from current behavior but, short-term, could introduce some additional flushes.
The long-term plan is to update the drawing manager to perform partial flushes (i.e., flush only the portion of the DAG required for the target proxy) at which point performance should actually be better than the current situation (in which the entire DAG is flushed if there is any pendingIO on the target proxy).
Change-Id: I3270474344c7f982f97cf5087b2c85691bdc31d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205000
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
After this lands we will have 50 SKPs in our repository. We can now
institute an "if we add one we have to delete another one rule".
NoTry: true
Bug: skia:8653
Change-Id: I4da8d2c2ce312878bfe8ac0c6bc2f7dc4711bb85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205262
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
kSynced: Proxy and GrSurface key kept in sync.
kUnsynced: Proxy and GrSurface keys are unrelated.
This will allow cross-context image generators' lazy instantiation
callbacks to use unique keys to find any pre-existing backing GrTexture
rather than keeping an unref'ed bare pointer to the GrTexture.
Bug: skia:8927
Change-Id: Id15e2a64e8d2e56c4ce70b9399eb1d8bcea6ac9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204723
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:
Change-Id: Ie3c9ee39fc1e0a4406de085c60d8433ffb4419df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203708
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Only try to parse .skp files as SkPictures, only .svg
files as SVG, and only try to parse any given file once.
This cleans up error logging from, e.g., trying to
parse a .jpg as an .svg. Sometimes even asserts.
Change-Id: Ibfab76e201eb273107b96fcbd3af94d397862291
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204882
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
In the interest of only changing one thing at a time, this should fix the putImageData perf regression in Chrome. It will be followed up by a CL to change prepareSurfaceForExternalIO to always flush (which could have a different perf impact).
On Chrome's putImageData benchmark we get:
w/o this CL: avg 293.1247823176651 runs/s
w/ this CL: avg 374.8427288397461 runs/s
Bug: 942538
Change-Id: I9b9bc752532890f4313a45e5a6aa34b915d5e43d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205003
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
6446c8882f..3115a0fc17
git log 6446c8882fa3..3115a0fc17fa --date=short --no-merges --format='%ad %ae %s'
2019-03-29 ynovikov@chromium.org Sync run_code_generation_hashes.json after glslang autoroll.
2019-03-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll ./third_party/spirv-tools/src 2ff54e34ed37..fcb845310450 (1 commits)
Created with:
gclient setdep -r third_party/externals/angle2@3115a0fc17fa
The AutoRoll server is located here: https://autoroll.skia.org/r/angle-skia-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE;skia.primary:Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE
TBR=jlavrova@google.com
Change-Id: I02bb42efa5b6d6a179ed40dfd9611696a4d93014
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205174
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
8718289389..e01c3e081f
Created with:
gclient setdep -r ../src@e01c3e081f
The AutoRoll server is located here: https://autoroll.skia.org/r/chromium-skia-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.
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
TBR=jlavrova@google.com
Change-Id: I27e799c130cf781674ef0a5c2f4a55965f6126ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205176
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bug: chromium:947055
Change-Id: I1e0c4c5a6ab839ecca73759f66e2271038de835f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204961
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>