Revert of Revert of Turn on NVPR 4x MSAA by default when supported in DM and nanobenc...
authormtklein <mtklein@google.com>
Thu, 6 Nov 2014 16:06:39 +0000 (08:06 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 6 Nov 2014 16:06:39 +0000 (08:06 -0800)
Reason for revert:
Try again with loops overflow fix landed.

Original issue's description:
> Revert of Turn on NVPR 4x MSAA by default when supported in DM and nanobench. (patchset #2 id:20001 of https://codereview.chromium.org/704563003/)
>
> Reason for revert:
> Timing out on nvpr when drawing conics. Fix will take some thought so reverting for now.
>
> Original issue's description:
> > Turn on NVPR 4x MSAA by default when supported in DM and nanobench.
> >
> > This brings DM and nanobench's default configs in line with GM's.
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/31f88675718966bbb7f09718b40de10c7e214739
>
> TBR=bsalomon@google.com,mtklein@google.com,mtklein@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/d5cd4ee5b81b51e43be7ed13f3c0f0f6c1b3fe14

TBR=bsalomon@google.com,mtklein@chromium.org,egdaniel@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/685923003

dm/DMGpuGMTask.cpp
dm/DMGpuSupport.h
include/gpu/gl/GrGLFunctions.h
tools/flags/SkCommonFlags.cpp

index fb170a26b9796ac2404e7d7a8a9d1d2a0fdc1aae..2890483f55455e022ac3a29702adb290e4462b93 100644 (file)
@@ -22,6 +22,8 @@ GpuGMTask::GpuGMTask(const char* config,
     , fSampleCount(sampleCount)
     {}
 
+static bool gAlreadyWarned[GrContextFactory::kGLContextTypeCnt][kGrGLStandardCnt];
+
 void GpuGMTask::draw(GrContextFactory* grFactory) {
     SkImageInfo info = SkImageInfo::Make(SkScalarCeilToInt(fGM->width()),
                                          SkScalarCeilToInt(fGM->height()),
@@ -30,7 +32,11 @@ void GpuGMTask::draw(GrContextFactory* grFactory) {
     SkAutoTUnref<SkSurface> surface(NewGpuSurface(grFactory, fContextType, fGpuAPI, info,
                                                   fSampleCount));
     if (!surface) {
-        this->fail("Could not create context for the config and the api.");
+        if (!gAlreadyWarned[fContextType][fGpuAPI]) {
+            SkDebugf("FYI: couldn't create GPU context, type %d API %d.  Will skip.\n",
+                     fContextType, fGpuAPI);
+            gAlreadyWarned[fContextType][fGpuAPI] = true;
+        }
         return;
     }
     SkCanvas* canvas = surface->getCanvas();
index af6270dfc3525be9605de25189f81c01694ae864..90b0ea55cff70c0615f4746626e325a723e2f8d3 100644 (file)
@@ -36,6 +36,7 @@ enum GrGLStandard {
     kGL_GrGLStandard,
     kGLES_GrGLStandard
 };
+static const int kGrGLStandardCnt = 3;
 
 class GrContextFactory {
 public:
@@ -47,6 +48,7 @@ public:
                                kNVPR_GLContextType   = 0,
                                kNative_GLContextType = 0,
                                kNull_GLContextType   = 0;
+    static const int kGLContextTypeCnt = 1;
     void destroyContexts() {}
 
     void abandonContexts() {}
index dd62085012504dcd183441d9a521ac54caef2e3a..0b7beb601f37f737cd6223f5f2f361a1c379c6d7 100644 (file)
@@ -22,6 +22,7 @@ enum GrGLStandard {
     kGL_GrGLStandard,
     kGLES_GrGLStandard,
 };
+static const int kGrGLStandardCnt = 3;
 
 ///////////////////////////////////////////////////////////////////////////////
 
index 99d05c15f7e4cc7fa4dfa45f0ef12b95b67076c5..4d329c5f30ccbcbe157da9c2da65045b9c886242 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "SkCommonFlags.h"
 
-DEFINE_string(config, "565 8888 pdf gpu nonrendering angle",
+DEFINE_string(config, "565 8888 pdf gpu nonrendering angle nvprmsaa4",
               "Options: 565 8888 pdf gpu nonrendering msaa4 msaa16 nvprmsaa4 nvprmsaa16 "
               "gpunull gpudebug angle mesa");