diff options
Diffstat (limited to 'dm/DMBenchTask.cpp')
-rw-r--r-- | dm/DMBenchTask.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/dm/DMBenchTask.cpp b/dm/DMBenchTask.cpp index 9bdbbf2974..7cd2fdcb03 100644 --- a/dm/DMBenchTask.cpp +++ b/dm/DMBenchTask.cpp @@ -33,13 +33,11 @@ GpuBenchTask::GpuBenchTask(const char* config, TaskRunner* tasks, BenchRegistry::Factory factory, GrContextFactory::GLContextType contextType, - GrGLStandard gpuAPI, int sampleCount) : GpuTask(reporter, tasks) , fBench(factory(NULL)) , fName(bench_name(fBench->getName(), config)) , fContextType(contextType) - , fGpuAPI(gpuAPI) , fSampleCount(sampleCount) {} bool NonRenderingBenchTask::shouldSkip() const { @@ -76,12 +74,8 @@ void GpuBenchTask::draw(GrContextFactory* grFactory) { fBench->getSize().y(), kN32_SkColorType, kPremul_SkAlphaType); - SkAutoTUnref<SkSurface> surface(NewGpuSurface(grFactory, fContextType, fGpuAPI, info, - fSampleCount)); - if (!surface) { - this->fail("Could not create context for the config and the api."); - return; - } + SkAutoTUnref<SkSurface> surface(NewGpuSurface(grFactory, fContextType, info, fSampleCount)); + fBench->preDraw(); fBench->draw(1, surface->getCanvas()); } |