A utility that generates triangles of the specified fill type given a path. More...
#include <compute_tessellator.h>
Public Types | |
| enum | Status { Status::kCommandInvalid, Status::kTooManyComponents, Status::kOk } |
| enum | Style { Style::kStroke } |
Public Member Functions | |
| ComputeTessellator () | |
| ~ComputeTessellator () | |
| ComputeTessellator & | SetStyle (Style value) |
| ComputeTessellator & | SetStrokeWidth (Scalar value) |
| ComputeTessellator & | SetStrokeJoin (Join value) |
| ComputeTessellator & | SetStrokeCap (Cap value) |
| ComputeTessellator & | SetMiterLimit (Scalar value) |
| ComputeTessellator & | SetCubicAccuracy (Scalar value) |
| ComputeTessellator & | SetQuadraticTolerance (Scalar value) |
| Status | Tessellate (const Path &path, const std::shared_ptr< Context > &context, BufferView vertex_buffer, BufferView vertex_buffer_count, const CommandBuffer::CompletionCallback &callback=nullptr) const |
| Generates triangles from the path. If the data needs to be synchronized back to the CPU, e.g. because one of the buffer views are host visible and will be used without creating a blit pass to copy them back, the callback is used to determine when the GPU calculation is complete and its status. On Metal, no additional synchronization is needed as long as the buffers are not heap allocated, so no additional synchronization mechanism is provided. More... | |
Static Public Attributes | |
| static constexpr size_t | kMaxCubicCount = 512 |
| static constexpr size_t | kMaxQuadCount = 2048 |
| static constexpr size_t | kMaxLineCount = 4096 |
| static constexpr size_t | kMaxComponentCount |
A utility that generates triangles of the specified fill type given a path.
Definition at line 19 of file compute_tessellator.h.
|
strong |
| Enumerator | |
|---|---|
| kCommandInvalid | |
| kTooManyComponents | |
| kOk | |
Definition at line 31 of file compute_tessellator.h.
|
strong |
| Enumerator | |
|---|---|
| kStroke | |
Definition at line 37 of file compute_tessellator.h.
|
default |
|
default |
| ComputeTessellator & impeller::ComputeTessellator::SetCubicAccuracy | ( | Scalar | value | ) |
Definition at line 52 of file compute_tessellator.cc.
| ComputeTessellator & impeller::ComputeTessellator::SetMiterLimit | ( | Scalar | value | ) |
Definition at line 48 of file compute_tessellator.cc.
| ComputeTessellator & impeller::ComputeTessellator::SetQuadraticTolerance | ( | Scalar | value | ) |
Definition at line 56 of file compute_tessellator.cc.
| ComputeTessellator & impeller::ComputeTessellator::SetStrokeCap | ( | Cap | value | ) |
Definition at line 44 of file compute_tessellator.cc.
| ComputeTessellator & impeller::ComputeTessellator::SetStrokeJoin | ( | Join | value | ) |
Definition at line 40 of file compute_tessellator.cc.
| ComputeTessellator & impeller::ComputeTessellator::SetStrokeWidth | ( | Scalar | value | ) |
Definition at line 35 of file compute_tessellator.cc.
Referenced by impeller::testing::TEST_P().
| ComputeTessellator & impeller::ComputeTessellator::SetStyle | ( | Style | value | ) |
Definition at line 30 of file compute_tessellator.cc.
| ComputeTessellator::Status impeller::ComputeTessellator::Tessellate | ( | const Path & | path, |
| const std::shared_ptr< Context > & | context, | ||
| BufferView | vertex_buffer, | ||
| BufferView | vertex_buffer_count, | ||
| const CommandBuffer::CompletionCallback & | callback = nullptr |
||
| ) | const |
Generates triangles from the path. If the data needs to be synchronized back to the CPU, e.g. because one of the buffer views are host visible and will be used without creating a blit pass to copy them back, the callback is used to determine when the GPU calculation is complete and its status. On Metal, no additional synchronization is needed as long as the buffers are not heap allocated, so no additional synchronization mechanism is provided.
Definition at line 61 of file compute_tessellator.cc.
References DEBUG_COMMAND_INFO, impeller::Path::EnumerateComponents(), impeller::Path::GetComponentCount(), kCommandInvalid, impeller::Path::kCubic, impeller::Path::kLinear, kMaxCubicCount, kMaxLineCount, kMaxQuadCount, kOk, impeller::Path::kQuadratic, kStroke, kTooManyComponents, and impeller::ComputeCommand::pipeline.
Referenced by impeller::testing::TEST_P().
|
staticconstexpr |
Definition at line 28 of file compute_tessellator.h.
|
staticconstexpr |
Definition at line 25 of file compute_tessellator.h.
Referenced by Tessellate().
|
staticconstexpr |
Definition at line 27 of file compute_tessellator.h.
Referenced by Tessellate().
|
staticconstexpr |
Definition at line 26 of file compute_tessellator.h.
Referenced by Tessellate().