#include "ui/ozone/platform/wayland/host/wayland_zcr_color_manager.h"
#include <chrome-color-management-client-protocol.h>
#include <memory>
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/memory/scoped_refptr.h"
#include "third_party/skia/include/core/SkColorSpace.h"
#include "ui/base/wayland/color_manager_util.h"
#include "ui/gfx/color_space.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_space_creator.h"
#include "ui/ozone/platform/wayland/wayland_utils.h"
namespace ui {
namespace {
constexpr uint32_t kMinVersion = …;
constexpr uint32_t kMaxVersion = …;
}
constexpr char WaylandZcrColorManager::kInterfaceName[];
void WaylandZcrColorManager::Instantiate(WaylandConnection* connection,
wl_registry* registry,
uint32_t name,
const std::string& interface,
uint32_t version) { … }
void WaylandZcrColorManager::PreloadCommonColorSpaces() { … }
WaylandZcrColorManager::WaylandZcrColorManager(
zcr_color_manager_v1* zcr_color_manager,
WaylandConnection* connection)
: … { … }
WaylandZcrColorManager::~WaylandZcrColorManager() = default;
void WaylandZcrColorManager::OnColorSpaceCreated(
gfx::ColorSpace color_space,
scoped_refptr<WaylandZcrColorSpace> zcr_color_space,
std::optional<uint32_t> error) { … }
wl::Object<zcr_color_space_creator_v1>
WaylandZcrColorManager::CreateZcrColorSpaceCreator(
const gfx::ColorSpace& color_space) { … }
scoped_refptr<WaylandZcrColorSpace> WaylandZcrColorManager::GetColorSpace(
const gfx::ColorSpace& color_space) { … }
wl::Object<zcr_color_management_output_v1>
WaylandZcrColorManager::CreateColorManagementOutput(wl_output* output) { … }
wl::Object<zcr_color_management_surface_v1>
WaylandZcrColorManager::CreateColorManagementSurface(wl_surface* surface) { … }
}