diff options
Diffstat (limited to 'bench')
-rw-r--r-- | bench/GrMipMapBench.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bench/GrMipMapBench.cpp b/bench/GrMipMapBench.cpp index e756c13bb4..e7f34de9e7 100644 --- a/bench/GrMipMapBench.cpp +++ b/bench/GrMipMapBench.cpp @@ -37,7 +37,11 @@ protected: auto srgb = SkColorSpace::MakeSRGB(); SkImageInfo info = SkImageInfo::Make(fW, fH, kRGBA_8888_SkColorType, kPremul_SkAlphaType, srgb); - fSurface = SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info); + // We're benching the regeneration of the mip levels not the need to allocate them every + // frame. Thus we create the surface with mips to begin with. + fSurface = SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info, 0, + kBottomLeft_GrSurfaceOrigin, nullptr, true); + } // Clear surface once: |