You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's unclear how we should reason about exposing the size of the element snapshots to script. There's 2 categories of APIs:
placeElement and drawElement on 2D canvas where the author can ask to render the snapshot at a point (x, y). But it's ambiguous what should be at (x, y) since there can be multiple reference boxes to use from the box model, or the snapshot's size itself which can have overflow. For example placeElement(element, 0, 0) where the element has a shadow. For the snapshot to not clip, we need to talk in terms of the snapshot size.
One option is to make this configurable.
The texImage2D style of API where the author gets back a texture for the element. In this case the texture size would be exposed to the author and would need to be the actual snapshot size. We could expose offsets into the snapshot for the reference boxes if needed.
The text was updated successfully, but these errors were encountered:
It's unclear how we should reason about exposing the size of the element snapshots to script. There's 2 categories of APIs:
placeElement
anddrawElement
on 2D canvas where the author can ask to render the snapshot at a point (x, y). But it's ambiguous what should be at (x, y) since there can be multiple reference boxes to use from the box model, or the snapshot's size itself which can have overflow. For exampleplaceElement(element, 0, 0)
where the element has a shadow. For the snapshot to not clip, we need to talk in terms of the snapshot size.One option is to make this configurable.
The
texImage2D
style of API where the author gets back a texture for the element. In this case the texture size would be exposed to the author and would need to be the actual snapshot size. We could expose offsets into the snapshot for the reference boxes if needed.The text was updated successfully, but these errors were encountered: