From: Eskil Abrahamsen Blomfeldt Date: Wed, 28 Mar 2012 14:12:02 +0000 (+0200) Subject: Update for API changes in the QPlatformSharedGraphicsCache X-Git-Tag: 071012131707~684 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd1acb483d70a5bee208cb76c8d63f9a275a568b;p=profile%2Fivi%2Fqtdeclarative.git Update for API changes in the QPlatformSharedGraphicsCache Change-Id: I6648d16a11343e2342b832c7416e72ce43ab175d Reviewed-by: Jiang Jiang --- diff --git a/src/quick/scenegraph/qsgshareddistancefieldglyphcache.cpp b/src/quick/scenegraph/qsgshareddistancefieldglyphcache.cpp index cd5aaae..dd9db4e 100644 --- a/src/quick/scenegraph/qsgshareddistancefieldglyphcache.cpp +++ b/src/quick/scenegraph/qsgshareddistancefieldglyphcache.cpp @@ -86,11 +86,11 @@ QSGSharedDistanceFieldGlyphCache::QSGSharedDistanceFieldGlyphCache(const QByteAr connect(sharedGraphicsCache, SIGNAL(itemsMissing(QByteArray,QVector)), this, SLOT(reportItemsMissing(QByteArray,QVector)), Qt::DirectConnection); - connect(sharedGraphicsCache, SIGNAL(itemsAvailable(QByteArray,void*,QSize,QVector,QVector)), - this, SLOT(reportItemsAvailable(QByteArray,void*,QSize,QVector,QVector)), + connect(sharedGraphicsCache, SIGNAL(itemsAvailable(QByteArray,void*,QVector,QVector)), + this, SLOT(reportItemsAvailable(QByteArray,void*,QVector,QVector)), Qt::DirectConnection); - connect(sharedGraphicsCache, SIGNAL(itemsUpdated(QByteArray,void*,QSize,QVector,QVector)), - this, SLOT(reportItemsUpdated(QByteArray,void*,QSize,QVector,QVector)), + connect(sharedGraphicsCache, SIGNAL(itemsUpdated(QByteArray,void*,QVector,QVector)), + this, SLOT(reportItemsUpdated(QByteArray,void*,QVector,QVector)), Qt::DirectConnection); connect(sharedGraphicsCache, SIGNAL(itemsInvalidated(QByteArray,QVector)), this, SLOT(reportItemsInvalidated(QByteArray,QVector)), @@ -537,7 +537,7 @@ void QSGSharedDistanceFieldGlyphCache::processPendingGlyphs() while (it != textureContentForBuffer.constEnd()) { Texture texture; texture.textureId = m_sharedGraphicsCache->textureIdForBuffer(it.key()); - texture.size = it.value().size; + texture.size = m_sharedGraphicsCache->sizeOfBuffer(it.key()); #if defined(QSGSHAREDDISTANCEFIELDGLYPHCACHE_DEBUG_) saveTexture(texture.textureId, texture.size.width(), texture.size.height()); @@ -557,7 +557,6 @@ void QSGSharedDistanceFieldGlyphCache::processPendingGlyphs() void QSGSharedDistanceFieldGlyphCache::reportItemsAvailable(const QByteArray &cacheId, void *bufferId, - const QSize &bufferSize, const QVector &itemIds, const QVector &positions) { @@ -568,8 +567,8 @@ void QSGSharedDistanceFieldGlyphCache::reportItemsAvailable(const QByteArray &ca return; #if defined(QSGSHAREDDISTANCEFIELDGLYPHCACHE_DEBUG) - qDebug("QSGSharedDistanceFieldGlyphCache::reportItemsAvailable() called for %s (%d glyphs, bufferSize: %dx%d)", - cacheId.constData(), itemIds.size(), bufferSize.width(), bufferSize.height()); + qDebug("QSGSharedDistanceFieldGlyphCache::reportItemsAvailable() called for %s (%d glyphs)", + cacheId.constData(), itemIds.size()); #endif for (int i=0; i &itemIds, const QVector &positions) { @@ -597,19 +596,17 @@ void QSGSharedDistanceFieldGlyphCache::reportItemsUpdated(const QByteArray &cach Q_ASSERT(itemIds.size() == positions.size()); #if defined(QSGSHAREDDISTANCEFIELDGLYPHCACHE_DEBUG) - qDebug("QSGSharedDistanceFieldGlyphCache::reportItemsUpdated() called for %s (%d glyphs, bufferSize: %dx%d)", - cacheId.constData(), itemIds.size(), bufferSize.width(), bufferSize.height()); + qDebug("QSGSharedDistanceFieldGlyphCache::reportItemsUpdated() called for %s (%d glyphs)", + cacheId.constData(), itemIds.size()); #endif for (int i=0; i= pendingGlyph.bufferSize.height()); pendingGlyph.buffer = bufferId; pendingGlyph.position = positions.at(i); - pendingGlyph.bufferSize = bufferSize; m_sharedGraphicsCache->referenceBuffer(bufferId); if (oldBuffer != 0) diff --git a/src/quick/scenegraph/qsgshareddistancefieldglyphcache_p.h b/src/quick/scenegraph/qsgshareddistancefieldglyphcache_p.h index 19844bb..2d43246 100644 --- a/src/quick/scenegraph/qsgshareddistancefieldglyphcache_p.h +++ b/src/quick/scenegraph/qsgshareddistancefieldglyphcache_p.h @@ -77,10 +77,13 @@ Q_SIGNALS: private Q_SLOTS: void reportItemsMissing(const QByteArray &cacheId, const QVector &itemIds); void reportItemsAvailable(const QByteArray &cacheId, - void *bufferId, const QSize &bufferSize, - const QVector &itemIds, const QVector &positions); - void reportItemsUpdated(const QByteArray &cacheId, void *bufferId, const QSize &bufferSize, - const QVector &itemIds, const QVector &positions); + void *bufferId, + const QVector &itemIds, + const QVector &positions); + void reportItemsUpdated(const QByteArray &cacheId, + void *bufferId, + const QVector &itemIds, + const QVector &positions); void reportItemsInvalidated(const QByteArray &cacheId, const QVector &itemIds); private: