[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/krita/benchmarks
From: Lukáš Tvrdý <lukast.dev () gmail ! com>
Date: 2010-01-29 14:17:01
Message-ID: 1264774621.856234.2561.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1081999 by lukast:
Clean up: add missing benchmarks, rename some benchmark to follow other benchmarks
M +0 -2 kis_bcontrast_benchmark.cpp
M +3 -0 kis_benchmark_values.h
M +18 -9 kis_vline_iterator_benchmark.cpp
M +3 -3 kis_vline_iterator_benchmark.h
--- trunk/koffice/krita/benchmarks/kis_bcontrast_benchmark.cpp #1081998:1081999
@@ -38,8 +38,6 @@
#include "kis_selection.h"
-#define GMP_IMAGE_WIDTH 3274
-#define GMP_IMAGE_HEIGHT 2067
void KisBContrastBenchmark::initTestCase()
{
--- trunk/koffice/krita/benchmarks/kis_benchmark_values.h #1081998:1081999
@@ -25,4 +25,7 @@
#define NO_TILE_EXACT_BOUNDARY_WIDTH 1021
#define NO_TILE_EXACT_BOUNDARY_HEIGHT 1084
+#define GMP_IMAGE_WIDTH 3274
+#define GMP_IMAGE_HEIGHT 2067
+
#endif
--- trunk/koffice/krita/benchmarks/kis_vline_iterator_benchmark.cpp #1081998:1081999
@@ -123,7 +123,7 @@
}
-void KisVLineIteratorBenchmark::benchmarkWriteBytesNoMemCpy()
+void KisVLineIteratorBenchmark::benchmarkNoMemCpy()
{
KisVLineIteratorPixel it = m_device->createVLineIterator(0, 0, \
TEST_IMAGE_HEIGHT);
@@ -138,9 +138,11 @@
}
-void KisVLineIteratorBenchmark::benchmarkReadBytesNoMemCpy()
+
+
+void KisVLineIteratorBenchmark::benchmarkConstNoMemCpy()
{
- KisVLineIteratorPixel it = m_device->createVLineIterator(0, 0, \
TEST_IMAGE_HEIGHT); + KisVLineConstIteratorPixel it = \
m_device->createVLineConstIterator(0, 0, TEST_IMAGE_HEIGHT);
QBENCHMARK{
for (int j = 0; j < TEST_IMAGE_WIDTH; j++) {
@@ -153,21 +155,28 @@
}
-void KisVLineIteratorBenchmark::benchmarkConstReadBytesNoMemCpy()
+void KisVLineIteratorBenchmark::benchmarkTwoIteratorsNoMemCpy()
{
- KisVLineConstIteratorPixel it = m_device->createVLineConstIterator(0, 0, \
TEST_IMAGE_HEIGHT); + KoColor c(m_colorSpace);
+ c.fromQColor(QColor(250,120,0));
+ KisPaintDevice dab(m_colorSpace);
+ dab.fill(0,0,TEST_IMAGE_WIDTH,TEST_IMAGE_HEIGHT, c.data());
+
+ KisVLineIteratorPixel writeIterator = m_device->createVLineIterator(0, 0, \
TEST_IMAGE_HEIGHT); + KisVLineConstIteratorPixel constReadIterator = \
dab.createVLineConstIterator(0, 0, TEST_IMAGE_HEIGHT);
QBENCHMARK{
for (int j = 0; j < TEST_IMAGE_WIDTH; j++) {
- while (!it.isDone()) {
- ++it;
+ while (!constReadIterator.isDone()) {
+ ++constReadIterator;
+ ++writeIterator;
}
- it.nextCol();
+ constReadIterator.nextCol();
+ writeIterator.nextCol();
}
}
}
-
QTEST_KDEMAIN(KisVLineIteratorBenchmark, GUI)
#include "kis_vline_iterator_benchmark.moc"
--- trunk/koffice/krita/benchmarks/kis_vline_iterator_benchmark.h #1081998:1081999
@@ -49,9 +49,9 @@
// copy from one device to another
void benchmarkReadWriteBytes();
- void benchmarkWriteBytesNoMemCpy();
- void benchmarkReadBytesNoMemCpy();
- void benchmarkConstReadBytesNoMemCpy();
+ void benchmarkNoMemCpy();
+ void benchmarkConstNoMemCpy();
+ void benchmarkTwoIteratorsNoMemCpy();
};
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic