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

Side by Side Diff: dm/DMGpuTask.cpp

Issue 32613003: DM: add --serialize (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: no-find-copies 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.h » ('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 "DMWriteTask.h"
6 #include "SkCommandLineFlags.h" 6 #include "SkCommandLineFlags.h"
7 #include "SkGpuDevice.h" 7 #include "SkGpuDevice.h"
8 #include "SkTLS.h" 8 #include "SkTLS.h"
9 9
10 namespace DM { 10 namespace DM {
11 11
12 GpuTask::GpuTask(const char* name, 12 GpuTask::GpuTask(const char* name,
13 Reporter* reporter, 13 Reporter* reporter,
14 TaskRunner* taskRunner, 14 TaskRunner* taskRunner,
15 const skiagm::ExpectationsSource& expectations, 15 const skiagm::ExpectationsSource& expectations,
16 skiagm::GMRegistry::Factory gmFactory, 16 skiagm::GMRegistry::Factory gmFactory,
17 SkBitmap::Config config, 17 SkBitmap::Config config,
18 GrContextFactory::GLContextType contextType, 18 GrContextFactory::GLContextType contextType,
19 int sampleCount) 19 int sampleCount)
20 : Task(reporter, taskRunner) 20 : Task(reporter, taskRunner)
21 , fGM(gmFactory(NULL)) 21 , fGM(gmFactory(NULL))
22 , fName(underJoin(fGM->shortName(), name)) 22 , fName(UnderJoin(fGM->shortName(), name))
23 , fExpectations(expectations.get(png(fName).c_str())) 23 , fExpectations(expectations.get(Png(fName).c_str()))
24 , fConfig(config) 24 , fConfig(config)
25 , fContextType(contextType) 25 , fContextType(contextType)
26 , fSampleCount(sampleCount) 26 , fSampleCount(sampleCount)
27 {} 27 {}
28 28
29 static void* new_gr_context_factory() { 29 static void* new_gr_context_factory() {
30 return SkNEW(GrContextFactory); 30 return SkNEW(GrContextFactory);
31 } 31 }
32 32
33 static void delete_gr_context_factory(void* factory) { 33 static void delete_gr_context_factory(void* factory) {
(...skipping 26 matching lines...) Expand all
60 // This cuts run time by about 30%. 60 // This cuts run time by about 30%.
61 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))); 62 this->spawnChild(SkNEW_ARGS(WriteTask, (*this, bitmap)));
63 } 63 }
64 64
65 bool GpuTask::shouldSkip() const { 65 bool GpuTask::shouldSkip() const {
66 return SkToBool(fGM->getFlags() & skiagm::GM::kSkipGPU_Flag); 66 return SkToBool(fGM->getFlags() & skiagm::GM::kSkipGPU_Flag);
67 } 67 }
68 68
69 } // namespace DM 69 } // namespace DM
OLDNEW
« no previous file with comments | « dm/DMCpuTask.cpp ('k') | dm/DMReplayTask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698