| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 6 * Copyright (C) 2010 Renata Hodovan <reni@inf.u-szeged.hu> | 6 * Copyright (C) 2010 Renata Hodovan <reni@inf.u-szeged.hu> |
| 7 * Copyright (C) 2011 Gabor Loki <loki@webkit.org> | 7 * Copyright (C) 2011 Gabor Loki <loki@webkit.org> |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 #endif // ENABLE(PARALLEL_JOBS) | 365 #endif // ENABLE(PARALLEL_JOBS) |
| 366 | 366 |
| 367 void FETurbulence::apply() | 367 void FETurbulence::apply() |
| 368 { | 368 { |
| 369 if (hasResult()) | 369 if (hasResult()) |
| 370 return; | 370 return; |
| 371 ByteArray* pixelArray = createUnmultipliedImageResult(); | 371 ByteArray* pixelArray = createUnmultipliedImageResult(); |
| 372 if (!pixelArray) | 372 if (!pixelArray) |
| 373 return; | 373 return; |
| 374 | 374 |
| 375 if (absolutePaintRect().isEmpty()) | 375 if (absolutePaintRect().isEmpty()) { |
| 376 pixelArray->clear(); |
| 376 return; | 377 return; |
| 378 } |
| 377 | 379 |
| 378 PaintingData paintingData(m_seed, roundedIntSize(filterPrimitiveSubregion().
size())); | 380 PaintingData paintingData(m_seed, roundedIntSize(filterPrimitiveSubregion().
size())); |
| 379 initPaint(paintingData); | 381 initPaint(paintingData); |
| 380 | 382 |
| 381 #if ENABLE(PARALLEL_JOBS) | 383 #if ENABLE(PARALLEL_JOBS) |
| 382 | 384 |
| 383 int optimalThreadNumber = (absolutePaintRect().width() * absolutePaintRect()
.height()) / s_minimalRectDimension; | 385 int optimalThreadNumber = (absolutePaintRect().width() * absolutePaintRect()
.height()) / s_minimalRectDimension; |
| 384 if (optimalThreadNumber > 1) { | 386 if (optimalThreadNumber > 1) { |
| 385 // Initialize parallel jobs | 387 // Initialize parallel jobs |
| 386 ParallelJobs<FillRegionParameters> parallelJobs(&WebCore::FETurbulence::
fillRegionWorker, optimalThreadNumber); | 388 ParallelJobs<FillRegionParameters> parallelJobs(&WebCore::FETurbulence::
fillRegionWorker, optimalThreadNumber); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 << "baseFrequency=\"" << baseFrequencyX() << ", " << baseFrequencyY() <<
"\" " | 447 << "baseFrequency=\"" << baseFrequencyX() << ", " << baseFrequencyY() <<
"\" " |
| 446 << "seed=\"" << seed() << "\" " | 448 << "seed=\"" << seed() << "\" " |
| 447 << "numOctaves=\"" << numOctaves() << "\" " | 449 << "numOctaves=\"" << numOctaves() << "\" " |
| 448 << "stitchTiles=\"" << stitchTiles() << "\"]\n"; | 450 << "stitchTiles=\"" << stitchTiles() << "\"]\n"; |
| 449 return ts; | 451 return ts; |
| 450 } | 452 } |
| 451 | 453 |
| 452 } // namespace WebCore | 454 } // namespace WebCore |
| 453 | 455 |
| 454 #endif // ENABLE(FILTERS) | 456 #endif // ENABLE(FILTERS) |
| OLD | NEW |