Previously, we were using a normalized 8-bit unsigned integer which forced us
to represent each increment of the winding number as a fraction of the max
value (1 / 255) which we would then add up using additive alpha blending.
This had three major drawbacks:
- The max winding number could not be greater than 255.
- Adding up (1 / 255) several times could result in a loss of precision.
- Due to also computing anti-aliasing as a fractional winding number, we had to
reduce the max winding number to 32. This was still not good enough because
we would multiply a fractional value with `1 / 32`, thus introducing more and
more loss of precision.
This commit changes the texture type to an `f16` which doesn't require the
division by 255 and enables greater precision in the computation of the
anti-aliased parts of a curve. Note how this also removes the limitation of 255
windings at most per curve. The tradeoff is paying twice as much memory for
storing the texture, but that seems totally valid to achieve rendering accuracy.
Note that this kind of texture should be compatible with WebGL2 once we start
working on a web version of Zed.
Antonio Scandurra
created
0be897d
WIP: Edit one of the excerpted buffers and add an assertion
Click to expand commit body
We'll need to detect edits on the child buffers and understand their impact on the tree.
Here I'm exploring a new approach to the project-wide diagnostics view that can exactly mirror the contents of cargo check. The `FragmentList` composes an arbitrary list of fragments from other buffers and presents them as if they were a single buffer.
Nathan Sobo
created
3426d46
Clear pending keystrokes after dispatching an action
Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra
and
Nathan Sobo
created
0e93bc4
In `add_option_view`, avoid bumping view's ref counts if view is None
Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Antonio Scandurra
and
Nathan Sobo
created
bd573e0
Merge pull request #273 from zed-industries/flexible-blocks
Click to expand commit body
Render blocks as arbitrary elements
Max Brunsfeld
created
5ae4670
Fix alignment of blocks adjacent to other blocks
Click to expand commit body
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
df1804b
Merge pull request #267 from zed-industries/fix-soft-wrap-disabled
Click to expand commit body
Avoid building up pending edits when soft wrapping is disabled
Nathan Sobo
created
0ed488d
Avoid building up pending edits when soft wrapping is disabled
Click to expand commit body
This was causing us to get slower over time as we stacked up hundreds of thousands of pending edits whenever soft wrap was disabled.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Nathan Sobo
and
Antonio Scandurra
created
fcbd7f9
Merge pull request #266 from zed-industries/fix-go-to-line
Click to expand commit body
Use display coordinates for the highlighted row in "go to line"
Antonio Scandurra
created
2449834
Use display coordinates for the highlighted row in "go to line"