]> git.cworth.org Git - apitrace/commitdiff
state: Drop several unused json image members.
authorJosé Fonseca <jfonseca@vmware.com>
Tue, 27 Nov 2012 20:58:24 +0000 (20:58 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 27 Nov 2012 20:58:24 +0000 (20:58 +0000)
gui/apisurface.cpp
gui/apisurface.h
gui/apitracecall.cpp
retrace/glstate_images.cpp

index bfc6cfdf128038d6e6b18a6afb057ebeb53e50e2..d17560f4ca7e62c0eba638099bc302399eabf6d7 100644 (file)
@@ -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);
index bc403af27409c103deeeb431710a67238f6481f1..9f000014f656d7e08b9056a0a317e03191e5d028 100644 (file)
@@ -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);
 
index 907e10aa08294fc878549708a92e074fc9eb2681..2487e0467483e626b19b902016ac79f6e9c5afb2 100644 (file)
@@ -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);
index dc930a8039b8c816b785ab363f444c791d80b469..484b2957b4b8ddb2efed87ac9040be4adaa4924e 100644 (file)
@@ -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