chromium/ui/ozone/platform/wayland/common/wayland_util.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ui/ozone/platform/wayland/common/wayland_util.h"

#include <xdg-shell-client-protocol.h>

#include "build/buildflag.h"
#include "third_party/skia/include/core/SkPath.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/base/hit_test.h"
#include "ui/events/base_event_utils.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "ui/gfx/geometry/transform.h"
#include "ui/ozone/platform/wayland/host/wayland_connection.h"
#include "ui/ozone/platform/wayland/host/wayland_shm_buffer.h"
#include "ui/ozone/platform/wayland/host/wayland_surface.h"
#include "ui/ozone/platform/wayland/host/wayland_window.h"

namespace wl {

namespace {

const SkColorType kColorType =;

}  // namespace

uint32_t IdentifyDirection(int hittest) {}

bool DrawBitmap(const SkBitmap& bitmap, ui::WaylandShmBuffer* out_buffer) {}

void ReadDataFromFD(base::ScopedFD fd, std::vector<uint8_t>* contents) {}

gfx::Rect TranslateBoundsToParentCoordinates(const gfx::Rect& child_bounds,
                                             const gfx::Rect& parent_bounds) {}

gfx::RectF TranslateBoundsToParentCoordinatesF(
    const gfx::RectF& child_bounds,
    const gfx::RectF& parent_bounds) {}

gfx::Rect TranslateBoundsToTopLevelCoordinates(const gfx::Rect& child_bounds,
                                               const gfx::Rect& parent_bounds) {}

wl_output_transform ToWaylandTransform(gfx::OverlayTransform transform) {}

gfx::RectF ApplyWaylandTransform(const gfx::RectF& rect,
                                 const gfx::SizeF& bounds,
                                 wl_output_transform transform) {}

gfx::Rect ApplyWaylandTransform(const gfx::Rect& rect,
                                const gfx::Size& bounds,
                                wl_output_transform transform) {}

gfx::SizeF ApplyWaylandTransform(const gfx::SizeF& size,
                                 wl_output_transform transform) {}

ui::WaylandWindow* RootWindowFromWlSurface(wl_surface* surface) {}

gfx::Rect TranslateWindowBoundsToParentDIP(ui::WaylandWindow* window,
                                           ui::WaylandWindow* parent_window) {}

std::vector<gfx::Rect> CreateRectsFromSkPath(const SkPath& path) {}

SkPath ConvertPathToDIP(const SkPath& path_in_pixels, float scale) {}

void SkColorToWlArray(const SkColor& color, wl_array& array) {}

void SkColorToWlArray(const SkColor4f& color, wl_array& array) {}

void TransformToWlArray(
    const absl::variant<gfx::OverlayTransform, gfx::Transform>& transform,
    wl_array& array) {}

base::TimeTicks EventMillisecondsToTimeTicks(uint32_t milliseconds) {}

float ClampScale(float scale) {}

bool MaybeHandlePlatformEventForDrag(const ui::PlatformEvent& event,
                                     bool start_drag_ack_received,
                                     base::OnceClosure cancel_drag_cb) {}

}  // namespace wl