Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/gfx/skia/skia/src/codec/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 2 kB image not shown  

Quelle  SkMaskSwizzler.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 SkMaskSwizzler_DEFINED
#define SkMaskSwizzler_DEFINED

#include "include/codec/SkCodec.h"
#include "include/core/SkTypes.h"
#include "src/codec/SkSampler.h"

#include <cstdint>

class SkMasks;
struct SkImageInfo;

/*
 *
 * Used to swizzle images whose pixel components are extracted by bit masks
 * Currently only used by bmp
 *
 */

class SkMaskSwizzler : public SkSampler {
public:

    /*
     * @param masks Unowned pointer to helper class
     */

    static SkMaskSwizzler* CreateMaskSwizzler(const SkImageInfo& dstInfo,
                                              bool srcIsOpaque,
                                              SkMasks* masks,
                                              uint32_t bitsPerPixel,
                                              const SkCodec::Options& options);

    /*
     * Swizzle a row
     */

    void swizzle(void* dst, const uint8_t* SK_RESTRICT src);

    int fillWidth() const override {
        return fDstWidth;
    }

    /**
     *  Returns the byte offset at which we write to destination memory, taking
     *  scaling, subsetting, and partial frames into account.
     *  A similar function exists on SkSwizzler.
     */

    int swizzleWidth() const { return fDstWidth; }

private:

    /*
     * Row procedure used for swizzle
     */

    typedef void (*RowProc)(void* dstRow, const uint8_t* srcRow, int width,
            SkMasks* masks, uint32_t startX, uint32_t sampleX);

    SkMaskSwizzler(SkMasks* masks, RowProc proc, int subsetWidth, int srcOffset);

    int onSetSampleX(int) override;

    SkMasks*        fMasks;           // unowned
    const RowProc   fRowProc;

    // FIXME: Can this class share more with SkSwizzler? These variables are all the same.
    const int       fSubsetWidth;     // Width of the subset of source before any sampling.
    int             fDstWidth;        // Width of dst, which may differ with sampling.
    int             fSampleX;
    int             fSrcOffset;
    int             fX0;
};

#endif

Messung V0.5
C=97 H=99 G=97

¤ Dauer der Verarbeitung: 0.10 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.