diff options
author | mtklein <mtklein@google.com> | 2014-11-06 08:06:39 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-06 08:06:39 -0800 |
commit | 2ecf86e55ecb893cf4d04e16a4ac5b0de6dcf173 (patch) | |
tree | e1f00dc6b6871c026b149e4b447078e87b86546e /dm | |
parent | 527930fdbbba2a20f98b43821c6b72367e7b2d64 (diff) |
Revert of Revert of Turn on NVPR 4x MSAA by default when supported in DM and nanobench. (patchset #1 id:1 of https://codereview.chromium.org/693933004/)
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
Diffstat (limited to 'dm')
-rw-r--r-- | dm/DMGpuGMTask.cpp | 8 | ||||
-rw-r--r-- | dm/DMGpuSupport.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/dm/DMGpuGMTask.cpp b/dm/DMGpuGMTask.cpp index fb170a26b9..2890483f55 100644 --- a/dm/DMGpuGMTask.cpp +++ b/dm/DMGpuGMTask.cpp @@ -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(); diff --git a/dm/DMGpuSupport.h b/dm/DMGpuSupport.h index af6270dfc3..90b0ea55cf 100644 --- a/dm/DMGpuSupport.h +++ b/dm/DMGpuSupport.h @@ -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() {} |