Everything follows a pattern based on a varying type,
so I've introduced a temporary type variable `t` to
represent that, with each variant setting `t` then
falling through to a common impl.
Change-Id: I2349308066d16ad4f497112570b666fc1dd14976
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274060
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
seems to fix the deadlocks?
Change-Id: Iac8b4247d2521250f18f54562d5696a566a6e71a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274028
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
By default, per-character AE transforms are anchored on the glyph
baseline, mid-advance.
To support:
- extend SkottieShaper to track per-fragment ascent and advance
- adjust the fragment transform origin for (advance/2,0)
As an optimization, we only track the anchor point in the presence
of origin-dependent animators (scale & rotation ATM).
(note: the ascent info is going to be used in a follow up CL to support
relative anchor point adjustments)
Change-Id: I883a957028e624522fdf68a6b2fc44384dee18fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273984
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
Change-Id: I28e3fb933f65e38997bf4afe8bdc970e0aad2a6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274030
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
All subclasses implement "willBeMipped" param to
refOriginalTextureProxyView()
Change-Id: I85a5540857255bdb6f79b536979f938d94a9591a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273990
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
enough for SkVM_mad, SkVM_madder
Change-Id: Id5165e221ae9923f6ccffc6a987d973c7f11332c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274026
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
No real change, just exploring APIs to make our code terse.
Refactors I32/F32 to be the types we should use in emit(),
rather than always the vector types. There were quite a
few (scalar ? i32 : I32) that this folds over.
Change-Id: I26e7b297d86f98dc056402c3108e2ea8e0f29667
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273974
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This is just a simple clean up from a CL request.
Change-Id: Ibc09e19aeb8a160e4e4e03573fcf56cb1d58525b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273983
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Set up the expected formats we'll want.
Doesn't include YUV formats just yet.
Bug: skia:9935
Change-Id: I934a7ef006b5a218a5f637774aea5f082202cd3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273877
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (depot_tools) into this repository.
depot_tools:
https://crrev.com/780e6bf8d43870389e6eba66611c7f25c8e0f6f3 (ehmaldonado@google.com)
gclient: Allow setting GCLIENT_PY3 to 0 to run on Python 2.
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
TBR=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: Id413142efe7727125fcea3e4ec0b4f7bf3306f9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273920
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>
Change-Id: I5bae83b8f4c8a50f0638fa2ac09be6dcdf8a72af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273880
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Keeping all the values i32/I32 for now.
Maybe something more complex later?
Change-Id: Iaf804fa51e51d378ea7857b8c5aa2f20c3403e2c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273863
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Trying to stage the texture format CLs in a little at a time.
Bug: skia:9935
Change-Id: I0fc6fe09fdb55d6c24b53af7edbcc8e8fc857ed7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273803
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
First steps to getting D3D texture format caps set up.
Bug: skia:9935
Change-Id: I905aaedd7d5fcc8b5137fcc8d8189e93260c9359
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273797
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This CL also adds helper functions (i.e., createPipeline and createPipelineWithStencil) to better encapsulate pipeline creation.
This is a first step towards making GrSimpleMeshDrawOpHelper surface its GrProgramInfos.
Bug: skia:9455
Change-Id: Ic6cc7a01383e42436305358a9b193958d862786c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273556
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Change-Id: I2b1a07dccb5e58dbe2488acf1b87281215b84f98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273799
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Use uniforms rather than fixed function computed varyings to implement
coord transforms for FPs that are sampled explicitly.
Change-Id: I43be3f9649550e36dbb4d1f72090a497dfeb0d31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273798
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
For Flutter, mark each bounds rect as a draw or not.
saveLayer() is the trickiest part: it doesn't draw, but its paired
restore() does, while a restore() paired with save() doesn't.
Change-Id: I5f0dc61ad5543265c5ea2bf41b236f57915847b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273501
Reviewed-by: Emmanuel Garcia <egarciad@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This means we can write a memset32 (load32 -> store32),
tested explicitly with the new unit test.
Slightly changes to the type protocol,
- load and splat now generate scalars or vectors
depending on how `scalar` is set
- store should no longer have to pay attention to `scalar`;
it's input values will already be the right size
Clean up some of the type declarations where we don't
actually need the subclass types, holding llvm::Type* instead.
This makes using ?: easier.
Change-Id: I2f98701ebdeead0513d355b2666b024794b90193
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273781
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 838007f1ff.
Reason for revert: Significant RAM regression detected by Chrome.
Original change's description:
> Add most important intrinsics to the interpreter
>
> Started with component-wise comparison and mix builtins.
>
> Implemented min, max, clamp, and saturate using those.
> Moved dot to SkSL as well. Because we now have builtins
> implemented using other (intrinsic) builtins, I had to
> split the include file in two - this lets the intrinsics
> be marked so we can call them from the second phase of
> builtins that are written in SkSL.
>
> Given that the comparisons and kSelect are now used by
> these, I added vector versions of those instructions.
> I also switched the kSelect args to match GLSL mix(),
> mostly so the logic of mapping intrinsic arguments to
> instruction register args remains simple.
>
> Inspired by the (never-landed):
> https://skia-review.googlesource.com/c/skia/+/230739
>
> Change-Id: Iecb0a7e8dc633625ff2cada7fb962bf2137fa881
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272516
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=bsalomon@google.com,brianosman@google.com,ethannicholas@google.com,reed@google.com
Change-Id: I931a0ccc254b55339c9b077543a0daaf28146b19
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273800
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
And rearrange a little so that it's more similar
to the other JIT state we track, so this sort
of bug is less likely in the future.
Change-Id: I64ddb791490efdbbcecb53cce823dda5c8d7c68b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273779
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
This allows us to move iOS-specific stuff from individual recipes into
the flavor module.
First in a long series of CLs to clean up recipes and move to task drivers.
Change-Id: Iff01610f76c71920639328ead5209e0cd5d93f31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273762
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
This reverts commit 289ecf8b9b.
Reason for revert: The addition made in the autogenerated Go Deps CL was superfluous was by the time I got around to merging and submitting it, now it's breaking CheckGeneratedFiles.
Original change's description:
> Update Go Deps
>
> Change-Id: I4f78bfcbd56e0ba1b318f06c281a9503ff378ed5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272895
> Commit-Queue: Weston Tracey <westont@google.com>
> Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
TBR=skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com,westont@google.com
Change-Id: Iccda32bc10bf19610260eec83816ebe6e69c8ae7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273767
Commit-Queue: Weston Tracey <westont@google.com>
Reviewed-by: Weston Tracey <westont@google.com>
This reverts commit 915b779f9c.
Reason for revert: finally coming back to this, figure out what's wrong on Android
Original change's description:
> Revert "Track device coordinate space as matrix"
>
> This reverts commit b74d5548a4.
>
> Reason for revert: see if this fixes the android roll
>
> Original change's description:
> > Track device coordinate space as matrix
> >
> > This is a required step to be able to cleanly draw image filtered
> > device layers with arbitrary matrices, instead of relying on
> > SkMatrixImageFilter to apply the transformation.
> >
> > Bug: skia:9545
> > Change-Id: I8d84679a281538875cf4a1b73565294fb7f89c86
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249076
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
>
> TBR=robertphillips@google.com,reed@google.com,michaelludwig@google.com
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: skia:9545
> Change-Id: Ie374a7500cfbff35cb0782beb863086e118a005a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249986
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=robertphillips@google.com,reed@google.com,michaelludwig@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:9545
Change-Id: If31a9be86cb340a0874533c044c19b6787d5f176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272340
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Change-Id: If718decf8867cd66d8394a4f7fc646cf3f0950b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273609
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
With the removal of rescaling of NPOT textures this no longer matters.
Change-Id: I313e895407c3a2c616e6113a5bde75dc6a167e7c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273519
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
I've also added in a disabled path to do quasi -O1 / -Os
passes, but mem2reg is really all we need, and I think we
can eliminate the need for even that.
Codegen looks great now, e.g.
(lldb) dis -s fJITEntry -c 40
0x10a48c000: movabsq $0x10a48d000, %rax ; imm = 0x10A48D000
0x10a48c00a: vbroadcastss (%rax), %zmm0
0x10a48c010: cmpq $0xf, %rdi
0x10a48c014: jbe 0x10a48c04d
0x10a48c016: nopw %cs:(%rax,%rax)
0x10a48c020: vmovups %zmm0, (%rsi)
0x10a48c026: addq $-0x10, %rdi
0x10a48c02a: addq $0x40, %rsi
0x10a48c02e: cmpq $0xf, %rdi
0x10a48c032: ja 0x10a48c020
0x10a48c034: jmp 0x10a48c04d
0x10a48c036: nopw %cs:(%rax,%rax)
0x10a48c040: movl $0x2a, (%rsi)
0x10a48c046: decq %rdi
0x10a48c049: addq $0x4, %rsi
0x10a48c04d: testq %rdi, %rdi
0x10a48c050: jne 0x10a48c040
0x10a48c052: vzeroupper
0x10a48c055: retq
Change-Id: Ief5d12548d5b1a683060b2b5d207022d673fe761
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/273606
Reviewed-by: Herb Derby <herb@google.com>