|
Krita Source Code Documentation
|
Classes | |
| class | DeviceChangeColorSpaceCommand |
| class | DeviceChangeProfileCommand |
| class | FrameInsertionCommand |
| class | KisPaintDeviceStrategy |
| class | KisPaintDeviceWrappedStrategy |
| struct | LodDataStructImpl |
| struct | StrategyPolicy |
Public Attributes | |
| QScopedPointer< KisPaintDeviceStrategy > | basicStrategy |
| QScopedPointer< KisRasterKeyframeChannel > | contentChannel |
| KisDefaultBoundsBaseSP | defaultBounds |
| QScopedPointer< KisPaintDeviceFramesInterface > | framesInterface |
| bool | isProjectionDevice |
| QMutex | m_wrappedStrategyMutex |
| KisNodeWSP | parent |
| KisPaintDevice * | q |
| bool | supportsWrapAroundMode |
| QScopedPointer< KisPaintDeviceWrappedStrategy > | wrappedStrategy |
Static Public Attributes | |
| static const KisDefaultBoundsSP | transitionalDefaultBounds = new KisDefaultBounds() |
Private Types | |
| typedef KisPaintDeviceData | Data |
| typedef QSharedPointer< Data > | DataSP |
| typedef QHash< int, DataSP > | FramesHash |
| typedef KisSequentialIteratorBase< ReadOnlyIteratorPolicy< StrategyPolicy >, StrategyPolicy > | InternalSequentialConstIterator |
| typedef KisSequentialIteratorBase< WritableIteratorPolicy< StrategyPolicy >, StrategyPolicy > | InternalSequentialIterator |
Private Member Functions | |
| QList< Data * > | allDataObjects () const |
| Data * | currentData () const |
| DataSP | currentFrameData () const |
| Data * | currentNonLodData () const |
| void | ensureLodDataPresent () const |
| qint64 | estimateDataSize (Data *data) const |
| bool | fastBitBltPossibleImpl (Data *srcData) |
| void | prepareCloneImpl (KisPaintDeviceSP src, Data *srcData) |
| void | transferFromData (Data *data, KisPaintDeviceSP targetDevice) |
Private Attributes | |
| DataSP | m_data |
| QMutex | m_dataSwitchLock |
| QScopedPointer< Data > | m_externalFrameData |
| FramesHash | m_frames |
| QScopedPointer< Data > | m_lodData |
| int | m_nextFreeFrameId |
| struct Q_DECL_HIDDEN | StrategyPolicy |
Friends | |
| class | KisPaintDeviceFramesInterface |
Definition at line 67 of file kis_paint_device.cc.
|
private |
Definition at line 230 of file kis_paint_device.cc.
|
private |
Definition at line 231 of file kis_paint_device.cc.
|
private |
Definition at line 232 of file kis_paint_device.cc.
|
private |
Definition at line 588 of file kis_paint_device.cc.
|
private |
Definition at line 589 of file kis_paint_device.cc.
| KisPaintDevice::Private::Private | ( | KisPaintDevice * | paintDevice | ) |
Definition at line 608 of file kis_paint_device.cc.
| KisPaintDevice::Private::~Private | ( | ) |
Definition at line 618 of file kis_paint_device.cc.
References KisPaintDevice::clear().
Definition at line 568 of file kis_paint_device.cc.
References m_data, m_externalFrameData, m_frames, m_lodData, and value().
| bool KisPaintDevice::Private::assignProfile | ( | const KoColorProfile * | profile, |
| KUndo2Command * | parentCommand ) |
Definition at line 1002 of file kis_paint_device.cc.
References KisPaintDeviceData::assignColorSpace(), KisPaintDevice::colorSpace(), KoColorSpaceRegistry::colorSpace(), KisPaintDevice::emitProfileChanged(), and KoColorSpaceRegistry::instance().
|
inline |
Definition at line 137 of file kis_paint_device.cc.
References KisPaintDeviceData::cache(), and currentData().
|
inline |
Definition at line 142 of file kis_paint_device.cc.
References KisPaintDeviceData::cacheInvalidator(), and currentData().
Definition at line 154 of file kis_paint_device.cc.
|
inline |
Definition at line 111 of file kis_paint_device.cc.
References KisPaintDeviceData::colorSpace(), and currentData().
| void KisPaintDevice::Private::convertColorSpace | ( | const KoColorSpace * | dstColorSpace, |
| KoColorConversionTransformation::Intent | renderingIntent, | ||
| KoColorConversionTransformation::ConversionFlags | conversionFlags, | ||
| KUndo2Command * | parentCommand, | ||
| KoUpdater * | progressUpdater ) |
Definition at line 981 of file kis_paint_device.cc.
References KisPaintDeviceData::convertDataColorSpace(), and KisPaintDevice::emitColorSpaceChanged().
|
inline |
Definition at line 150 of file kis_paint_device.cc.
|
inline |
Here we move the contents of the paint device to the new frame and clear m_data to make the "background" for the areas where there is no frame at all.
Definition at line 284 of file kis_paint_device.cc.
References getNextFrameId(), m_data, m_frames, KisPaintDevice::offset(), q, KUndo2Command::redo(), and toQShared().
| KisPaintDevice::LodDataStruct * KisPaintDevice::Private::createLodDataStruct | ( | int | lod | ) |
We compare color spaces as pure pointers, because they must be exactly the same, since they come from the common source.
Definition at line 688 of file kis_paint_device.cc.
References KisPaintDeviceData::cache(), KisPaintDeviceData::colorSpace(), KisLodTransformBase::coordToLodCoord(), KisPaintDeviceCache::invalidate(), KIS_SAFE_ASSERT_RECOVER_NOOP, KisPaintDeviceData::levelOfDetail(), KisPaintDeviceData::prepareClone(), KisPaintDeviceData::setLevelOfDetail(), KisPaintDeviceData::setX(), KisPaintDeviceData::setY(), KisPaintDeviceData::x(), and KisPaintDeviceData::y().
|
inlineprivate |
Definition at line 522 of file kis_paint_device.cc.
References KisDefaultBoundsBase::currentLevelOfDetail(), currentNonLodData(), defaultBounds, ensureLodDataPresent(), and m_lodData.
|
inlineprivate |
Definition at line 466 of file kis_paint_device.cc.
References contentChannel, KisDefaultBoundsBase::currentTime(), defaultBounds, KIS_ASSERT_RECOVER, m_data, and m_frames.
|
inline |
Definition at line 207 of file kis_paint_device.cc.
References contentChannel, KisDefaultBoundsBase::currentLevelOfDetail(), KisDefaultBoundsBase::currentTime(), defaultBounds, and KIS_ASSERT_RECOVER.
|
inlineprivate |
Definition at line 491 of file kis_paint_device.cc.
References contentChannel, currentFrameData(), defaultBounds, KisDefaultBoundsBase::externalFrameActive(), isProjectionDevice, m_data, m_dataSwitchLock, m_externalFrameData, and q.
| KisPaintDevice::Private::KisPaintDeviceStrategy * KisPaintDevice::Private::currentStrategy | ( | ) |
Definition at line 624 of file kis_paint_device.cc.
References KisPaintDevice::defaultBounds(), KisDefaultBoundsBase::imageBorderRect(), and KisDefaultBoundsBase::wrapAroundMode().
|
inline |
Definition at line 115 of file kis_paint_device.cc.
References currentData(), and KisPaintDeviceData::dataManager().
|
inline |
Definition at line 330 of file kis_paint_device.cc.
References KIS_SAFE_ASSERT_RECOVER_RETURN, m_frames, and KUndo2Command::redo().
|
inlineprivate |
Definition at line 510 of file kis_paint_device.cc.
References currentNonLodData(), m_dataSwitchLock, m_lodData, and q.
|
inlineprivate |
Definition at line 434 of file kis_paint_device.cc.
References KisPaintDeviceData::colorSpace(), KisPaintDeviceData::dataManager(), KisDataManager::extent(), and KoColorSpace::pixelSize().
|
inline |
Definition at line 441 of file kis_paint_device.cc.
References estimateDataSize(), m_data, m_externalFrameData, m_frames, m_lodData, and value().
|
inline |
Definition at line 202 of file kis_paint_device.cc.
References fastBitBltPossibleImpl().
|
inlineprivate |
Definition at line 562 of file kis_paint_device.cc.
References colorSpace(), KisPaintDeviceData::colorSpace(), x(), KisPaintDeviceData::x(), y(), and KisPaintDeviceData::y().
|
inline |
Definition at line 347 of file kis_paint_device.cc.
References KisDefaultBoundsBase::bounds(), defaultBounds, KisPaintDevice::extent(), m_frames, and OPACITY_TRANSPARENT_U8.
|
inline |
Definition at line 217 of file kis_paint_device.cc.
References m_frames.
|
inline |
Definition at line 406 of file kis_paint_device.cc.
References m_frames.
|
inline |
Definition at line 377 of file kis_paint_device.cc.
References m_frames.
|
inline |
Definition at line 363 of file kis_paint_device.cc.
References m_frames.
| void KisPaintDevice::Private::generateLodCloneDevice | ( | KisPaintDeviceSP | dst, |
| const QRect & | originalRect, | ||
| int | lod ) |
Definition at line 824 of file kis_paint_device.cc.
References KisSharedPtr< T >::data(), KisPaintDevice::dataManager(), KisPaintDeviceData::dataManager(), KisPaintDevice::fastBitBltPossible(), KIS_SAFE_ASSERT_RECOVER_RETURN, KisPaintDevice::x(), KisPaintDeviceData::x(), KisPaintDevice::y(), and KisPaintDeviceData::y().
|
inline |
Definition at line 276 of file kis_paint_device.cc.
References KIS_SAFE_ASSERT_RECOVER_NOOP, m_frames, and m_nextFreeFrameId.
| void KisPaintDevice::Private::init | ( | const KoColorSpace * | cs, |
| const quint8 * | defaultPixel ) |
Definition at line 1032 of file kis_paint_device.cc.
References KisPaintDevice::dataManager(), KisPaintDevice::defaultPixel(), KisPaintDeviceData::init(), and KoColorSpace::pixelSize().
|
inline |
Definition at line 146 of file kis_paint_device.cc.
References currentData(), and KisPaintDeviceData::interstrokeData().
|
inline |
Definition at line 223 of file kis_paint_device.cc.
References m_frames.
|
inline |
Definition at line 196 of file kis_paint_device.cc.
|
inlineprivate |
The result of currentData() depends on the current level of detail and animation frame index. So we should first connect the device to the new default bounds object, and only after that ask currentData() to start cloning.
Default pixel must be updated after the color space of the device has been adjusted in prepareClone(). Otherwise, colorSpace() of the resulting KoColor object will be incorrect.
Definition at line 536 of file kis_paint_device.cc.
References colorSpace(), currentData(), KisPaintDeviceData::dataManager(), KisDataManager::defaultPixel(), KIS_SAFE_ASSERT_RECOVER_RETURN, KisPaintDeviceData::prepareClone(), q, KisPaintDevice::setDefaultBounds(), KisPaintDevice::setDefaultPixel(), and KisPaintDevice::setSupportsWraparoundMode().
|
inline |
Definition at line 382 of file kis_paint_device.cc.
References m_frames.
| KisRegion KisPaintDevice::Private::regionForLodSyncing | ( | ) | const |
Definition at line 682 of file kis_paint_device.cc.
References KisPaintDeviceData::dataManager(), KisDataManager::region(), KisRegion::translated(), KisPaintDeviceData::x(), and KisPaintDeviceData::y().
| KUndo2Command * KisPaintDevice::Private::reincarnateWithDetachedHistory | ( | bool | copyContent | ) |
Definition at line 1025 of file kis_paint_device.cc.
Definition at line 397 of file kis_paint_device.cc.
References KoColor::convertTo(), KoColor::data(), and m_frames.
|
inline |
Definition at line 369 of file kis_paint_device.cc.
References m_frames, and KisPaintDevice::offset().
|
inline |
Definition at line 128 of file kis_paint_device.cc.
References currentData(), KisPaintDeviceData::setX(), and x().
|
inline |
Definition at line 132 of file kis_paint_device.cc.
References currentData(), KisPaintDeviceData::setY(), and y().
| void KisPaintDevice::Private::testingFetchLodDevice | ( | KisPaintDeviceSP | targetDevice | ) |
Definition at line 921 of file kis_paint_device.cc.
|
private |
Definition at line 849 of file kis_paint_device.cc.
References currentStrategy(), KisPaintDeviceData::dataManager(), KisPaintDevice::extent(), KisDataManager::extent(), KisPaintDevice::Private::KisPaintDeviceStrategy::fastBitBltRough(), KisPaintDevice::m_d, prepareCloneImpl(), KisPaintDeviceData::x(), and KisPaintDeviceData::y().
| void KisPaintDevice::Private::updateLodDataManager | ( | KisDataManager * | srcDataManager, |
| KisDataManager * | dstDataManager, | ||
| const QPoint & | srcOffset, | ||
| const QPoint & | dstOffset, | ||
| const QRect & | originalRect, | ||
| int | lod ) |
Definition at line 724 of file kis_paint_device.cc.
References KisLodTransformBase::alignedRect(), KisPaintDevice::colorSpace(), KIS_ASSERT_RECOVER_NOOP, KIS_ASSERT_RECOVER_RETURN, KoMixColorsOp::mixColors(), KoColorSpace::mixColorsOp, KisSequentialIteratorBase< IteratorPolicy, SourcePolicy, ProgressPolicy >::nextPixel(), KisDataManager::pixelSize(), KisPaintDevice::pixelSize(), KisSequentialIteratorBase< IteratorPolicy, SourcePolicy, ProgressPolicy >::rawData(), KisSequentialIteratorBase< IteratorPolicy, SourcePolicy, ProgressPolicy >::rawDataConst(), and KisLodTransformBase::scaledRect().
| void KisPaintDevice::Private::updateLodDataStruct | ( | LodDataStruct * | dst, |
| const QRect & | srcRect ) |
Definition at line 808 of file kis_paint_device.cc.
References KisSharedPtr< T >::data(), KisPaintDeviceData::dataManager(), KIS_SAFE_ASSERT_RECOVER_RETURN, KisPaintDeviceData::levelOfDetail(), KisPaintDevice::Private::LodDataStructImpl::lodData, KisPaintDeviceData::x(), and KisPaintDeviceData::y().
| void KisPaintDevice::Private::uploadFrame | ( | int | dstFrameId, |
| KisPaintDeviceSP | srcDevice ) |
Definition at line 875 of file kis_paint_device.cc.
References KIS_ASSERT_RECOVER_RETURN, KisPaintDevice::m_d, and m_data.
| void KisPaintDevice::Private::uploadFrame | ( | int | srcFrameId, |
| int | dstFrameId, | ||
| KisPaintDeviceSP | srcDevice ) |
Definition at line 864 of file kis_paint_device.cc.
References KIS_ASSERT_RECOVER_RETURN, KisPaintDevice::m_d, and m_frames.
Definition at line 886 of file kis_paint_device.cc.
References KoColorConversionTransformation::internalConversionFlags(), KoColorConversionTransformation::internalRenderingIntent(), and toQShared().
| void KisPaintDevice::Private::uploadLodDataStruct | ( | LodDataStruct * | dst | ) |
Definition at line 835 of file kis_paint_device.cc.
References KisDefaultBoundsBase::currentLevelOfDetail(), KisPaintDevice::defaultBounds(), KIS_SAFE_ASSERT_RECOVER_RETURN, and KisPaintDevice::Private::LodDataStructImpl::lodData.
|
inline |
Definition at line 391 of file kis_paint_device.cc.
References m_frames.
| void KisPaintDevice::Private::writeFrameToDevice | ( | int | frameId, |
| KisPaintDeviceSP | targetDevice ) |
Definition at line 858 of file kis_paint_device.cc.
|
inline |
Definition at line 120 of file kis_paint_device.cc.
References currentData(), and KisPaintDeviceData::x().
|
inline |
Definition at line 124 of file kis_paint_device.cc.
References currentData(), and KisPaintDeviceData::y().
|
friend |
Definition at line 592 of file kis_paint_device.cc.
| QScopedPointer<KisPaintDeviceStrategy> KisPaintDevice::Private::basicStrategy |
Definition at line 90 of file kis_paint_device.cc.
| QScopedPointer<KisRasterKeyframeChannel> KisPaintDevice::Private::contentChannel |
Definition at line 88 of file kis_paint_device.cc.
| KisDefaultBoundsBaseSP KisPaintDevice::Private::defaultBounds |
Definition at line 89 of file kis_paint_device.cc.
| QScopedPointer<KisPaintDeviceFramesInterface> KisPaintDevice::Private::framesInterface |
Definition at line 94 of file kis_paint_device.cc.
| bool KisPaintDevice::Private::isProjectionDevice |
Definition at line 95 of file kis_paint_device.cc.
|
private |
Definition at line 595 of file kis_paint_device.cc.
|
mutableprivate |
Definition at line 598 of file kis_paint_device.cc.
|
mutableprivate |
Definition at line 597 of file kis_paint_device.cc.
|
private |
Definition at line 600 of file kis_paint_device.cc.
|
mutableprivate |
Definition at line 596 of file kis_paint_device.cc.
|
private |
Definition at line 601 of file kis_paint_device.cc.
| QMutex KisPaintDevice::Private::m_wrappedStrategyMutex |
Definition at line 92 of file kis_paint_device.cc.
| KisNodeWSP KisPaintDevice::Private::parent |
Definition at line 87 of file kis_paint_device.cc.
| KisPaintDevice* KisPaintDevice::Private::q |
Definition at line 86 of file kis_paint_device.cc.
|
private |
Definition at line 587 of file kis_paint_device.cc.
| bool KisPaintDevice::Private::supportsWrapAroundMode |
Definition at line 96 of file kis_paint_device.cc.
|
static |
Used when the paint device is loading to ensure no lod/animation interferes the process.
Definition at line 73 of file kis_paint_device.cc.
| QScopedPointer<KisPaintDeviceWrappedStrategy> KisPaintDevice::Private::wrappedStrategy |
Definition at line 91 of file kis_paint_device.cc.