![]() |
Qt 6.x
The Qt SDK
|
#include <QtQuick/private/qquickpixmapcache_p.h>#include <QtQuick/private/qquickimageprovider_p.h>#include <QtQuick/private/qquickprofiler_p.h>#include <QtQuick/private/qsgcontext_p.h>#include <QtQuick/private/qsgrenderer_p.h>#include <QtQuick/private/qsgtexturereader_p.h>#include <QtQuick/qquickwindow.h>#include <QtGui/private/qguiapplication_p.h>#include <QtGui/private/qimage_p.h>#include <QtGui/qpa/qplatformintegration.h>#include <QtGui/qimagereader.h>#include <QtGui/qpixmapcache.h>#include <QtQml/private/qqmlglobal_p.h>#include <QtQml/private/qqmlengine_p.h>#include <QtQml/qqmlfile.h>#include <QtCore/private/qobject_p.h>#include <QtCore/qcoreapplication.h>#include <QtCore/qhash.h>#include <QtCore/qfile.h>#include <QtCore/qthread.h>#include <QtCore/qmutex.h>#include <QtCore/qbuffer.h>#include <QtCore/qdebug.h>#include <QtCore/qmetaobject.h>#include <QtCore/qscopeguard.h>#include <qquickpixmapcache.moc>#include "moc_qquickpixmapcache_p.cpp"
Include dependency graph for qquickpixmapcache.cpp:Go to the source code of this file.
Classes | |
| class | QQuickPixmapReply |
| class | QQuickPixmapReply::Event |
| class | ReaderThreadExecutionEnforcer |
| class | QQuickPixmapReader |
| class | QQuickPixmapData |
| class | BackendSupport |
| class | QQuickPixmapKey |
| class | QQuickPixmapStore |
| struct | QQuickPixmapNull |
Macros | |
| #define | IMAGEREQUEST_MAX_NETWORK_REQUEST_COUNT 8 |
| #define | CACHE_EXPIRE_TIME 30 |
| #define | CACHE_REMOVAL_FRACTION 4 |
| #define | PIXMAP_PROFILE(Code) Q_QUICK_PROFILE(QQuickProfiler::ProfilePixmapCache, Code) |
| #define | USE_THREADED_DOWNLOAD 0 |
| #define | Q_THREAD_AFFINITY_MARKER(x) |
| #define | Q_ASSERT_CALLED_ON_VALID_THREAD(x) |
| #define | Q_DETACH_THREAD_AFFINITY_MARKER(x) |
| #define | PIXMAP_READER_LOCK() |
Functions | |
| static QString | imageProviderId (const QUrl &url) |
| static QString | imageId (const QUrl &url) |
| static void | maybeRemoveAlpha (QImage *image) |
| static bool | readImage (const QUrl &url, QIODevice *dev, QImage *image, QString *errorString, QSize *impsize, int *frameCount, const QRect &requestRegion, const QSize &requestSize, const QQuickImageProviderOptions &providerOptions, QQuickImageProviderOptions::AutoTransform *appliedTransform=nullptr, int frame=0, qreal devicePixelRatio=1.0) |
| static QStringList | fromLatin1List (const QList< QByteArray > &list) |
| Q_GLOBAL_STATIC (BackendSupport, backendSupport) | |
| static QString | existingImageFileForPath (const QString &localFile) |
| bool | operator== (const QQuickPixmapKey &lhs, const QQuickPixmapKey &rhs) |
| size_t | qHash (const QQuickPixmapKey &key, size_t seed) noexcept |
| Q_GLOBAL_STATIC (QQuickPixmapStore, pixmapStore) | |
| static QQuickPixmapData * | createPixmapDataSync (QQuickPixmap *declarativePixmap, QQmlEngine *engine, const QUrl &url, const QRect &requestRegion, const QSize &requestSize, const QQuickImageProviderOptions &providerOptions, int frame, bool *ok, qreal devicePixelRatio) |
| Q_GLOBAL_STATIC (QQuickPixmapNull, nullPixmap) | |
Variables | |
| static int | cache_limit = 2048 * 1024 |
| #define CACHE_EXPIRE_TIME 30 |
Definition at line 40 of file qquickpixmapcache.cpp.
| #define CACHE_REMOVAL_FRACTION 4 |
Definition at line 41 of file qquickpixmapcache.cpp.
| #define IMAGEREQUEST_MAX_NETWORK_REQUEST_COUNT 8 |
Definition at line 39 of file qquickpixmapcache.cpp.
| #define PIXMAP_PROFILE | ( | Code | ) | Q_QUICK_PROFILE(QQuickProfiler::ProfilePixmapCache, Code) |
Definition at line 43 of file qquickpixmapcache.cpp.
| #define PIXMAP_READER_LOCK | ( | ) |
Definition at line 278 of file qquickpixmapcache.cpp.
| #define Q_ASSERT_CALLED_ON_VALID_THREAD | ( | x | ) |
Definition at line 85 of file qquickpixmapcache.cpp.
| #define Q_DETACH_THREAD_AFFINITY_MARKER | ( | x | ) |
Definition at line 86 of file qquickpixmapcache.cpp.
| #define Q_THREAD_AFFINITY_MARKER | ( | x | ) |
Definition at line 84 of file qquickpixmapcache.cpp.
| #define USE_THREADED_DOWNLOAD 0 |
Definition at line 48 of file qquickpixmapcache.cpp.
|
static |
Definition at line 1460 of file qquickpixmapcache.cpp.
References QString::arg(), arg, QQuickImageProviderOptions::autoTransform(), QQuickImageProviderWithOptions::checkedCast(), engine, existingImageFileForPath(), factory, frame, QString::fromLatin1(), QSharedPointer< T >::get(), QQmlEnginePrivate::get(), QQmlImageProviderBase::Image, imageId(), QQmlEnginePrivate::imageProvider(), imageProviderId(), QQmlImageProviderBase::ImageResponse, QQmlImageProviderBase::Invalid, QString::isEmpty(), QSGTextureReader::isTexture(), ok, pixmap, QQmlImageProviderBase::Pixmap, Q_ASSERT, QSGTextureReader::read(), readImage(), QIODeviceBase::ReadOnly, QUrl::scheme(), QQmlImageProviderBase::Texture, QQuickTextureFactory::textureFactoryForImage(), QUrl::toString(), url, QQmlFile::urlToLocalFileOrQrc(), and QQuickImageProviderOptions::UsePluginDefaultTransform.
Referenced by QQuickPixmap::load().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 540 of file qquickpixmapcache.cpp.
References QFileInfo::exists(), fi, QString::isEmpty(), QStringLiteral, QString::replace(), QString::size(), and QFileInfo::suffix().
Referenced by createPixmapDataSync().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 513 of file qquickpixmapcache.cpp.
References QString::fromLatin1(), item, list, and QList< T >::size().
Referenced by BackendSupport::BackendSupport().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 101 of file qquickpixmapcache.cpp.
References QString::mid(), QUrl::RemoveAuthority, QUrl::RemoveScheme, QUrl::toString(), and url.
Referenced by createPixmapDataSync().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 96 of file qquickpixmapcache.cpp.
References QUrl::host(), and url.
Referenced by createPixmapDataSync(), and QQuickPixmap::load().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 430 of file qquickpixmapcache.cpp.
References Qt::AutoColor, QImage::Format_A2BGR30_Premultiplied, QImage::Format_A2RGB30_Premultiplied, QImage::Format_BGR30, QImage::Format_RGB30, QImage::Format_RGB32, QImage::Format_RGBA8888, QImage::Format_RGBA8888_Premultiplied, and QImage::Format_RGBX8888.
Referenced by readImage().
Here is the caller graph for this function:
|
inline |
Definition at line 1158 of file qquickpixmapcache.cpp.
References QQuickPixmapKey::frame, QQuickPixmapKey::options, QQuickPixmapKey::region, QQuickPixmapKey::size, and QQuickPixmapKey::url.
| Q_GLOBAL_STATIC | ( | BackendSupport | , |
| backendSupport | |||
| ) |
| Q_GLOBAL_STATIC | ( | QQuickPixmapNull | , |
| nullPixmap | |||
| ) |
| Q_GLOBAL_STATIC | ( | QQuickPixmapStore | , |
| pixmapStore | |||
| ) |
|
inlinenoexcept |
Definition at line 1167 of file qquickpixmapcache.cpp.
References qHashMulti(), and seed.
Here is the call graph for this function:
|
static |
Definition at line 465 of file qquickpixmapcache.cpp.
References QQuickImageProviderOptions::ApplyTransform, QString::arg(), QImageReader::autoTransform(), QQuickImageProviderOptions::autoTransform(), QQuickImageProviderOptions::DoNotApplyTransform, QImageReader::errorString(), QImageReader::format(), frame, QImageReader::imageCount(), QRect::isNull(), QSize::isValid(), QColorSpace::isValid(), QImageReader::jumpToImage(), QQuickImageProviderWithOptions::loadSize(), maybeRemoveAlpha(), QQuickPixmapReply::providerOptions, qCDebug, QImageReader::read(), QQuickPixmapReply::requestRegion, QQuickPixmapReply::requestSize, QImageReader::setAutoTransform(), QImageReader::setScaledClipRect(), QImageReader::setScaledSize(), QImageReader::size(), QQuickImageProviderOptions::targetColorSpace(), QUrl::toString(), QQuickPixmapReply::url, QQuickImageProviderOptions::UsePluginDefaultTransform, and QSize::width().
Referenced by createPixmapDataSync().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 94 of file qquickpixmapcache.cpp.