6#ifndef KISFRAMEDATASERIALIZER_H
7#define KISFRAMEDATASERIALIZER_H
9#include "kritaui_export.h"
10#include <QScopedPointer>
17#include <boost/optional.hpp>
57 const int bufferSize = data.pixelSize() *
rect.width() *
rect.height();
58 memcpy(tile.
data.
data(), data.data(), bufferSize);
65 bool isCompressed =
false;
83 for (
auto it = frameTiles.begin(); it != frameTiles.end(); ++it) {
102 int saveFrame(
const Frame &frame);
105 void moveFrame(
int srcFrameId,
int dstFrameId);
107 bool hasFrame(
int frameId)
const;
108 void forgetFrame(
int frameId);
110 static boost::optional<qreal> estimateFrameUniqueness(
const Frame &lhs,
const Frame &rhs, qreal portion);
111 static bool subtractFrames(Frame &dst,
const Frame &src);
112 static void addFrames(Frame &dst,
const Frame &src);
115 template<
template <
typename U>
class OpPolicy>
122 const QScopedPointer<Private>
m_d;
void allocate(int pixelSize)
FrameTile(const FrameTile &rhs)=delete
FrameTile & operator=(FrameTile &rhs)=delete
FrameTile(FrameTile &&rhs)=default
FrameTile & operator=(FrameTile &&rhs)=default
FrameTile(KisTextureTileInfoPoolSP pool)
std::vector< FrameTile > frameTiles
Frame(const Frame &rhs)=delete
Frame & operator=(Frame &&rhs)=default
Frame(Frame &&rhs)=default
Frame & operator=(Frame &rhs)=delete
const QScopedPointer< Private > m_d