From 5ec1deb2d9238b6636e73b5a7cd67a8a319c79aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 27 Nov 2012 20:58:24 +0000 Subject: [PATCH] state: Drop several unused json image members. --- gui/apisurface.cpp | 10 ---------- gui/apisurface.h | 3 --- gui/apitracecall.cpp | 18 ------------------ retrace/glstate_images.cpp | 12 ------------ 4 files changed, 43 deletions(-) diff --git a/gui/apisurface.cpp b/gui/apisurface.cpp index bfc6cfd..d17560f 100644 --- a/gui/apisurface.cpp +++ b/gui/apisurface.cpp @@ -18,16 +18,6 @@ void ApiSurface::setSize(const QSize &size) m_size = size; } -int ApiSurface::numChannels() const -{ - return m_numChannels; -} - -void ApiSurface::setNumChannels(int numChannels) -{ - m_numChannels = numChannels; -} - void ApiSurface::contentsFromBase64(const QByteArray &base64) { QByteArray dataArray = QByteArray::fromBase64(base64); diff --git a/gui/apisurface.h b/gui/apisurface.h index bc403af..9f00001 100644 --- a/gui/apisurface.h +++ b/gui/apisurface.h @@ -13,9 +13,6 @@ public: QSize size() const; void setSize(const QSize &size); - int numChannels() const; - void setNumChannels(int numChannels); - int depth() const; void setDepth(int depth); diff --git a/gui/apitracecall.cpp b/gui/apitracecall.cpp index 907e10a..2487e04 100644 --- a/gui/apitracecall.cpp +++ b/gui/apitracecall.cpp @@ -490,20 +490,11 @@ ApiTraceState::ApiTraceState(const QVariantMap &parsedJson) QSize size(image[QLatin1String("__width__")].toInt(), image[QLatin1String("__height__")].toInt()); QString cls = image[QLatin1String("__class__")].toString(); - QString type = image[QLatin1String("__type__")].toString(); - bool normalized = - image[QLatin1String("__normalized__")].toBool(); - int numChannels = - image[QLatin1String("__channels__")].toInt(); int depth = image[QLatin1String("__depth__")].toInt(); QString formatName = image[QLatin1String("__format__")].toString(); - Q_ASSERT(type == QLatin1String("uint8")); - Q_ASSERT(normalized == true); - Q_UNUSED(normalized); - QByteArray dataArray = image[QLatin1String("__data__")].toByteArray(); @@ -511,7 +502,6 @@ ApiTraceState::ApiTraceState(const QVariantMap &parsedJson) tex.setSize(size); tex.setDepth(depth); tex.setFormatName(formatName); - tex.setNumChannels(numChannels); tex.setLabel(itr.key()); tex.contentsFromBase64(dataArray); @@ -525,16 +515,9 @@ ApiTraceState::ApiTraceState(const QVariantMap &parsedJson) QSize size(buffer[QLatin1String("__width__")].toInt(), buffer[QLatin1String("__height__")].toInt()); QString cls = buffer[QLatin1String("__class__")].toString(); - QString type = buffer[QLatin1String("__type__")].toString(); - bool normalized = buffer[QLatin1String("__normalized__")].toBool(); - int numChannels = buffer[QLatin1String("__channels__")].toInt(); int depth = buffer[QLatin1String("__depth__")].toInt(); QString formatName = buffer[QLatin1String("__format__")].toString(); - Q_ASSERT(type == QLatin1String("uint8")); - Q_ASSERT(normalized == true); - Q_UNUSED(normalized); - QByteArray dataArray = buffer[QLatin1String("__data__")].toByteArray(); @@ -542,7 +525,6 @@ ApiTraceState::ApiTraceState(const QVariantMap &parsedJson) fbo.setSize(size); fbo.setDepth(depth); fbo.setFormatName(formatName); - fbo.setNumChannels(numChannels); fbo.setType(itr.key()); fbo.contentsFromBase64(dataArray); m_framebuffers.append(fbo); diff --git a/retrace/glstate_images.cpp b/retrace/glstate_images.cpp index dc930a8..484b295 100644 --- a/retrace/glstate_images.cpp +++ b/retrace/glstate_images.cpp @@ -416,12 +416,6 @@ dumpActiveTextureLevel(JSONWriter &json, Context &context, GLenum target, GLint json.writeStringMember("__format__", formatToString(desc.internalFormat)); - // Hardcoded for now, but we could chose types more adequate to the - // texture internal format - json.writeStringMember("__type__", "uint8"); - json.writeBoolMember("__normalized__", true); - json.writeIntMember("__channels__", channels); - image::Image *image = new image::Image(desc.width, desc.height*desc.depth, channels, true); context.resetPixelPackState(); @@ -865,12 +859,6 @@ dumpReadBufferImage(JSONWriter &json, GLint width, GLint height, GLenum format, json.writeStringMember("__format__", formatToString(internalFormat)); - // Hardcoded for now, but we could chose types more adequate to the - // texture internal format - json.writeStringMember("__type__", "uint8"); - json.writeBoolMember("__normalized__", true); - json.writeIntMember("__channels__", channels); - GLenum type = GL_UNSIGNED_BYTE; #if DEPTH_AS_RGBA -- 2.43.0