diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-03-28 16:19:11 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-03-28 16:19:11 +0000 |
commit | d3b9fbbc48c13a1b2a664cf7e01374a44c201f51 (patch) | |
tree | f4f1ade2e1ce0953eeb0551c96603e51bfdd08e2 /gm | |
parent | 42aea289cbf801997b653a906a37a7f7e948b645 (diff) |
Code changes for ANGLE GL interface. .gyp file changes will be delivered later.
http://codereview.appspot.com/5940046/
git-svn-id: http://skia.googlecode.com/svn/trunk@3519 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r-- | gm/gmmain.cpp | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp index a8aa49cb9f..76bd4914b1 100644 --- a/gm/gmmain.cpp +++ b/gm/gmmain.cpp @@ -20,7 +20,12 @@ #include "SkImageDecoder.h" #include "SkImageEncoder.h" #include "gl/SkNativeGLContext.h" +#if SK_MESA #include "gl/SkMesaGLContext.h" +#endif +#if SK_ANGLE +#include "gl/SkANGLEGLContext.h" +#endif #include "gl/SkDebugGLContext.h" #include "SkPicture.h" #include "SkStream.h" @@ -612,6 +617,9 @@ static void usage(const char * argv0) { #if SK_MESA "[--mesagl]" #endif +#if SK_ANGLE + " [--angle]" +#endif " [--debuggl]\n\n", argv0); SkDebugf(" writePath: directory to write rendered images in.\n"); SkDebugf( @@ -625,11 +633,14 @@ static void usage(const char * argv0) { SkDebugf(" --forceBWtext: disable text anti-aliasing.\n"); SkDebugf(" --nopdf: skip the pdf rendering test pass.\n"); SkDebugf(" --nodeferred: skip the deferred rendering test pass.\n"); - SkDebugf(" --match foo will only run tests that substring match foo.\n"); + SkDebugf(" --match foo: will only run tests that substring match foo.\n"); #if SK_MESA - SkDebugf(" --mesagl will run using the osmesa sw gl rasterizer.\n"); + SkDebugf(" --mesagl: will run using the osmesa sw gl rasterizer.\n"); +#endif +#if SK_ANGLE + SkDebugf(" --angle: use ANGLE backend on Windows.\n"); #endif - SkDebugf(" --debuggl will run using the debugging gl utility.\n"); + SkDebugf(" --debuggl: will run using the debugging gl utility.\n"); SkDebugf(" --notexturecache: disable the gpu texture cache.\n"); } @@ -686,7 +697,12 @@ int main(int argc, char * const argv[]) { bool doPDF = true; bool doReplay = true; bool doSerialize = false; +#if SK_MESA bool useMesa = false; +#endif +#if SK_ANGLE + bool useAngle = false; +#endif bool useDebugGL = false; bool doDeferred = true; bool disableTextureCache = false; @@ -734,6 +750,10 @@ int main(int argc, char * const argv[]) { } else if (strcmp(*argv, "--mesagl") == 0) { useMesa = true; #endif +#if SK_ANGLE + } else if (strcmp(*argv, "--angle") == 0) { + useAngle = true; +#endif } else if (strcmp(*argv, "--debuggl") == 0) { useDebugGL = true; } else if (strcmp(*argv, "--notexturecache") == 0) { @@ -769,6 +789,11 @@ int main(int argc, char * const argv[]) { glContext.reset(new SkMesaGLContext()); } else #endif +#if SK_ANGLE + if (useAngle) { + glContext.reset(new SkANGLEGLContext()); + } else +#endif if (useDebugGL) { glContext.reset(new SkDebugGLContext()); } else { |