Namespaces
Records
-
class CleanupUntilDone -
class CleanupUntilDone_CleansUpImmediately_Test -
class CleanupUntilDone_DoesntCleanUpImmediately_Test -
class CleanupUntilDone_SchedulesTasksUntilDone_Test -
class DispatcherHolder -
class LoopDispatcherHolder -
class NegativeInfinity -
class ObjectLinker -
class ObjectLinkerBase -
class Pixel -
class PositiveInfinity -
class RangeInclusive -
class SysmemTokens -
class SysmemTokensHlcpp -
class UnownedDispatcherHolder
Functions
-
glm::vec4 Homogenize (const glm::vec4 & vector)Homogenizes |vector|. Does not perform safety checks beyond if vector.w == 0.
Defined at line 9 of file ../../src/ui/scenic/lib/utils/math.cc
-
bool validate_eventpair (const zx::eventpair & a_object, zx_rights_t a_rights, const zx::eventpair & b_object, zx_rights_t b_rights)True IFF eventpairs are valid, are peers, and have expected rights.
Defined at line 11 of file ../../src/ui/scenic/lib/utils/validate_eventpair.cc
-
template <typename T, size_t N>const fidl::Array<T, N> & ReinterpretStdArrayAsFidlArray (const std::array<T, N> & std_array)Defined at line 15 of file ../../src/ui/scenic/lib/utils/fidl_array_cast.h
-
fpromise::promise<> sleep_for_a_little_while ()Returns a task that completes a little later.
Used by examples to simulate the passage of time in asynchronous logic.
Defined at line 16 of file ../../sdk/lib/fit-promise/tests/examples/utils.cc
-
std::vector<escher::SamplerPtr> ImmutableSamplersForShaderWarmup (escher::EscherWeakPtr escher, vk::Filter filter)Generate a list of immutable samplers for combinations of YUV formats and color spaces that are
supported by Flatland and GFX. These can be used for shader warm-up, and are also stashed in
Escher's sampler cache.
Defined at line 42 of file ../../src/ui/scenic/lib/utils/shader_warmup.cc
-
glm::vec2 TransformPointerCoords (const glm::vec2 & pointer, const glm::mat4 & transform)Applies |transform| to |pointer| by converting it to 3D and back again.
Defined at line 16 of file ../../src/ui/scenic/lib/utils/math.cc
-
void ExecuteOrPostTaskOnDispatcher (async_dispatcher_t * dispatcher, fit::closure handler)If `dispatcher` is the current dispatcher, invoke the `handler` closure immediately. Otherwise,
post a task to invoke `handler`.
Defined at line 17 of file ../../src/ui/scenic/lib/utils/task_utils.h
-
uint8_t LinearToSrgb (const float val)Defined at line 20 of file ../../src/ui/scenic/lib/utils/pixel.cc
-
escher::EscherUniquePtr CreateEscher (sys::ComponentContext * app_context)Defined at line 24 of file ../../src/ui/scenic/lib/utils/escher_provider.cc
-
zx_time_t dispatcher_clock_now ()Obtain the default dispatcher's notion of timestamp "now" in Scenic. This
function also helps to reduce clutter and boilerplate.
It devolves to zx_clock_get_monotonic() for non-test execution, but uses an
alternate timebase in test situations, which reduces test flakes.
To get it as zx::time, just wrap the result with zx::time().
If you have a specific dispatcher you'd like to use, then request the time
directly from that dispatcher. E.g.,
zx_time_t now = async_now(dispatcher);
zx::time now = async::Now(dispatcher);
Defined at line 27 of file ../../src/ui/scenic/lib/utils/time.h
-
void resume_in_a_little_while (fpromise::suspended_task task)Resumes the task after some time has elapsed.
Used by examples to simulate the passage of time in asynchronous logic.
Defined at line 27 of file ../../sdk/lib/fit-promise/tests/examples/utils.cc
-
std::ostream & operator<< (std::ostream & os, const zx::time value)Defined at line 29 of file ../../src/ui/scenic/lib/utils/time.h
-
template <typename T, size_t N>const std::array<T, N> & ReinterpretFidlArrayAsStdArray (const fidl::Array<T, N> & fidl_array)Defined at line 29 of file ../../src/ui/scenic/lib/utils/fidl_array_cast.h
-
std::ostream & operator<< (std::ostream & os, const zx::duration value)Defined at line 33 of file ../../src/ui/scenic/lib/utils/time.h
-
VkBool32 HandleDebugUtilsMessage (VkDebugUtilsMessageSeverityFlagBitsEXT message_severity, VkDebugUtilsMessageTypeFlagsEXT message_types, const VkDebugUtilsMessengerCallbackDataEXT * callback_data, void * user_data)Defined at line 114 of file ../../src/ui/scenic/lib/utils/escher_provider.cc
-
bool validate_viewref (const fuchsia::ui::views::ViewRefControl & control_ref, const fuchsia::ui::views::ViewRef & view_ref)True IFF ViewRefControl and ViewRef are valid, are peers, and have expected
rights.
- The control ref is expected to have ZX_DEFAULT_EVENTPAIR_RIGHTS.
- The view ref is expected to have ZX_RIGHTS_BASIC.
Defined at line 62 of file ../../src/ui/scenic/lib/utils/validate_eventpair.cc
-
bool validate_viewref (const fuchsia_ui_views::ViewRefControl & control_ref, const fuchsia_ui_views::ViewRef & view_ref)Defined at line 67 of file ../../src/ui/scenic/lib/utils/validate_eventpair.cc
-
std::array<float, 9> Mat4ToColumnMajorMat3Array (const glm::mat4 & mat)Converts a glm::mat4 to an array of a mat3 in column major order by shaving off the third row
and column. This is valid for 2D-in-3D transforms affecting the xy-plane (i.e. how 2D content is
handled in GFX).
Mat4 Mat3 array
[ 1 2 3 4 ] [ 1 2 4 ]
[ 5 6 7 8 ] -> [ 5 6 8 ] -> [ 1 5 13 2 6 14 4 8 16 ]
[ 9 10 11 12 ] [ 13 14 16 ]
[ 13 14 15 16 ]
Defined at line 23 of file ../../src/ui/scenic/lib/utils/math.cc
-
glm::mat4 ColumnMajorMat3ArrayToMat4 (const std::array<float, 9> & matrix_array)Transforms a column major mat3 in array format to a glm::mat4.
It is the inverse operation of Mat4ToColumnMajorMat3Array().
Defined at line 28 of file ../../src/ui/scenic/lib/utils/math.cc
-
zx_koid_t ExtractKoid (const fuchsia::ui::views::ViewRef & view_ref)Helper for extracting the koid from a ViewRef.
Defined at line 29 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
zx_koid_t ExtractKoid (const fuchsia_ui_views::ViewRef & view_ref)Defined at line 34 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
zx::event CreateEvent ()Create an unsignalled zx::event.
Defined at line 75 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
std::vector<zx::event> CreateEventArray (size_t n)Create a std::vector populated with |n| unsignalled zx::event elements.
Defined at line 82 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
std::vector<zx_koid_t> ExtractKoids (const std::vector<zx::event> & events)Create a std::vector populated with koids of the input vector of zx:event.
Defined at line 91 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
zx::event CopyEvent (const zx::event & event)Copy a zx::event.
Defined at line 49 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
zx::eventpair CopyEventpair (const zx::eventpair & eventpair)Copy a zx::eventpair.
Defined at line 54 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
std::vector<zx::event> CopyEventArray (const std::vector<zx::event> & events)Copy a std::vector of events.
Defined at line 59 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
bool IsEventSignalled (const zx::event & event, zx_signals_t signal)Synchronously checks whether the event has signalled any of the bits in |signal|.
Defined at line 69 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
template <std::size_t Dim>std::string GetArrayString (const std::string & name, const std::array<float, Dim> & array)Defined at line 73 of file ../../src/ui/scenic/lib/utils/helpers.h
-
fuchsia::sysmem2::AllocatorSyncPtr CreateSysmemAllocatorSyncPtr (const std::string & debug_name_suffix)Create sysmem allocator.
Defined at line 104 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
SysmemTokensHlcpp CreateSysmemTokensHlcpp (fuchsia::sysmem2::Allocator_Sync * sysmem_allocator)Create local and dup tokens for sysmem.
Defined at line 125 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
SysmemTokens CreateSysmemTokens (fidl::SyncClient<fuchsia_sysmem2::Allocator> & sysmem_allocator)Defined at line 146 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
fuchsia::sysmem2::BufferCollectionConstraints CreateDefaultConstraints (uint32_t buffer_count, uint32_t kWidth, uint32_t kHeight, fuchsia::images2::PixelFormat format)Creates default constraints for |buffer_collection|
Defined at line 174 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
void PrettyPrintMat3 (std::string , const std::array<float, 9> & mat3)Prints in row-major order.
Defined at line 195 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
float GetOrientationAngle (fuchsia::ui::composition::Orientation orientation)Defined at line 203 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
float GetOrientationAngle (fuchsia_ui_composition::Orientation orientation)Defined at line 216 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
uint32_t GetBytesPerPixel (const fuchsia::sysmem2::SingleBufferSettings & settings)Defined at line 250 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
uint32_t GetBytesPerPixel (const fuchsia::sysmem::SingleBufferSettings & settings)Defined at line 253 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
uint32_t GetBytesPerPixel (const fuchsia::sysmem2::ImageFormatConstraints & image_format_constraints)Defined at line 257 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
uint32_t GetBytesPerPixel (const fuchsia::sysmem::ImageFormatConstraints & image_format_constraints)Defined at line 270 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
uint32_t GetBytesPerRow (const fuchsia::sysmem2::SingleBufferSettings & settings, uint32_t image_width)Defined at line 277 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
std::ostream & operator<< (std::ostream & stream, const utils::Pixel & pixel)Defined at line 135 of file ../../src/ui/scenic/lib/utils/pixel.cc
-
uint32_t GetBytesPerRow (const fuchsia::sysmem::SingleBufferSettings & settings, uint32_t image_width)Defined at line 281 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
uint32_t GetBytesPerRow (const fuchsia::sysmem2::ImageFormatConstraints & image_format_constraints, uint32_t image_width)Defined at line 286 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
uint32_t GetBytesPerRow (const fuchsia::sysmem::ImageFormatConstraints & image_format_constraints, uint32_t image_width)Defined at line 291 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
uint32_t GetPixelsPerRow (const fuchsia::sysmem2::SingleBufferSettings & settings, uint32_t image_width)Defined at line 297 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
uint32_t GetPixelsPerRow (const fuchsia::sysmem::SingleBufferSettings & settings, uint32_t image_width)Defined at line 302 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
uint32_t GetPixelsPerRow (const fuchsia::sysmem2::ImageFormatConstraints & image_format_constraints, uint32_t image_width)Defined at line 307 of file ../../src/ui/scenic/lib/utils/helpers.cc
-
uint32_t GetPixelsPerRow (const fuchsia::sysmem::ImageFormatConstraints & image_format_constraintsuint32_t image_width)Defined at line 312 of file ../../src/ui/scenic/lib/utils/helpers.cc
Typedefs
using SysmemTokensHlcpp =
Defined at line 20 of file ../../src/ui/scenic/lib/utils/helpers.h
using SysmemTokens =
Defined at line 25 of file ../../src/ui/scenic/lib/utils/helpers.h