Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/gfx/skia/skia/src/text/gpu/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  DistanceFieldAdjustTable.h

  Sprache: C
 

/*
 * Copyright 2015 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */


#ifndef sktext_gpu_DistanceFieldAdjustTable_DEFINED
#define sktext_gpu_DistanceFieldAdjustTable_DEFINED

#include "include/core/SkScalar.h"

template <typename T> class SkNoDestructor;

namespace sktext::gpu {

// Distance field text needs this table to compute a value for use in the fragment shader.
class DistanceFieldAdjustTable {
public:
    static const DistanceFieldAdjustTable* Get();

    ~DistanceFieldAdjustTable() {
        delete[] fTable;
        delete[] fGammaCorrectTable;
    }

    SkScalar getAdjustment(int lum, bool useGammaCorrectTable) const {
        lum >>= kDistanceAdjustLumShift;
        return useGammaCorrectTable ? fGammaCorrectTable[lum] : fTable[lum];
    }

private:
    DistanceFieldAdjustTable();

    static constexpr int kDistanceAdjustLumShift = 5;

    SkScalar* fTable;
    SkScalar* fGammaCorrectTable;

    friend class SkNoDestructor<DistanceFieldAdjustTable>;
};

}  // namespace sktext::gpu

#endif

Messung V0.5 in Prozent
C=95 H=92 G=93

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.