Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#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 <private/qdebug_p.h>
#include <qquickpixmapcache.moc>
#include "moc_qquickpixmapcache_p.cpp"
Go to the source code of this file.
Classes | |
class | QQuickPixmapReply |
class | QQuickPixmapReply::Event |
class | ReaderThreadExecutionEnforcer |
class | QQuickPixmapReader |
class | QQuickPixmapData |
class | BackendSupport |
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() |
Variables | |
static int | cache_limit = 2048 * 1024 |
#define CACHE_EXPIRE_TIME 30 |
Definition at line 44 of file qquickpixmapcache.cpp.
Referenced by QQuickPixmapCache::unreferencePixmap().
#define CACHE_REMOVAL_FRACTION 4 |
Definition at line 47 of file qquickpixmapcache.cpp.
Referenced by QQuickPixmapCache::timerEvent().
#define IMAGEREQUEST_MAX_NETWORK_REQUEST_COUNT 8 |
Definition at line 41 of file qquickpixmapcache.cpp.
#define PIXMAP_PROFILE | ( | Code | ) | Q_QUICK_PROFILE(QQuickProfiler::ProfilePixmapCache, Code) |
Definition at line 49 of file qquickpixmapcache.cpp.
Referenced by QQuickPixmapData::addref(), QQuickPixmapData::addToCache(), QQuickPixmapReader::cancel(), QQuickPixmapReply::event(), QQuickPixmap::load(), QQuickPixmapData::release(), and QQuickPixmapData::removeFromCache().
#define PIXMAP_READER_LOCK | ( | ) |
Definition at line 295 of file qquickpixmapcache.cpp.
Referenced by QQuickPixmapReader::~QQuickPixmapReader(), QQuickPixmapReader::cancel(), QQuickPixmapReader::run(), and QQuickPixmapReader::startJob().
#define Q_ASSERT_CALLED_ON_VALID_THREAD | ( | x | ) |
Definition at line 95 of file qquickpixmapcache.cpp.
Referenced by QQuickPixmapReader::~QQuickPixmapReader(), and QQuickPixmapReader::run().
#define Q_DETACH_THREAD_AFFINITY_MARKER | ( | x | ) |
Definition at line 96 of file qquickpixmapcache.cpp.
Referenced by QQuickPixmapReader::QQuickPixmapReader().
#define Q_THREAD_AFFINITY_MARKER | ( | x | ) |
Definition at line 94 of file qquickpixmapcache.cpp.
#define USE_THREADED_DOWNLOAD 0 |
Definition at line 54 of file qquickpixmapcache.cpp.
|
static |
Definition at line 1525 of file qquickpixmapcache.cpp.
References arg, QQuickImageProviderOptions::autoTransform(), QQuickImageProviderWithOptions::checkedCast(), engine, existingImageFileForPath(), factory, frame, QString::fromLatin1(), QQmlEnginePrivate::get(), QQmlImageProviderBase::Image, imageId(), QQmlEnginePrivate::imageProvider(), imageProviderId(), QQmlImageProviderBase::ImageResponse, QQmlImageProviderBase::Invalid, ok, pixmap, QQmlImageProviderBase::Pixmap, Q_ASSERT, readImage(), QIODeviceBase::ReadOnly, QUrl::scheme(), QQmlImageProviderBase::Texture, QQuickTextureFactory::textureFactoryForImage(), QUrl::toString(), url, QQmlFile::urlToLocalFileOrQrc(), and QQuickImageProviderOptions::UsePluginDefaultTransform.
Referenced by QQuickPixmap::load().
Definition at line 560 of file qquickpixmapcache.cpp.
References QFileInfo::exists(), and QStringLiteral.
Referenced by createPixmapDataSync().
|
static |
Definition at line 531 of file qquickpixmapcache.cpp.
References QString::fromLatin1(), item, list, and QList< T >::size().
Referenced by BackendSupport::BackendSupport().
Definition at line 114 of file qquickpixmapcache.cpp.
References QString::mid(), QUrl::RemoveAuthority, QUrl::RemoveScheme, QUrl::toString(), and url.
Referenced by createPixmapDataSync().
Definition at line 109 of file qquickpixmapcache.cpp.
References QUrl::host(), and url.
Referenced by createPixmapDataSync(), and QQuickPixmap::load().
Definition at line 448 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().
|
inline |
Definition at line 1186 of file qquickpixmapcache.cpp.
References debug, QtDebugUtils::formatQRect(), and QtDebugUtils::formatQSize().
|
inline |
Definition at line 1171 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 | ) |
|
inlinenoexcept |
Definition at line 1180 of file qquickpixmapcache.cpp.
References qHashMulti(), and seed.
|
static |
Definition at line 483 of file qquickpixmapcache.cpp.
References QQuickImageProviderOptions::ApplyTransform, QQuickImageProviderOptions::autoTransform(), QQuickImageProviderOptions::DoNotApplyTransform, frame, QRect::isNull(), QColorSpace::isValid(), QQuickImageProviderWithOptions::loadSize(), maybeRemoveAlpha(), QQuickPixmapReply::providerOptions, qCDebug, QQuickPixmapReply::requestRegion, QQuickPixmapReply::requestSize, QQuickImageProviderOptions::targetColorSpace(), QUrl::toString(), QQuickPixmapReply::url, and QQuickImageProviderOptions::UsePluginDefaultTransform.
Referenced by createPixmapDataSync().
|
static |
The maximum currently-unused image data that can be stored for potential later reuse, in bytes. See QQuickPixmapCache::shrinkCache()
Definition at line 107 of file qquickpixmapcache.cpp.