diff options
author | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-22 16:13:16 +0000 |
---|---|---|
committer | bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-02-22 16:13:16 +0000 |
commit | cb26535ff71fc323278892d6b90546b3b1c54649 (patch) | |
tree | 2c7ef994e1689d298fe5c322f252c7425b14e546 /include | |
parent | cd7421bf3833314a400a53dda7fca5959ac7fff0 (diff) |
Make GPU versions of benchs use the same canvas size as raster.
Review URL: https://codereview.appspot.com/7400049
git-svn-id: http://skia.googlecode.com/svn/trunk@7827 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrContextFactory.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/include/gpu/GrContextFactory.h b/include/gpu/GrContextFactory.h index ea3b923201..d425b74416 100644 --- a/include/gpu/GrContextFactory.h +++ b/include/gpu/GrContextFactory.h @@ -28,7 +28,7 @@ * factory is destroyed (though the caller can always grab a ref on the returned * GrContext to make it outlive the factory). */ -class GrContextFactory : GrNoncopyable { +class GrContextFactory : GrNoncopyable { public: /** * Types of GL contexts supported. @@ -59,6 +59,27 @@ public: } } + static const char* GLContextTypeName(GLContextType type) { + switch (type) { + case kNative_GLContextType: + return "native"; + case kNull_GLContextType: + return "null"; +#if SK_ANGLE + case kANGLE_GLContextType: + return "angle"; +#endif +#if SK_MESA + case kMESA_GLContextType: + return "mesa"; +#endif + case kDebug_GLContextType: + return "debug"; + default: + GrCrash("Unknown GL Context type."); + } + } + GrContextFactory() { } |