diff options
author | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-09-20 14:42:33 +0000 |
---|---|---|
committer | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-09-20 14:42:33 +0000 |
commit | bcdf2ec50dfd170959cc2db67c49f6dac084be03 (patch) | |
tree | d6437193532ae252675b7f1de17f39a6fe418a0a /src | |
parent | b4ca9df976951adf632388371f9a8a9219d93014 (diff) |
In bench_pictures, use a pool of tiles for multicore drawing.
Also includes some code cleanup and code sharing.
Allow setting the number of threads on the command line.
Rename ThreadSafePipeController::playback to ::draw, to be the same
as SkPicture so DrawTileToCanvas can take a template parameter.
Disallow multithreading with GPU turned on.
Display help information with improper tiled arguments.
BUG=https://code.google.com/p/skia/issues/detail?id=871
Review URL: https://codereview.appspot.com/6536050
git-svn-id: http://skia.googlecode.com/svn/trunk@5602 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/pipe/utils/SamplePipeControllers.cpp | 2 | ||||
-rw-r--r-- | src/pipe/utils/SamplePipeControllers.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pipe/utils/SamplePipeControllers.cpp b/src/pipe/utils/SamplePipeControllers.cpp index 437a372c18..59f612bf00 100644 --- a/src/pipe/utils/SamplePipeControllers.cpp +++ b/src/pipe/utils/SamplePipeControllers.cpp @@ -103,7 +103,7 @@ void ThreadSafePipeController::notifyWritten(size_t bytes) { fBytesWritten += bytes; } -void ThreadSafePipeController::playback(SkCanvas* target) { +void ThreadSafePipeController::draw(SkCanvas* target) { SkGPipeReader reader(target); for (int currentBlock = 0; currentBlock < fBlockList.count(); currentBlock++ ) { reader.playback(fBlockList[currentBlock].fBlock, fBlockList[currentBlock].fBytes); diff --git a/src/pipe/utils/SamplePipeControllers.h b/src/pipe/utils/SamplePipeControllers.h index 81b9120eaa..5efd6f0b9f 100644 --- a/src/pipe/utils/SamplePipeControllers.h +++ b/src/pipe/utils/SamplePipeControllers.h @@ -64,7 +64,7 @@ public: * used the flag SkGPipeWriter::kSimultaneousReaders_Flag, this can be called from different * threads simultaneously. */ - void playback(SkCanvas*); + void draw(SkCanvas*); private: enum { kMinBlockSize = 4096 |