Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(674)

Issue 5569079: Expose '--notexturecache' command line argument to gm. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 7 months ago by twiz
Modified:
12 years, 7 months ago
Reviewers:
bsalomon
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Expose '--notexturecache' command line argument to gm. Pass '--notexturecache' to gm to resize the Ganesh texture cache to 0. This stresses Ganesh's behaviour after a cache purge operation. Committed: https://code.google.com/p/skia/source/detail?r=3123

Patch Set 1 #

Patch Set 2 : Expose '--notexturecache' command line argument to gm. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -5 lines) Patch
M gm/gmmain.cpp View 1 7 chunks +13 lines, -5 lines 0 comments Download

Messages

Total messages: 2
twiz
PTAL.
12 years, 7 months ago (2012-01-27 21:57:51 UTC) #1
bsalomon
12 years, 7 months ago (2012-01-27 23:25:33 UTC) #2
Lgtm
On Jan 27, 2012 2:57 PM, <twiz@chromium.org> wrote:

> Reviewers: bsalomon,
>
> Message:
> PTAL.
>
> Description:
> Expose '--notexturecache' command line argument to gm.
>
> Pass '--notexturecache' to gm to resize the Ganesh texture cache to 0.
> This stresses Ganesh's behaviour after a cache purge operation.
>
> Please review this at
https://codereview.appspot.**com/5569079/<https://codereview.appspot.com/5569...
>
> Affected files:
>  M     gm/gmmain.cpp
>
>
> Index: gm/gmmain.cpp
> ==============================**==============================**=======
> --- gm/gmmain.cpp       (revision 3096)
> +++ gm/gmmain.cpp       (working copy)
> @@ -592,7 +592,7 @@
>     SkDebugf(
>         "%s [-w writePath] [-r readPath] [-d diffPath] [--noreplay]\n"
>         "    [--serialize] [--forceBWtext] [--nopdf] [--nodeferred]\n"
> -        "    [--match substring]"
> +        "    [--match substring] [--notexturecache]"
>  #if SK_MESA
>         " [--mesagl]"
>  #endif
> @@ -612,6 +612,7 @@
>  #if SK_MESA
>     SkDebugf("    --mesagl will run using the osmesa sw gl rasterizer.\n");
>  #endif
> +    SkDebugf("    --notexturecache: disable the gpu texture cache.\n");
>  }
>
>  static const ConfigData gRec[] = {
> @@ -660,13 +661,14 @@
>     const char* diffPath = NULL;    // if non-null, where we write our
> diffs (from compare)
>
>     SkTDArray<const char*> fMatches;
> -
> +
>     bool doPDF = true;
>     bool doReplay = true;
>     bool doSerialize = false;
>     bool useMesa = false;
>     bool doDeferred = true;
> -
> +    bool disableTextureCache = false;
> +
>     const char* const commandName = argv[0];
>     char* const* stop = argv + argc;
>     for (++argv; argv < stop; ++argv) {
> @@ -705,6 +707,8 @@
>         } else if (strcmp(*argv, "--mesagl") == 0) {
>             useMesa = true;
>  #endif
> +        } else if (strcmp(*argv, "--notexturecache") == 0) {
> +          disableTextureCache = true;
>         } else {
>           usage(commandName);
>           return -1;
> @@ -761,6 +765,10 @@
>     int testsFailed = 0;
>     int testsMissingReferenceImages = 0;
>
> +    if (disableTextureCache) {
> +        skiagm::GetGr()->**setTextureCacheLimits(0, 0);
> +    }
> +
>     iter.reset();
>     while ((gm = iter.next()) != NULL) {
>         const char* shortName = gm->shortName();
> @@ -790,7 +798,7 @@
>         for (size_t i = 0; i < SK_ARRAY_COUNT(gRec); i++) {
>             // Skip any tests that we don't even need to try.
>             uint32_t gmFlags = gm->getFlags();
> -            if ((kPDF_Backend == gRec[i].fBackend) &&
> +            if ((kPDF_Backend == gRec[i].fBackend) &&
>                 (!doPDF || (gmFlags & GM::kSkipPDF_Flag)))
>             {
>                 continue;
> @@ -815,7 +823,7 @@
>             }
>
>             if (doDeferred && !testErrors &&
> -                (kGPU_Backend == gRec[i].fBackend ||
> +                (kGPU_Backend == gRec[i].fBackend ||
>                 kRaster_Backend == gRec[i].fBackend)) {
>                 testErrors |= test_deferred_drawing(gm, gRec[i],
>                                     forwardRenderedBitmap,
>
>
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b