Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  SkVerticesPriv.h   Sprache: C

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


#ifndef SkVerticesPriv_DEFINED
#define SkVerticesPriv_DEFINED

#include "include/core/SkVertices.h"

#include "include/private/base/SkTo.h"

class SkReadBuffer;
class SkWriteBuffer;

struct SkVertices_DeprecatedBone { float values[6]; };

/** Class that adds methods to SkVertices that are only intended for use internal to Skia.
    This class is purely a privileged window into SkVertices. It should never have additional
    data members or virtual methods. */

class SkVerticesPriv {
public:
    SkVertices::VertexMode mode() const { return fVertices->fMode; }

    bool hasColors() const { return SkToBool(fVertices->fColors); }
    bool hasTexCoords() const { return SkToBool(fVertices->fTexs); }
    bool hasIndices() const { return SkToBool(fVertices->fIndices); }

    int vertexCount() const { return fVertices->fVertexCount; }
    int indexCount() const { return fVertices->fIndexCount; }

    const SkPoint* positions() const { return fVertices->fPositions; }
    const SkPoint* texCoords() const { return fVertices->fTexs; }
    const SkColor* colors() const { return fVertices->fColors; }
    const uint16_t* indices() const { return fVertices->fIndices; }

    // Never called due to RVO in priv(), but must exist for MSVC 2017.
    SkVerticesPriv(const SkVerticesPriv&) = default;

    void encode(SkWriteBuffer&) const;
    static sk_sp<SkVertices> Decode(SkReadBuffer&);

private:
    explicit SkVerticesPriv(SkVertices* vertices) : fVertices(vertices) {}
    SkVerticesPriv& operator=(const SkVerticesPriv&) = delete;

    // No taking addresses of this type
    const SkVerticesPriv* operator&() const = delete;
    SkVerticesPriv* operator&() = delete;

    SkVertices* fVertices;

    friend class SkVertices; // to construct this type
};

inline SkVerticesPriv SkVertices::priv() { return SkVerticesPriv(this); }

inline const SkVerticesPriv SkVertices::priv() const {  // NOLINT(readability-const-return-type)
    return SkVerticesPriv(const_cast<SkVertices*>(this));
}

#endif

Messung V0.5
C=98 H=90 G=94

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge