I BROKE EVERYTHING

refactored the rendering process
This commit is contained in:
fourtf
2018-01-11 20:16:25 +01:00
parent c240d6f7c2
commit 10850c0ec7
62 changed files with 2155 additions and 2117 deletions
+7 -7
View File
@@ -1,6 +1,6 @@
#pragma once
#include "messages/lazyloadedimage.hpp"
#include "messages/image.hpp"
#include "util/concurrentmap.hpp"
#include <cassert>
@@ -13,14 +13,14 @@ struct EmoteData {
{
}
EmoteData(messages::LazyLoadedImage *_image)
EmoteData(messages::Image *_image)
: image1x(_image)
{
}
messages::LazyLoadedImage *getImageForSize(unsigned emoteSize) const
messages::Image *getImageForSize(unsigned emoteSize) const
{
messages::LazyLoadedImage *ret = nullptr;
messages::Image *ret = nullptr;
switch (emoteSize) {
case 0:
@@ -53,9 +53,9 @@ struct EmoteData {
return this->image1x != nullptr;
}
messages::LazyLoadedImage *image1x = nullptr;
messages::LazyLoadedImage *image2x = nullptr;
messages::LazyLoadedImage *image3x = nullptr;
messages::Image *image1x = nullptr;
messages::Image *image2x = nullptr;
messages::Image *image3x = nullptr;
};
typedef ConcurrentMap<QString, EmoteData> EmoteMap;
+2 -2
View File
@@ -3,7 +3,7 @@
#include <QString>
namespace chatterino {
namespace util {
QString ParseTagString(const QString &input)
{
QString output = input;
@@ -53,5 +53,5 @@ QString ParseTagString(const QString &input)
return output;
}
}
}
} // namespace chatterino
+34
View File
@@ -0,0 +1,34 @@
#pragma once
#include "boost/noncopyable.hpp"
namespace chatterino {
namespace util {
template <typename T>
class Property final : boost::noncopyable
{
public:
Property()
{
}
Property(const T &_value)
: value(_value)
{
}
T &operator=(const T &f)
{
return value = f;
}
operator T const &() const
{
return value;
}
protected:
T value;
};
}
}