Previously only position was checked (twice).
Bug: skia:8755
Change-Id: Ic169a08723853dd0e69a160b3f34506e922f0736
Reviewed-on: https://skia-review.googlesource.com/c/191662
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
GrPixelConfig is no longer public so there is no need for us to have the
special private configs.
Bug: skia:
Change-Id: Id732a3b2db3a7b9fd5d767e5548e796a4e670547
Reviewed-on: https://skia-review.googlesource.com/c/191572
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: I5a333112f68fcd001f39e646570a246875c03bc3
Reviewed-on: https://skia-review.googlesource.com/c/191566
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
This adds a new "Particles" slide to viewer, that allows
editing, loading, and saving particle effects. All of the
particle system code is in modules/particles.
There are many rough edges and some not-yet-finished changes
to generalize the model[1]. A rough overview:
- SkReflected.h implements a lightweight reflection system
for classes derived from SkReflected. Adding a new class
involves deriving from SkReflected, adding a macro to the
class declaration, and implementing visitFields(), which
simply calls a virtual on an SkFieldVisitor for each field.
Currently, emitters and affectors use this mechanism.
- SkParticleSerialization.h demonstrates two useful field
visitors - for serializing to and from JSON. The driver
code that uses those is directly in ParticlesSlide.
- SkParticleData.h and SkCurve.h define a variety of helper
types for talking about particles, both for parameterizing
individual values, and communicating about the state of a
particle among the effect, affectors, and emitters.
- SkParticleEffect.h defines the static data definition of
an effect (SkParticleEffectParams), as well as a running
instance of an effect (SkParticleEffect). The effect has
simple update() and draw() methods.
- ParticlesSlide.cpp adds a third field visitor to generate
GUIs for interactively editing the running effect.
---
1: The critical change I'd like to make is to remove all
special case behavior over time and at spawn (setting sprite
frames, size over time, color over time, etc...). Integration
is the only fixed function behavior. Everything else is driven
by two lists of affectors. One is applied at spawn time, using
the effect's lifetime to evaluate curves. This allows spawning
particles with different colors as the effect ages out, for
example. The second list is applied every frame to update
existing particles, and is driven by the particle's lifetime.
This allows particles to change color after being spawned, for
example.
With a small set of affectors using a single expressive curve
primitive (keyframed list of cubic curve segments), we can
have affectors that update color, size, velocity, position,
sprite frame, etc., and implement many complex behaviors.
Bug: skia:
Change-Id: Id9402bef22825d55d021c5a2f9e5e41791aabaf4
Reviewed-on: https://skia-review.googlesource.com/c/181404
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This essentially resurects the old SkTextBox code into a primitive
shaper.
Change-Id: Ia4d1a5ab3d1c7d410962b49ac3891298655c7dc4
Reviewed-on: https://skia-review.googlesource.com/c/191562
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
will flesh out more over time.
Bug: skia:
Change-Id: If5eaf0a7c404b9209b93871eb3ac3d74da8c65dd
Reviewed-on: https://skia-review.googlesource.com/c/191003
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
In C++11 constexpr operators cannot be defaulted.
Change-Id: Ibc73d9b9291f3e1a45bb5c0a7ff59c2b90a3e380
Reviewed-on: https://skia-review.googlesource.com/c/191567
Reviewed-by: Stephan Altmueller <stephana@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This seems to resolve the leak in libxcb, but introduces a new leak in
VkTestUtils.
Bug: skia:8710
Change-Id: I71482d8f1c5eebfffd211a4124bd2db01283741b
Reviewed-on: https://skia-review.googlesource.com/c/186862
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
allocateNewGlyph calls fGlyphMap.set. No reason to call it again in lookupPackedGlyphID.
Change-Id: I3724094de6a76a9c5e9f11a1808b14c3dd50b64e
Reviewed-on: https://skia-review.googlesource.com/c/191561
Auto-Submit: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Introduce RenderNode::nodeAt(const SkPoint&) as the entry point for the hit-testing API.
This is backed by a onNodeAt() virtual, which gets dispatched throughout the render DAG,
and normally stops at the first leaf Draw node in encounters.
To support the implementation, introduce a GeometryNode::contains(const SkPoint&) API.
This is backed by a onContains() virtual, overridden in each concrete geometry class.
Expose nodeAt() on sksg::Scene, and add some basic unit tests.
Change-Id: I0c8abd9d1e51ecf2d8b4dd699f325cd636e21084
Reviewed-on: https://skia-review.googlesource.com/c/191296
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Bug: skia:
Change-Id: I796a40db46174b405495af8234c5b8d7920a46d6
Reviewed-on: https://skia-review.googlesource.com/c/189985
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Bug: skia:
Change-Id: I3364fa6b89674f65bf493467198740e1862d215e
Reviewed-on: https://skia-review.googlesource.com/c/191291
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
next_fail() dereferences the first argument. So calling
next_fail() with the first argument of 'ptr' when we know 'ptr'
is nullptr will cause a problem.
For NextUTF16(), we instead return -1 when we know 'ptr' is
nullptr, just as the code currently does for NextUTF8() and
NextUTF32().
Change-Id: Ifabb45c694d6e3dbeee5ac7b953f15895cea3a69
Reviewed-on: https://skia-review.googlesource.com/c/191420
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
ad194995ed..c66fb571be
git log ad194995ed72..c66fb571be1a --date=short --no-merges --format='%ad %ae %s'
2019-02-12 zmo@chromium.org Revert "Disable broken tests on Fuchsia"
2019-02-12 jmadill@chromium.org Revert "Vulkan: Port renderer to Fuchsia"
Created with:
gclient setdep -r third_party/externals/angle2@c66fb571be1a
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=stephana@google.com
Change-Id: I55e52b9975e7582e82417ac2ca49aea0d4ae74e5
Reviewed-on: https://skia-review.googlesource.com/c/191511
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
fe59f6b5ed..ad194995ed
git log fe59f6b5ed2b..ad194995ed72 --date=short --no-merges --format='%ad %ae %s'
2019-02-12 spang@chromium.org Disable broken tests on Fuchsia
2019-02-11 spang@chromium.org Vulkan: Port renderer to Fuchsia
2019-02-11 jmadill@chromium.org Vulkan: Enable WebGLCompatiblityTest.
2019-02-11 jmadill@chromium.org Vulkan: Suppress layer warnings about unbound outputs.
2019-02-11 jmadill@chromium.org Vulkan: Fix UtilsVk invalidating Context descriptors.
2019-02-11 tobine@google.com Vulkan:Adding Cmd Buffer Reset tests
2019-02-11 fjhenigman@chromium.org Vulkan: make GenerateCaps a member of RendererVk.
2019-02-11 spang@chromium.org Vulkan: Respect EGL_HEIGHT & EGL_WIDTH in SurfaceVk
Created with:
gclient setdep -r third_party/externals/angle2@ad194995ed72
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=stephana@google.com
Change-Id: Ic98a5f3124f64d72e2b61e931135d79039ba6716
Reviewed-on: https://skia-review.googlesource.com/c/191317
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
https://skia-review.googlesource.com/c/189866 "SkWuffsCodec: Initialize
memory when incomplete" made some buffer zero'ing conditional on a
frame's dirty rectangle, which required moving the this->decodeFrame
call earlier in onIncrementalDecode, since we can't know the dirty
rectangle until after decodeFrame is called.
However, moving that earlier meant that it was now earlier than the
"sk_bzero(pixels.ptr + etc, etc)" call that zero-initialized the
destination buffer that decodeFrame writes to. The actual pixel indexes
that decodeFrame decodes are now overwritten by zeroes.
That prior commit fixed the fuzzer-discovered bug, in that it no longer
swizzles from uninitialized memory. Unfortunately, it's now often
swizzling from all-zeroed memory, so that the decoding is incorrect.
This commit moves the zero-ing to onStartIncrementalDecode, even
earlier. The "dm --match Gif" tests are happy again.
Bug: skia:8235
Change-Id: Iae993b7d9f45e1b375ed99f6cc86536091a92eba
Reviewed-on: https://skia-review.googlesource.com/c/190941
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Instead of the Renderer and the GPU calculating the strike,
the common code now calculates the strike.
Bug: skia:7515
Change-Id: I4bc65f83347e57f5b242380b0cadb74c43b8a152
Reviewed-on: https://skia-review.googlesource.com/c/191382
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I6d18be3f6178003eb5153d32d4b618101ddcb3d9
Reviewed-on: https://skia-review.googlesource.com/c/191297
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
A SkScopedStrike allows drawGlyphRunAsBMPWithPathFallback
to control the scope of SkStrikeInterface objects generated
by both RemoteGlyphCache and SkStrikeCache.
* introduce onAboutToExitScope() into the SkStrikeInterface
Change-Id: I87a1e623ee9a8375f4e063290d74a466f96c9933
Reviewed-on: https://skia-review.googlesource.com/c/191293
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: Idec98e922e81e062b78403bb83473e20a49dd13e
Reviewed-on: https://skia-review.googlesource.com/c/191292
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
This makes it easier to switch all the ops over to using a GrRecordingContext (and better matches what we do with all the other ops)
Change-Id: Ie690975c31b8c9f4c7acebdc0185a145a0a263a5
Reviewed-on: https://skia-review.googlesource.com/c/191280
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:
Change-Id: I63bc32c7bba294d8698d17e1f178ca0eb0a84ddf
Reviewed-on: https://skia-review.googlesource.com/c/191295
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
When the GrImageContext & GrRecordingContext are actually GrDirectContexts it is useful for them to report the abandonment state of the GrDirectContext.
When the GrImageContext & GrRecordingContext are actually GrImageCreationContext or GrDDLContexts then they will just never be abandoned.
This CL also strips the GrProxyProvider and GrDrawingManager of their tracking on abandonment and centralizes it in the GrImageContext.
ImageContext
can't abandon
can only check abandonment privately
RecordingContext
can't abandon
can only check abandonment privately
DirectContext (aka GrContext)
can abandon publicly
can check abandonment publicly
Note that abandoning the DirectContext won't alter the abandonment status of any of
the other contexts in its group (e.g., DDL contexts that may be being used to record).
Change-Id: Ib790f74d90ab18da58a127fed2aad20e2477bd21
Reviewed-on: https://skia-review.googlesource.com/c/190669
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: Ib078676bfe4de033c878f3007b4581d37e7b759b
Reviewed-on: https://skia-review.googlesource.com/c/191288
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Plump the strike calculated in the calling code through
drawGlyphRunAsBMPWithPathFallback. This is in anticipation
of calculating the cache in drawGlyphRunAsBMPWithPathFallback.
* Add getDescriptor to SkStrikeInterface.
Change-Id: I904cdb51f60443cabc9dc41ac246b1fe0c725c85
Reviewed-on: https://skia-review.googlesource.com/c/191285
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This interferes with other uses of pointer tagging,
like ARM pointer authentication or HSWASAN.
Bug: b/124135723
Change-Id: I1a78dd4e1b9b18dd02738bb1dfbbb968f29675bc
Reviewed-on: https://skia-review.googlesource.com/c/191286
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
We were checking if 'mipMapsStatus' was nullptr, and if it was,
our 'else' clause would have us always dereference this nullptr.
We change the logic to avoid a dereference in this case.
Change-Id: I2bc091c4de0c9b62ae733026cea3be37442820eb
Reviewed-on: https://skia-review.googlesource.com/c/191323
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
- break dependency on code from src/compute
- port away from C APIs to friendlier C++ wrapper APIs
- add DEPS for OpenCL C++ wrapper headers so we can build on Mac
- factor out a //third_party/opencl GN target
Change-Id: I9e37c6677cfb779021e66f2bd10f97570c450746
Reviewed-on: https://skia-review.googlesource.com/c/191281
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Bug: oss-fuzz:11823
This pulls in the Wuffs bug fix:
0842bc7115
"Make the GIF dirty_rect be in the frame_rect".
Change-Id: Ib4928eb3cbf4bc862c3ae709fdfe6f179412f95f
Reviewed-on: https://skia-review.googlesource.com/c/190940
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
This should disable warnings from third-party headers
on Clang/Win builds. So far we've just gotten lucky.
Change-Id: Ieaf459e200925d46d8c65ba8d489db111705b125
Reviewed-on: https://skia-review.googlesource.com/c/191283
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
We invoke va_end() as required when we're done with our va_copy().
Change-Id: Ibc55279c3bc01a63da2ef5f1942d46367eac8a67
Reviewed-on: https://skia-review.googlesource.com/c/191322
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
abf6dbbb10..fe59f6b5ed
git log abf6dbbb107b..fe59f6b5ed2b --date=short --no-merges --format='%ad %ae %s'
2019-02-11 geofflang@chromium.org Vulkan: Implement EGL Images for 2D and Renderbuffer sources.
Created with:
gclient setdep -r third_party/externals/angle2@fe59f6b5ed2b
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=stephana@google.com
Change-Id: I5f3c6e024609ba6e35e8a52d3f9f3107c5af43fe
Reviewed-on: https://skia-review.googlesource.com/c/191183
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
fflush() requires an open file handle, so it shouldn't be called
right after fclose(). And fclose() performs an fflush(), by
definition (see http://man7.org/linux/man-pages/man3/fclose.3.html ),
so we can remove this fflush() call altogether.
Change-Id: I8fbdd5a85b3cdb5edfdabbd5dca449ea1d4fce2d
Reviewed-on: https://skia-review.googlesource.com/c/191321
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Our code had two modifications of 'from' without a sequence point
between them. This leaves the behavior undefined. We change
the code to only modify 'from' once, and have this behavior
well defined.
Change-Id: Ifa4fb191ecc071fdb4793901eaef777294709467
Reviewed-on: https://skia-review.googlesource.com/c/191320
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>