aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2012-05-16 14:41:30 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-16 18:33:06 +0200
commitca63fd4e9e0e1e974518380991e6f814768d0ebe (patch)
tree71285f200085813e095cf60ab8a3d2764eb9a9f0 /src/quick/scenegraph
parenta9ad3dea7e936d82650b95a6a59ba25421f2e29f (diff)
Removed ### from scenegraph
Change-Id: I6b114938d2c52df95469975ffa87449f7fd8c647 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/coreapi/qsggeometry.h3
-rw-r--r--src/quick/scenegraph/coreapi/qsgrenderer.cpp7
-rw-r--r--src/quick/scenegraph/qsgadaptationlayer.cpp35
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp10
4 files changed, 5 insertions, 50 deletions
diff --git a/src/quick/scenegraph/coreapi/qsggeometry.h b/src/quick/scenegraph/coreapi/qsggeometry.h
index a11ec42976..19391f561b 100644
--- a/src/quick/scenegraph/coreapi/qsggeometry.h
+++ b/src/quick/scenegraph/coreapi/qsggeometry.h
@@ -63,7 +63,8 @@ public:
int type;
uint isVertexCoordinate : 1;
- uint migrateYourCodeToUseTheCreateFunction: 31; // ### Remove before release
+
+ uint reserved : 31;
static Attribute create(int pos, int tupleSize, int primitiveType, bool isPosition = false);
};
diff --git a/src/quick/scenegraph/coreapi/qsgrenderer.cpp b/src/quick/scenegraph/coreapi/qsgrenderer.cpp
index 30dd449b4b..76200b94d7 100644
--- a/src/quick/scenegraph/coreapi/qsgrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgrenderer.cpp
@@ -631,12 +631,9 @@ static inline GLenum qt_drawTypeForPattern(QSGGeometry::DataPattern p)
void QSGRenderer::draw(const QSGMaterialShader *shader, const QSGGeometry *g)
{
- // ### remove before final release...
- static bool use_vbo = !QGuiApplication::arguments().contains(QLatin1String("--no-vbo"));
-
const void *vertexData;
int vertexByteSize = g->vertexCount() * g->sizeOfVertex();
- if (use_vbo && g->vertexDataPattern() != QSGGeometry::AlwaysUploadPattern && vertexByteSize > 1024) {
+ if (g->vertexDataPattern() != QSGGeometry::AlwaysUploadPattern && vertexByteSize > 1024) {
// The base pointer for a VBO is 0
vertexData = 0;
@@ -686,7 +683,7 @@ void QSGRenderer::draw(const QSGMaterialShader *shader, const QSGGeometry *g)
// Set up the indices...
const void *indexData;
- if (use_vbo && g->indexDataPattern() != QSGGeometry::AlwaysUploadPattern && g->indexCount() > 512) {
+ if (g->indexDataPattern() != QSGGeometry::AlwaysUploadPattern && g->indexCount() > 512) {
// Base pointer for a VBO is 0
indexData = 0;
diff --git a/src/quick/scenegraph/qsgadaptationlayer.cpp b/src/quick/scenegraph/qsgadaptationlayer.cpp
index c78e243dcd..5c7aae0b59 100644
--- a/src/quick/scenegraph/qsgadaptationlayer.cpp
+++ b/src/quick/scenegraph/qsgadaptationlayer.cpp
@@ -154,46 +154,11 @@ void QSGDistanceFieldGlyphCache::update()
QHash<glyph_t, QImage> distanceFields;
- // ### Remove before final release
- static bool cacheDistanceFields = QGuiApplication::arguments().contains(QLatin1String("--cache-distance-fields"));
-
- QString tmpPath = QString::fromLatin1("%1/.qt/").arg(QDir::tempPath());
- QString keyBase = QString::fromLatin1("%1%2%3_%4_%5_%6.fontblob")
- .arg(tmpPath)
- .arg(m_referenceFont.familyName())
- .arg(m_referenceFont.styleName())
- .arg(m_referenceFont.weight())
- .arg(m_referenceFont.style());
-
- if (cacheDistanceFields && !QFile::exists(tmpPath))
- QDir(tmpPath).mkpath(tmpPath);
-
for (int i = 0; i < m_pendingGlyphs.size(); ++i) {
glyph_t glyphIndex = m_pendingGlyphs.at(i);
- if (cacheDistanceFields) {
- QString key = keyBase.arg(glyphIndex);
- QFile file(key);
- if (file.open(QFile::ReadOnly)) {
- int fileSize = file.size();
- int dim = sqrt(float(fileSize));
- QByteArray blob = file.readAll();
- QImage df(dim, dim, QImage::Format_Indexed8);
- memcpy(df.bits(), blob.constData(), fileSize);
- distanceFields.insert(glyphIndex, df);
- continue;
- }
- }
-
QImage distanceField = qt_renderDistanceFieldGlyph(m_referenceFont, glyphIndex, m_doubleGlyphResolution);
distanceFields.insert(glyphIndex, distanceField);
-
- if (cacheDistanceFields) {
- QString key = keyBase.arg(glyphIndex);
- QFile file(key);
- file.open(QFile::WriteOnly);
- file.write((const char *) distanceField.constBits(), distanceField.width() * distanceField.height());
- }
}
m_pendingGlyphs.reset();
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index c7a6b323f5..20b383a2b6 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -151,7 +151,6 @@ QSGContext::QSGContext(QObject *parent) :
QObject(*(new QSGContextPrivate), parent)
{
Q_D(QSGContext);
- // ### Do something with these before final release...
static bool doSubpixel = qApp->arguments().contains(QLatin1String("--text-subpixel-antialiasing"));
static bool doLowQualSubpixel = qApp->arguments().contains(QLatin1String("--text-subpixel-antialiasing-lowq"));
static bool doGray = qApp->arguments().contains(QLatin1String("--text-gray-antialiasing"));
@@ -359,14 +358,7 @@ QSGGlyphNode *QSGContext::createGlyphNode()
*/
QSGRenderer *QSGContext::createRenderer()
{
- // ### Do something with this before release...
- static bool doFrontToBack = qApp->arguments().contains(QLatin1String("--opaque-front-to-back"));
- QSGDefaultRenderer *renderer = new QSGDefaultRenderer(this);
- if (doFrontToBack) {
- printf("QSGContext: Sorting opaque nodes front to back...\n");
- renderer->setSortFrontToBackEnabled(true);
- }
- return renderer;
+ return new QSGDefaultRenderer(this);
}