Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: dm/DMGpuTask.cpp

Issue 29293003: DM: add --writePath (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: directory per config Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dm/DMCpuTask.cpp ('k') | dm/DMReplayTask.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "DMGpuTask.h" 1 #include "DMGpuTask.h"
2 2
3 #include "DMComparisonTask.h" 3 #include "DMComparisonTask.h"
4 #include "DMUtil.h" 4 #include "DMUtil.h"
5 #include "DMWriteTask.h"
5 #include "SkCommandLineFlags.h" 6 #include "SkCommandLineFlags.h"
6 #include "SkGpuDevice.h" 7 #include "SkGpuDevice.h"
7 #include "SkTLS.h" 8 #include "SkTLS.h"
8 9
9 namespace DM { 10 namespace DM {
10 11
11 GpuTask::GpuTask(const char* name, 12 GpuTask::GpuTask(const char* name,
12 Reporter* reporter, 13 Reporter* reporter,
13 TaskRunner* taskRunner, 14 TaskRunner* taskRunner,
14 const skiagm::ExpectationsSource& expectations, 15 const skiagm::ExpectationsSource& expectations,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 fGM->draw(&canvas); 52 fGM->draw(&canvas);
52 canvas.flush(); 53 canvas.flush();
53 54
54 SkBitmap bitmap; 55 SkBitmap bitmap;
55 bitmap.setConfig(fConfig, SkScalarCeilToInt(fGM->width()), SkScalarCeilToInt (fGM->height())); 56 bitmap.setConfig(fConfig, SkScalarCeilToInt(fGM->width()), SkScalarCeilToInt (fGM->height()));
56 canvas.readPixels(&bitmap, 0, 0); 57 canvas.readPixels(&bitmap, 0, 0);
57 58
58 // We offload checksum comparison to the main CPU threadpool. 59 // We offload checksum comparison to the main CPU threadpool.
59 // This cuts run time by about 30%. 60 // This cuts run time by about 30%.
60 this->spawnChild(SkNEW_ARGS(ComparisonTask, (*this, fExpectations, bitmap))) ; 61 this->spawnChild(SkNEW_ARGS(ComparisonTask, (*this, fExpectations, bitmap))) ;
62 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap)));
61 } 63 }
62 64
63 bool GpuTask::shouldSkip() const { 65 bool GpuTask::shouldSkip() const {
64 return SkToBool(fGM->getFlags() & skiagm::GM::kSkipGPU_Flag); 66 return SkToBool(fGM->getFlags() & skiagm::GM::kSkipGPU_Flag);
65 } 67 }
66 68
67 } // namespace DM 69 } // namespace DM
OLDNEW
« no previous file with comments | « dm/DMCpuTask.cpp ('k') | dm/DMReplayTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698