#include "ui/ozone/platform/wayland/host/wayland_output.h"
#include <aura-shell-client-protocol.h>
#include <chrome-color-management-client-protocol.h>
#include <xdg-output-unstable-v1-client-protocol.h>
#include "base/logging.h"
#include "base/strings/string_util.h"
#include "ui/display/display.h"
#include "ui/gfx/color_space.h"
#include "ui/ozone/platform/wayland/host/dump_util.h"
#include "ui/ozone/platform/wayland/host/wayland_connection.h"
#include "ui/ozone/platform/wayland/host/wayland_output_manager.h"
#include "ui/ozone/platform/wayland/host/wayland_zcr_color_management_output.h"
#include "ui/ozone/platform/wayland/host/wayland_zcr_color_manager.h"
#include "ui/ozone/platform/wayland/host/xdg_output.h"
namespace ui {
namespace {
constexpr uint32_t kMinVersion = …;
constexpr uint32_t kMaxVersion = …;
}
Metrics;
constexpr char WaylandOutput::kInterfaceName[];
void WaylandOutput::Instantiate(WaylandConnection* connection,
wl_registry* registry,
uint32_t name,
const std::string& interface,
uint32_t version) { … }
Metrics::Metrics() = default;
Metrics::Metrics(Id output_id,
int64_t display_id,
gfx::Point origin,
gfx::Size logical_size,
gfx::Size physical_size,
gfx::Insets insets,
gfx::Insets physical_overscan_insets,
float scale_factor,
int32_t panel_transform,
int32_t logical_transform,
const std::string& description)
: … { … }
Metrics::Metrics(const Metrics&) = default;
Metrics& Metrics::operator=(const Metrics&) = default;
Metrics::Metrics(Metrics&&) = default;
Metrics& Metrics::operator=(Metrics&&) = default;
Metrics::~Metrics() = default;
void Metrics::DumpState(std::ostream& out) const { … }
WaylandOutput::WaylandOutput(Id output_id,
wl_output* output,
WaylandConnection* connection)
: … { … }
WaylandOutput::~WaylandOutput() { … }
void WaylandOutput::InitializeXdgOutput(
zxdg_output_manager_v1* xdg_output_manager) { … }
void WaylandOutput::InitializeColorManagementOutput(
WaylandZcrColorManager* zcr_color_manager) { … }
void WaylandOutput::Initialize(Delegate* delegate) { … }
float WaylandOutput::GetUIScaleFactor() const { … }
const Metrics& WaylandOutput::GetMetrics() const { … }
void WaylandOutput::SetMetrics(const Metrics& metrics) { … }
float WaylandOutput::scale_factor() const { … }
bool WaylandOutput::IsReady() const { … }
void WaylandOutput::SetScaleFactorForTesting(float scale_factor) { … }
void WaylandOutput::TriggerDelegateNotifications() { … }
void WaylandOutput::DumpState(std::ostream& out) const { … }
void WaylandOutput::UpdateMetrics() { … }
void WaylandOutput::OnGeometry(void* data,
wl_output* output,
int32_t x,
int32_t y,
int32_t physical_width,
int32_t physical_height,
int32_t subpixel,
const char* make,
const char* model,
int32_t output_transform) { … }
void WaylandOutput::OnMode(void* data,
wl_output* wl_output,
uint32_t flags,
int32_t width,
int32_t height,
int32_t refresh) { … }
void WaylandOutput::OnDone(void* data, wl_output* output) { … }
void WaylandOutput::OnScale(void* data, wl_output* output, int32_t factor) { … }
void WaylandOutput::OnName(void* data, wl_output* output, const char* name) { … }
void WaylandOutput::OnDescription(void* data,
wl_output* output,
const char* description) { … }
}