Namespaces

Enumerations

enum class 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 RunPromise (async_dispatcher_t * dispatcher, fit::function<void ()> run, fpromise::promise<> promise)

    Runs the given promise and waits for it to complete.

    Return true if result is_ok().

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

  • bool CmpFloatingValues (float num1, float num2)

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

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

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

  • zx_koid_t ExtractKoid (const fuchsia_ui_views::ViewRef & view_ref)

    Defined at line 39 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

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

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

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

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

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

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

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

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

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

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

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

  • bool RunPromise (async::Executor & executor, fit::function<void (bool &)> run_until, fpromise::promise<> promise)

    Runs the given promise on an executor and waits for it to complete.

    Return true if result is_ok().

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

  • template <typename Loop>
    bool RunPromise (Loop & loop, fpromise::promise<> promise)

    Runs the given promise on a new executor and waits for it to complete.

    Return true if result is_ok().

    Defined at line 23 of file ../../src/ui/scenic/tests/utils/promise.h

  • OnCloseHandler FailOnClose (const char * what)

    Returns an OnCloseHandler that fails the current test. For clients whose

    channel is never expected to close.

    Defined at line 24 of file ../../src/ui/scenic/tests/utils/simple_watcher_client.h

  • void GenerateImageForFlatlandInstance (uint32_t buffer_collection_index, FlatlandClientWithEventHandler & flatland, fuchsia_ui_composition::TransformId parent_transform, fuchsia_ui_composition::BufferCollectionImportToken import_token, fuchsia_math::SizeU size, fuchsia_math::Vec translation, uint32_t image_id, uint32_t transform_id)

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

  • fuchsia_sysmem2::BufferCollectionConstraints GetDefaultBufferConstraints ()

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

  • (lambda at ../../src/ui/scenic/tests/utils/promise.h:36:10) ReturnPromise (fpromise::result<> result)

    Returns a matcher for use with GMock. Specifically, this matches returns a promise that is

    already resolved with the given result.

    Defined at line 35 of file ../../src/ui/scenic/tests/utils/promise.h

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

    |glm::angleAxis|.

    Defined at line 70 of file ../../src/ui/scenic/tests/utils/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)

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

    |ui_testing::Screenshot|. |width| and |height| refer to the expected width and height of the

    display.

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

  • ui_testing::Screenshot TakeFileScreenshot (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 99 of file ../../src/ui/scenic/tests/utils/utils.cc

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

    Parse buffer to string.

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

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

    Parse buffer to json object. Exception when parsing failed.

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

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

    Defined at line 45 of file ../../src/ui/scenic/tests/flatland_integration_tests/flatland_pixeltest.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 54 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

  • void WriteToSysmemBuffer (const std::vector<uint8_t> & write_values, const 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 60 of file ../../src/ui/scenic/tests/utils/screen_capture_utils.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

  • fuchsia_sysmem2::BufferCollectionInfo CreateBufferCollectionInfoWithConstraints (fuchsia_sysmem2::BufferCollectionConstraints constraints, fuchsia_ui_composition::BufferCollectionExportToken export_token, fidl::SyncClient<fuchsia_ui_composition::Allocator> & flatland_allocator, fidl::WireClient<fuchsia_sysmem2::Allocator> & sysmem_allocator, fuchsia_ui_composition::RegisterBufferCollectionUsages usage)

    Defined at line 103 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 119 of file ../../src/ui/scenic/tests/observer_integration_tests/observer_registry_integration_test.cc

  • bool CheckViewExistsInSnapshot (const fuog::ViewTreeSnapshot & snapshot, zx_koid_t view_ref_koid)

    Defined at line 123 of file ../../src/ui/scenic/tests/observer_integration_tests/scoped_observer_registry_integration_test.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 136 of file ../../src/ui/scenic/tests/observer_integration_tests/scoped_observer_registry_integration_test.cc

  • std::vector<uint8_t> ExtractScreenCapture (uint32_t buffer_id, const 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 160 of file ../../src/ui/scenic/tests/utils/screen_capture_utils.cc