Namespaces

Enumerations

enum TapLocation
Name Value
kTopLeft 0
kTopRight 1

Defined at line 56 of file ../../src/ui/tests/integration_graphics_tests/web-pixel-tests/web_runner_pixeltest.cc

Records

Functions

  • bool PointerMatches (const fuchsia::ui::input::PointerEvent & event, uint32_t pointer_id, fuchsia::ui::input::PointerEventPhase phase, float x, float y, fuchsia::ui::input::PointerEventType type, uint32_t buttons)

    Defined at line 69 of file ../../src/ui/scenic/tests/utils/utils.cc

  • void BlockingPresent (ui_testing::LoggingEventLoop * loop, FlatlandClientWithEventHandler & flatland, fuchsia_ui_composition::PresentArgs present_args, cpp20::source_location )

    Invokes `flatland->Present()` and then uses `loop` to loop until

    1. Scenic indicates that the frame has been presented.

    2. Scenic indicates that the flatland client can begin rendering the next frame.

    Note: temporarily sets `Flatland` event handlers for `OnFramePresented` and `OnNextFrameBegin`,

    and resets them afterward.

    Defined at line 9 of file ../../src/ui/scenic/tests/utils/blocking_present.cc

  • bool CmpFloatingValues (float num1, float num2)

    Defined at line 105 of file ../../src/ui/scenic/tests/utils/utils.cc

  • zx_koid_t ExtractKoid (const zx::object_base & object)

    Defined at line 110 of file ../../src/ui/scenic/tests/utils/utils.cc

  • zx_koid_t ExtractKoid (const fuchsia::ui::views::ViewRef & view_ref)

    Defined at line 119 of file ../../src/ui/scenic/tests/utils/utils.cc

  • void BlockingPresent (ui_testing::LoggingEventLoop * loop, fuchsia::ui::composition::FlatlandPtr & flatland, fuchsia::ui::composition::PresentArgs present_args, cpp20::source_location )

    TODO(https://fxbug.dev/447603809): deprecated HLCPP version of `BlockingPresent()`.

    Defined at line 35 of file ../../src/ui/scenic/tests/utils/blocking_present.cc

  • bool PixelEquals (const uint8_t * a, const uint8_t * b)

    Defined at line 21 of file ../../src/ui/scenic/tests/utils/screen_capture_utils.cc

  • Mat3 ArrayToMat3 (std::array<float, 9> array)

    Defined at line 123 of file ../../src/ui/scenic/tests/utils/utils.cc

  • void AppendPixel (std::vector<uint8_t> * values, const uint8_t * pixel)

    Defined at line 23 of file ../../src/ui/scenic/tests/utils/screen_capture_utils.cc

  • bool ViewExistsInSnapshot (const fuog_ViewTreeSnapshot & snapshot, zx_koid_t view_ref_koid)

    Defined at line 129 of file ../../src/ui/scenic/tests/observer_integration_tests/observer_registry_integration_test.cc

  • Vec3 operator* (const Mat3 & mat, const Vec3 & vec)

    Matrix multiplication between a 1X3 matrix and 3X3 matrix.

    Defined at line 133 of file ../../src/ui/scenic/tests/utils/utils.cc

  • void GenerateImageForFlatlandInstance (uint32_t buffer_collection_index, fuchsia::ui::composition::FlatlandPtr & flatland, TransformId parent_transform, fuchsia::ui::composition::BufferCollectionImportToken import_token, SizeU size, Vec translation, uint32_t image_id, uint32_t transform_id)

    Defined at line 27 of file ../../src/ui/scenic/tests/utils/screen_capture_utils.cc

  • std::vector<fuog_ViewTreeSnapshot>::const_iterator GetFirstSnapshotWithView (const std::vector<fuog_ViewTreeSnapshot> & updates, zx_koid_t view_ref_koid)

    Returns the iterator to the first fuog_ViewTreeSnapshot in |updates| having |view_ref_koid|

    present.

    Defined at line 138 of file ../../src/ui/scenic/tests/observer_integration_tests/observer_registry_integration_test.cc

  • Vec3 & operator/ (Vec3 & vec, float num)

    Defined at line 143 of file ../../src/ui/scenic/tests/utils/utils.cc

  • Vec4 angleAxis (float angle, const Vec3 & vec)

    |glm::angleAxis|.

    Defined at line 150 of file ../../src/ui/scenic/tests/utils/utils.cc

  • void WriteToSysmemBuffer (const std::vector<uint8_t> & write_values, fuchsia::sysmem2::BufferCollectionInfo & buffer_collection_info, uint32_t buffer_collection_idx, uint32_t kBytesPerPixel, uint32_t image_width, uint32_t image_height)

    This method writes to a sysmem buffer, taking into account any potential stride width

    differences. The method also flushes the cache if the buffer is in RAM domain.

    Defined at line 53 of file ../../src/ui/scenic/tests/utils/screen_capture_utils.cc

  • ui_testing::Screenshot TakeScreenshot (const fuchsia::ui::composition::ScreenshotSyncPtr & screenshotter, uint64_t width, uint64_t height, fuchsia::ui::composition::ScreenshotFormat format, int display_rotation)

    Takes a screenshot using the |fuchsia.ui.composition.Screenshot| and wraps it around a

    |ui_testing::Screenshot|. This function can only be used after |RealmRoot::ConnectSync| is called

    for the |screenshotter|. |width| and |height| refer to the expected width and height of the

    display.

    Defined at line 159 of file ../../src/ui/scenic/tests/utils/utils.cc

  • fuchsia::sysmem2::BufferCollectionInfo CreateBufferCollectionInfoWithConstraints (fuchsia::sysmem2::BufferCollectionConstraints constraints, fuchsia::ui::composition::BufferCollectionExportToken export_token, fuchsia::ui::composition::Allocator_Sync * flatland_allocator, fuchsia::sysmem2::Allocator_Sync * sysmem_allocator, RegisterBufferCollectionUsages usage)

    Defined at line 94 of file ../../src/ui/scenic/tests/utils/screen_capture_utils.cc

  • ui_testing::Screenshot TakeScreenshot (const fidl::SyncClient<fuchsia_ui_composition::Screenshot> & screenshotter, uint64_t width, uint64_t height, fuchsia_ui_composition::ScreenshotFormat format, int display_rotation)

    Defined at line 177 of file ../../src/ui/scenic/tests/utils/utils.cc

  • std::vector<uint8_t> ExtractScreenCapture (uint32_t buffer_id, fuchsia::sysmem2::BufferCollectionInfo & buffer_collection_info, uint32_t kBytesPerPixel, uint32_t render_target_width, uint32_t render_target_height)

    This function returns a linear buffer of pixels of size width * height.

    Defined at line 141 of file ../../src/ui/scenic/tests/utils/screen_capture_utils.cc

  • ui_testing::Screenshot TakeFileScreenshot (const fuchsia::ui::composition::ScreenshotSyncPtr & screenshotter, uint64_t width, uint64_t height, fuchsia::ui::composition::ScreenshotFormat format, int display_rotation)

    Defined at line 197 of file ../../src/ui/scenic/tests/utils/utils.cc

  • std::string StringFromBuffer (const fuchsia_mem::Buffer & buffer)

    Parse buffer to string.

    Defined at line 30 of file ../../src/ui/tests/integration_input_tests/web-test-base/web-app-base.cc

  • fuc::ColorRgba GetColorInFloat (utils::Pixel color)

    Defined at line 34 of file ../../src/ui/scenic/tests/flatland_integration_tests/flatland_pixeltest.cc

  • fuchsia::sysmem2::BufferCollectionConstraints GetDefaultBufferConstraints ()

    Defined at line 35 of file ../../src/ui/scenic/tests/flatland_integration_tests/flatland_allocation_test.cc

  • rapidjson::Document JsonFromBuffer (const fuchsia_mem::Buffer & buffer)

    Parse buffer to json object. Exception when parsing failed.

    Defined at line 37 of file ../../src/ui/tests/integration_input_tests/web-test-base/web-app-base.cc

  • void CompareColor (utils::Pixel actual, utils::Pixel expected)

    Asserts whether the BGRA channel value difference between |actual| and |expected| is at most

    |kEpsilon|.

    Defined at line 41 of file ../../src/ui/scenic/tests/flatland_integration_tests/flatland_pixeltest.cc

  • double Dot (const utils::Pixel & v, const utils::Pixel & u)

    A dot product of the coordinates of two pixels.

    Defined at line 59 of file ../../src/ui/tests/integration_graphics_tests/web-pixel-tests/web_runner_pixeltest.cc

  • double Project (const utils::Pixel & v, const utils::Pixel & dir)

    Project v along the direction d. d != 0.

    Defined at line 65 of file ../../src/ui/tests/integration_graphics_tests/web-pixel-tests/web_runner_pixeltest.cc

  • double MaxSumProject (const utils::Pixel & v, const std::vector<std::pair<uint32_t, utils::Pixel>> & h)

    Maximal sum of projections of pixels in h along the vector of pixel v.

    The idea is that at least some of the pixels in the histogram will be dominantly

    in the direction of the pixel v. But they don't need to be *exactly* in that

    direction, we're fine with an approximate direction. This accounts for variations

    in nuance up to a point. Should be enough for this test.

    Defined at line 78 of file ../../src/ui/tests/integration_graphics_tests/web-pixel-tests/web_runner_pixeltest.cc

  • std::array<float, 2> TransformPointerCoords (std::array<float, 2> pointer, const Mat3 & transform)

    Defined at line 93 of file ../../src/ui/scenic/tests/flatland_integration_tests/flatland_mouse_integration_test.cc

  • void ExpectEqualPointer (const fuchsia::ui::pointer::MousePointerSample & pointer_sample, const std::array<float, 9> & viewport_to_view_transform, float expected_x, float expected_y, std::optional<int64_t> expected_scroll_v, std::optional<int64_t> expected_scroll_h, std::vector<uint8_t> expected_buttons, uint32_t line_number)

    Defined at line 101 of file ../../src/ui/scenic/tests/flatland_integration_tests/flatland_mouse_integration_test.cc

  • bool CheckViewExistsInSnapshot (const fuog_ViewTreeSnapshot & snapshotzx_koid_t view_ref_koid)

    Defined at line 133 of file ../../src/ui/scenic/tests/observer_integration_tests/scoped_observer_registry_integration_test.cc