2
* Copyright © 2012 Linaro Limited
4
* This file is part of the glmark2 OpenGL (ES) 2.0 benchmark.
6
* glmark2 is free software: you can redistribute it and/or modify it under the
7
* terms of the GNU General Public License as published by the Free Software
8
* Foundation, either version 3 of the License, or (at your option) any later
11
* glmark2 is distributed in the hope that it will be useful, but WITHOUT ANY
12
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16
* You should have received a copy of the GNU General Public License along with
17
* glmark2. If not, see <http://www.gnu.org/licenses/>.
27
virtual bool error() = 0;
28
virtual bool nextRow(unsigned char *dst) = 0;
29
virtual unsigned int width() const = 0;
30
virtual unsigned int height() const = 0;
31
virtual unsigned int pixelBytes() const = 0;
32
virtual ~ImageReader() {}
35
class PNGReaderPrivate;
37
class PNGReader : public ImageReader
40
PNGReader(const std::string& filename);
44
bool nextRow(unsigned char *dst);
46
unsigned int width() const;
47
unsigned int height() const;
48
unsigned int pixelBytes() const;
51
bool init(const std::string& filename);
54
PNGReaderPrivate *priv_;
57
class JPEGReaderPrivate;
59
class JPEGReader : public ImageReader
62
JPEGReader(const std::string& filename);
64
virtual ~JPEGReader();
66
bool nextRow(unsigned char *dst);
67
unsigned int width() const;
68
unsigned int height() const;
69
unsigned int pixelBytes() const;
72
bool init(const std::string& filename);
75
JPEGReaderPrivate *priv_;