chromium/skia/ext/skcolorspace_trfn.cc

// Copyright 2023 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 "skia/ext/skcolorspace_trfn.h"

#include <cmath>

namespace skia {

namespace {

// Solve `y` = `alpha` * `x` for `alpha`. Return false if there is no
// solution, or the solution is 0.
bool GetLinearScale(float x, float y, float& alpha) {}

// Solve `y` = pow(`alpha`, 1/`g`) * `x` for `alpha`. Return false if
// there is no solution, or the solution is 0.
bool GetPowerScale(float x, float y, float g, float& alpha) {}

}  // namespace

skcms_TransferFunction ScaleTransferFunction(const skcms_TransferFunction& f,
                                             float alpha) {}

bool IsScaledTransferFunction(const skcms_TransferFunction& x,
                              const skcms_TransferFunction& y,
                              float* out_alpha) {}

}  // namespace skia