| Index: dm/DMGpuGMTask.cpp
|
| diff --git a/dm/DMGpuGMTask.cpp b/dm/DMGpuGMTask.cpp
|
| index a7b1d7b61f258d43eab1b95e6ec2a02cde4cf3de..3df8ab335fd23abbfc930b63d467f9df78786683 100644
|
| --- a/dm/DMGpuGMTask.cpp
|
| +++ b/dm/DMGpuGMTask.cpp
|
| @@ -15,12 +15,14 @@ GpuGMTask::GpuGMTask(const char* config,
|
| const Expectations& expectations,
|
| skiagm::GMRegistry::Factory gmFactory,
|
| GrContextFactory::GLContextType contextType,
|
| + GrGLStandard forcedGpuApi,
|
| int sampleCount)
|
| : GpuTask(reporter, taskRunner)
|
| , fGM(gmFactory(NULL))
|
| , fName(UnderJoin(fGM->getName(), config))
|
| , fExpectations(expectations)
|
| , fContextType(contextType)
|
| + , fForcedGpuApi(forcedGpuApi)
|
| , fSampleCount(sampleCount)
|
| {}
|
|
|
| @@ -29,7 +31,12 @@ void GpuGMTask::draw(GrContextFactory* grFactory) {
|
| SkScalarCeilToInt(fGM->height()),
|
| kN32_SkColorType,
|
| kPremul_SkAlphaType);
|
| - SkAutoTUnref<SkSurface> surface(NewGpuSurface(grFactory, fContextType, info, fSampleCount));
|
| + SkAutoTUnref<SkSurface> surface(NewGpuSurface(grFactory, fContextType, fForcedGpuApi, info,
|
| + fSampleCount));
|
| + if (!surface) {
|
| + this->fail("Could not create context for the config and the api.");
|
| + return;
|
| + }
|
| SkCanvas* canvas = surface->getCanvas();
|
|
|
| canvas->concat(fGM->getInitialTransform());
|
|
|