added graphics cache for drawn messages
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
#ifndef MESSAGEREF_H
|
||||
#define MESSAGEREF_H
|
||||
|
||||
#include <memory>
|
||||
#include "messages/message.h"
|
||||
|
||||
#include <QPixmap>
|
||||
#include <memory>
|
||||
|
||||
namespace chatterino {
|
||||
namespace messages {
|
||||
|
||||
@@ -26,18 +28,15 @@ public:
|
||||
|
||||
bool layout(int width, bool enableEmoteMargins = true);
|
||||
|
||||
void
|
||||
requestRelayout()
|
||||
{
|
||||
relayoutRequested = true;
|
||||
}
|
||||
|
||||
const std::vector<WordPart> &
|
||||
getWordParts() const
|
||||
{
|
||||
return wordParts;
|
||||
}
|
||||
|
||||
std::shared_ptr<QPixmap> buffer = nullptr;
|
||||
bool updateBuffer = false;
|
||||
|
||||
private:
|
||||
Message *message;
|
||||
std::shared_ptr<Message> messagePtr;
|
||||
@@ -47,7 +46,6 @@ private:
|
||||
int height = 0;
|
||||
|
||||
int currentLayoutWidth = -1;
|
||||
bool relayoutRequested = true;
|
||||
int fontGeneration = -1;
|
||||
int emoteGeneration = -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user