From c7ad40f76f6f23b3acd73b53e989220fd71f2da2 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Thu, 31 May 2018 14:27:17 -0400 Subject: Remove SK_SUPPORT_GPU checks in tool-only code Most of this is (obviously) not necessary to do, but once I started, I figured I'd just get it all. Tools (nanobench, DM, skiaserve), all GMs, benches, and unit tests, plus support code (command line parsing and config stuff). This is almost entirely mechanical. Bug: skia: Change-Id: I209500f8df8c5bd43f8298ff26440d1c4d7425fb Reviewed-on: https://skia-review.googlesource.com/131153 Reviewed-by: Mike Klein Reviewed-by: Brian Salomon Commit-Queue: Brian Osman --- bench/SKPBench.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'bench/SKPBench.cpp') diff --git a/bench/SKPBench.cpp b/bench/SKPBench.cpp index 1391b40cf6..2612021510 100644 --- a/bench/SKPBench.cpp +++ b/bench/SKPBench.cpp @@ -10,10 +10,8 @@ #include "SkMultiPictureDraw.h" #include "SkSurface.h" -#if SK_SUPPORT_GPU #include "GrContext.h" #include "GrContextPriv.h" -#endif // These CPU tile sizes are not good per se, but they are similar to what Chrome uses. DEFINE_int32(CPUbenchTileW, 256, "Tile width used for CPU SKP playback."); @@ -120,12 +118,10 @@ void SKPBench::onDraw(int loops, SkCanvas* canvas) { if (0 == --loops) { break; } -#if SK_SUPPORT_GPU // Ensure the GrContext doesn't combine ops across draw loops. if (GrContext* context = canvas->getGrContext()) { context->flush(); } -#endif } } @@ -158,7 +154,6 @@ void SKPBench::drawPicture() { } } -#if SK_SUPPORT_GPU #include "GrGpu.h" static void draw_pic_for_stats(SkCanvas* canvas, GrContext* context, const SkPicture* picture, SkTArray* keys, SkTArray* values, @@ -176,10 +171,8 @@ static void draw_pic_for_stats(SkCanvas* canvas, GrContext* context, const SkPic (*keys)[i].appendf("_%s", tag); } } -#endif void SKPBench::getGpuStats(SkCanvas* canvas, SkTArray* keys, SkTArray* values) { -#if SK_SUPPORT_GPU // we do a special single draw and then dump the key / value pairs GrContext* context = canvas->getGrContext(); if (!context) { @@ -195,6 +188,4 @@ void SKPBench::getGpuStats(SkCanvas* canvas, SkTArray* keys, SkTArray< // draw second frame draw_pic_for_stats(canvas, context, fPic.get(), keys, values, "second_frame"); - -#endif } -- cgit v1.2.3