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 1 kB image not shown  

Quelle  SkPixmapUtilsPriv.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 SkPixmapUtilsPriv_DEFINED
#define SkPixmapUtilsPriv_DEFINED

#include "include/codec/SkEncodedOrigin.h"
#include "include/codec/SkPixmapUtils.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkPixmap.h"
#include "src/core/SkAutoPixmapStorage.h"

namespace SkPixmapUtils {

/**
 *  Decode an image and then copy into dst, applying origin.
 *
 *  @param dst SkPixmap to write the final image, after
 *      applying the origin.
 *  @param origin SkEncodedOrigin to apply to the raw pixels.
 *  @param decode Function for decoding into a pixmap without
 *      applying the origin.
 */


template <typename Fn>
bool Orient(const SkPixmap& dst, SkEncodedOrigin origin, Fn&& decode) {
    SkAutoPixmapStorage storage;
    const SkPixmap* tmp = &dst;
    if (origin != kTopLeft_SkEncodedOrigin) {
        auto info = dst.info();
        if (SkEncodedOriginSwapsWidthHeight(origin)) {
            info = SwapWidthHeight(info);
        }
        if (!storage.tryAlloc(info)) {
            return false;
        }
        tmp = &storage;
    }
    if (!decode(*tmp)) {
        return false;
    }
    if (tmp != &dst) {
        return Orient(dst, *tmp, origin);
    }
    return true;
}

}  // namespace SkPixmapUtils

#endif // SkPixmapUtilsPriv_DEFINED

Messung V0.5
C=94 H=100 G=96

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