chromium/ui/display/display.cc

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

#include "ui/display/display.h"

#include <algorithm>

#include "base/command_line.h"
#include "base/containers/contains.h"
#include "base/logging.h"
#include "base/no_destructor.h"
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "ui/display/display_switches.h"
#include "ui/display/util/display_util.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/transform.h"
#include "ui/gfx/icc_profile.h"

namespace display {
namespace {

// This variable tracks whether the forced device scale factor switch needs to
// be read from the command line, i.e. if it is set to -1 then the command line
// is checked.
int g_has_forced_device_scale_factor =;

// This variable caches the forced device scale factor value which is read off
// the command line. If the cache is invalidated by setting this variable to
// -1.0, we read the forced device scale factor again.
float g_forced_device_scale_factor =;

// An allowance error epsilon caused by fractional scale factor to produce
// expected DP display size.
constexpr float kDisplaySizeAllowanceEpsilon =;

bool HasForceDeviceScaleFactorImpl() {}

float GetForcedDeviceScaleFactorImpl() {}

const char* ToRotationString(display::Display::Rotation rotation) {}

}  // namespace

// static
float Display::GetForcedDeviceScaleFactor() {}

// static
bool Display::HasForceDeviceScaleFactor() {}

// static
void Display::ResetForceDeviceScaleFactorForTesting() {}

// static
void Display::SetForceDeviceScaleFactor(double dsf) {}

// static
gfx::ColorSpace Display::GetForcedRasterColorProfile() {}

// static
bool Display::HasForceRasterColorProfile() {}

// static
bool Display::HasEnsureForcedColorProfile() {}

// static
display::Display::Rotation Display::DegreesToRotation(int degrees) {}

// static
int Display::RotationToDegrees(display::Display::Rotation rotation) {}

// static
bool Display::IsValidRotation(int degrees) {}

Display::Display() :{}

Display::Display(int64_t id) :{}

Display::Display(int64_t id, const gfx::Rect& bounds)
    :{}

Display::Display(const Display& other) = default;

Display::~Display() {}

// static
Display Display::GetDefaultDisplay() {}

int Display::RotationAsDegree() const {}

const gfx::DisplayColorSpaces& Display::GetColorSpaces() const {}

void Display::SetColorSpaces(const gfx::DisplayColorSpaces& color_spaces) {}

void Display::SetRotationAsDegree(int rotation) {}

int Display::PanelRotationAsDegree() const {}

gfx::Rect Display::GetLocalWorkArea() const {}

gfx::Insets Display::GetWorkAreaInsets() const {}

void Display::SetScaleAndBounds(float device_scale_factor,
                                const gfx::Rect& bounds_in_pixel) {}

void Display::SetScale(float device_scale_factor) {}

void Display::SetSize(const gfx::Size& size_in_pixel) {}

void Display::UpdateWorkAreaFromInsets(const gfx::Insets& insets) {}

gfx::Size Display::GetSizeInPixel() const {}

std::string Display::ToString() const {}

bool Display::IsInternal() const {}

// static
int64_t Display::InternalDisplayId() {}

bool Display::operator==(const Display& rhs) const {}

// static
bool Display::EqualExceptForHdrHeadroom(const Display& lhs,
                                        const Display& rhs) {}

void Display::SetDisplayColorSpacesRef(
    scoped_refptr<const DisplayColorSpacesRef> color_spaces) {}

scoped_refptr<const Display::DisplayColorSpacesRef>
Display::GetDefaultDisplayColorSpacesRef() {}

}  // namespace display