Guard ANGLE and MESA instead of defining them as native when unsupported.

Since we've added "angle" to the default list of configs we've been running
kNative_GLContextType tests twice in DM, once for the real native, once for
angle.  This pointlessly doubles the GPU critical path in DM.  Whoops.

NOTREECHECKS=true

BUG=skia:
R=bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/471063002
This commit is contained in:
mtklein 2014-08-14 10:36:55 -07:00 коммит произвёл Commit bot
Родитель 9f1ae465c8
Коммит 60c7707958
1 изменённых файлов: 7 добавлений и 9 удалений

Просмотреть файл

@ -63,20 +63,14 @@ static SkString lowercase(SkString s) {
}
static const GrContextFactory::GLContextType native = GrContextFactory::kNative_GLContextType;
static const GrContextFactory::GLContextType nvpr = GrContextFactory::kNVPR_GLContextType;
static const GrContextFactory::GLContextType nvpr = GrContextFactory::kNVPR_GLContextType;
static const GrContextFactory::GLContextType null = GrContextFactory::kNull_GLContextType;
static const GrContextFactory::GLContextType debug = GrContextFactory::kDebug_GLContextType;
static const GrContextFactory::GLContextType angle =
#if SK_ANGLE
GrContextFactory::kANGLE_GLContextType;
#else
native;
static const GrContextFactory::GLContextType angle = GrContextFactory::kANGLE_GLContextType;
#endif
static const GrContextFactory::GLContextType mesa =
#if SK_MESA
GrContextFactory::kMESA_GLContextType;
#else
native;
static const GrContextFactory::GLContextType mesa = GrContextFactory::kMESA_GLContextType;
#endif
static void kick_off_gms(const SkTDArray<GMRegistry::Factory>& gms,
@ -101,8 +95,12 @@ static void kick_off_gms(const SkTDArray<GMRegistry::Factory>& gms,
START("nvprmsaa16", GpuGMTask, expectations, nvpr, gpuAPI, 16);
START("gpunull", GpuGMTask, expectations, null, gpuAPI, 0);
START("gpudebug", GpuGMTask, expectations, debug, gpuAPI, 0);
#if SK_ANGLE
START("angle", GpuGMTask, expectations, angle, gpuAPI, 0);
#endif
#if SK_MESA
START("mesa", GpuGMTask, expectations, mesa, gpuAPI, 0);
#endif
START("pdf", PDFTask, RASTERIZE_PDF_PROC);
}
}