Simplified some compressed image parsing code.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-08-30 22:25:26 -03:00
parent 907630b04c
commit a41f78dfe4
26 changed files with 101 additions and 161 deletions
+5 -5
View File
@@ -21,7 +21,7 @@
#pragma once
// LOVE
#include "image/CompressedFormatHandler.h"
#include "image/FormatHandler.h"
// dds parser
#include "ddsparse/ddsparse.h"
@@ -39,16 +39,16 @@ namespace magpie
/**
* Interface between CompressedImageData and the ddsparse library.
**/
class DDSHandler : public CompressedFormatHandler
class DDSHandler : public FormatHandler
{
public:
virtual ~DDSHandler() {}
// Implements CompressedFormatHandler.
bool canParse(const Data *data) override;
// Implements FormatHandler.
bool canParseCompressed(Data *data) override;
StrongRef<CompressedMemory> parse(Data *filedata,
StrongRef<CompressedMemory> parseCompressed(Data *filedata,
std::vector<StrongRef<CompressedSlice>> &images,
PixelFormat &format, bool &sRGB) override;