aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-05-31 14:27:17 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-31 18:59:44 +0000
commitc7ad40f76f6f23b3acd73b53e989220fd71f2da2 (patch)
tree3a2372730179f1bd0dd2486b6e576ec308f1327b /gm
parent8103bb960933359f6536cbfd40d760e54b079e94 (diff)
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 <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'gm')
-rw-r--r--gm/beziereffects.cpp4
-rw-r--r--gm/bigrrectaaeffect.cpp2
-rw-r--r--gm/bitmapshader.cpp4
-rw-r--r--gm/bitmaptiled.cpp3
-rw-r--r--gm/bleed.cpp4
-rw-r--r--gm/constcolorprocessor.cpp4
-rw-r--r--gm/convexpolyeffect.cpp4
-rw-r--r--gm/crosscontextimage.cpp3
-rw-r--r--gm/dftext.cpp6
-rw-r--r--gm/dftext_blob_persp.cpp6
-rw-r--r--gm/discard.cpp4
-rw-r--r--gm/flippity.cpp4
-rw-r--r--gm/fontcache.cpp4
-rw-r--r--gm/image.cpp9
-rw-r--r--gm/image_pict.cpp10
-rw-r--r--gm/imagefromyuvtextures.cpp4
-rw-r--r--gm/imagemasksubset.cpp2
-rw-r--r--gm/pathmaskcache.cpp4
-rw-r--r--gm/rectangletexture.cpp4
-rw-r--r--gm/rrects.cpp10
-rw-r--r--gm/srcmode.cpp2
-rw-r--r--gm/textblobmixedsizes.cpp6
-rw-r--r--gm/textblobrandomfont.cpp3
-rw-r--r--gm/textblobuseaftergpufree.cpp3
-rw-r--r--gm/texturedomaineffect.cpp4
-rw-r--r--gm/windowrectangles.cpp6
-rw-r--r--gm/xfermodes3.cpp2
-rw-r--r--gm/yuvtorgbeffect.cpp4
28 files changed, 3 insertions, 122 deletions
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp
index 51e8415556..ab9a5fdb5b 100644
--- a/gm/beziereffects.cpp
+++ b/gm/beziereffects.cpp
@@ -10,8 +10,6 @@
#include "gm.h"
#include "sk_tool_utils.h"
-#if SK_SUPPORT_GPU
-
#include "GrContext.h"
#include "GrOpFlushState.h"
#include "GrPathUtils.h"
@@ -638,5 +636,3 @@ DEF_GM(return new BezierCubicEffects;)
DEF_GM(return new BezierConicEffects;)
DEF_GM(return new BezierQuadEffects;)
}
-
-#endif
diff --git a/gm/bigrrectaaeffect.cpp b/gm/bigrrectaaeffect.cpp
index 6f75344ea7..dee19c5547 100644
--- a/gm/bigrrectaaeffect.cpp
+++ b/gm/bigrrectaaeffect.cpp
@@ -7,7 +7,6 @@
#include "gm.h"
#include "sk_tool_utils.h"
-#if SK_SUPPORT_GPU
#include "GrCaps.h"
#include "GrContext.h"
#include "GrRenderTargetContextPriv.h"
@@ -129,4 +128,3 @@ DEF_GM( return new BigRRectAAEffectGM (SkRRect::MakeRectXY(SkRect::MakeIWH(kSize
DEF_GM( return new BigRRectAAEffectGM (SkRRect::MakeRectXY(SkRect::MakeIWH(kSize - 1, kSize - 10), kSize/2.f - 10.f, kSize/2.f - 15.f), "elliptical_corner"); )
}
-#endif
diff --git a/gm/bitmapshader.cpp b/gm/bitmapshader.cpp
index 3f3c51e81a..2671b5a4d2 100644
--- a/gm/bitmapshader.cpp
+++ b/gm/bitmapshader.cpp
@@ -11,11 +11,9 @@
#include "SkShader.h"
#include "sk_tool_utils.h"
-#if SK_SUPPORT_GPU
#include "GrCaps.h"
#include "GrContext.h"
#include "GrContextPriv.h"
-#endif
namespace skiagm {
@@ -121,11 +119,9 @@ DEF_SIMPLE_GM(hugebitmapshader, canvas, 100, 100) {
// (See https://skia-review.googlesource.com/c/skia/+/73200)
int bitmapW = 1;
int bitmapH = 60000;
-#if SK_SUPPORT_GPU
if (auto* ctx = canvas->getGrContext()) {
bitmapH = ctx->contextPriv().caps()->maxTextureSize() + 1;
}
-#endif
bitmap.setInfo(SkImageInfo::MakeA8(bitmapW, bitmapH), bitmapW);
uint8_t* pixels = new uint8_t[bitmapH];
for(int i = 0; i < bitmapH; ++i) {
diff --git a/gm/bitmaptiled.cpp b/gm/bitmaptiled.cpp
index a8ac05aed6..20469360db 100644
--- a/gm/bitmaptiled.cpp
+++ b/gm/bitmaptiled.cpp
@@ -7,7 +7,6 @@
#include "gm.h"
-#if SK_SUPPORT_GPU
#include "GrContext.h"
// This test exercises Ganesh's drawing of tiled bitmaps. In particular, that the offsets and the
@@ -71,5 +70,3 @@ DEF_SIMPLE_GM_BG(bitmaptiled_fractional_horizontal, canvas, 1124, 365, SK_ColorB
DEF_SIMPLE_GM_BG(bitmaptiled_fractional_vertical, canvas, 365, 1124, SK_ColorBLACK) {
draw_tile_bitmap_with_fractional_offset(canvas, true);
}
-
-#endif
diff --git a/gm/bleed.cpp b/gm/bleed.cpp
index 85d3328428..6dc0ebbfaf 100644
--- a/gm/bleed.cpp
+++ b/gm/bleed.cpp
@@ -15,11 +15,9 @@
#include "SkUtils.h"
#include "sk_tool_utils.h"
-#if SK_SUPPORT_GPU
#include "GrContext.h"
#include "GrContextOptions.h"
#include "SkGr.h"
-#endif
/** Holds either a bitmap or image to be rendered and a rect that indicates what part of the bitmap
or image should be tested by the GM. The area outside of the rect is present to check
@@ -402,11 +400,9 @@ protected:
}
}
-#if SK_SUPPORT_GPU
void modifyGrContextOptions(GrContextOptions* options) override {
options->fMaxTileSizeOverride = kMaxTileSize;
}
-#endif
private:
static constexpr int kBlockSize = 70;
diff --git a/gm/constcolorprocessor.cpp b/gm/constcolorprocessor.cpp
index 2e85714faf..26da988aea 100644
--- a/gm/constcolorprocessor.cpp
+++ b/gm/constcolorprocessor.cpp
@@ -10,8 +10,6 @@
#include "gm.h"
#include "sk_tool_utils.h"
-#if SK_SUPPORT_GPU
-
#include "GrContext.h"
#include "GrRenderTargetContextPriv.h"
#include "SkGr.h"
@@ -184,5 +182,3 @@ private:
DEF_GM(return new ConstColorProcessor;)
}
-
-#endif
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index 8942602fb9..fa48e7bb88 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -9,8 +9,6 @@
#include "gm.h"
-#if SK_SUPPORT_GPU
-
#include "GrContext.h"
#include "GrDefaultGeoProcFactory.h"
#include "GrOpFlushState.h"
@@ -278,5 +276,3 @@ private:
DEF_GM(return new ConvexPolyEffect;)
}
-
-#endif
diff --git a/gm/crosscontextimage.cpp b/gm/crosscontextimage.cpp
index 19760c45e4..12ef6796ff 100644
--- a/gm/crosscontextimage.cpp
+++ b/gm/crosscontextimage.cpp
@@ -8,7 +8,6 @@
#include "gm.h"
#include "Resources.h"
-#if SK_SUPPORT_GPU
#include "GrContext.h"
#include "SkImage.h"
@@ -46,5 +45,3 @@ DEF_SIMPLE_GM(cross_context_image, canvas, 512 * 3 + 60, 512 + 128 + 30) {
canvas->drawImage(crossContextSubset, 512 + 30, 512 + 30);
canvas->drawImage(crossContextRasterSubset, 512 + 512 + 60, 512 + 30);
}
-
-#endif
diff --git a/gm/dftext.cpp b/gm/dftext.cpp
index 34c1f9a94e..b420567292 100644
--- a/gm/dftext.cpp
+++ b/gm/dftext.cpp
@@ -39,7 +39,6 @@ protected:
SkScalar scales[] = { 2.0f*5.0f, 5.0f, 2.0f, 1.0f };
// set up offscreen rendering with distance field text
-#if SK_SUPPORT_GPU
GrContext* ctx = inputCanvas->getGrContext();
SkISize size = onISize();
SkImageInfo info = SkImageInfo::MakeN32(size.width(), size.height(), kPremul_SkAlphaType,
@@ -50,9 +49,6 @@ protected:
SkCanvas* canvas = surface ? surface->getCanvas() : inputCanvas;
// init our new canvas with the old canvas's matrix
canvas->setMatrix(inputCanvas->getTotalMatrix());
-#else
- SkCanvas* canvas = inputCanvas;
-#endif
// apply global scale to test glyph positioning
canvas->scale(1.05f, 1.05f);
canvas->clear(0xffffffff);
@@ -189,7 +185,6 @@ protected:
paint.setTextSize(SkIntToScalar(19));
canvas->drawString(fEmojiText, 670, 90, paint);
}
-#if SK_SUPPORT_GPU
// render offscreen buffer
if (surface) {
SkAutoCanvasRestore acr(inputCanvas, true);
@@ -197,7 +192,6 @@ protected:
inputCanvas->resetMatrix();
inputCanvas->drawImage(surface->makeImageSnapshot().get(), 0, 0, nullptr);
}
-#endif
}
private:
diff --git a/gm/dftext_blob_persp.cpp b/gm/dftext_blob_persp.cpp
index cfa681d984..e9df4afd19 100644
--- a/gm/dftext_blob_persp.cpp
+++ b/gm/dftext_blob_persp.cpp
@@ -46,7 +46,6 @@ protected:
virtual void onDraw(SkCanvas* inputCanvas) override {
// set up offscreen rendering with distance field text
-#if SK_SUPPORT_GPU
GrContext* ctx = inputCanvas->getGrContext();
SkISize size = this->onISize();
if (!inputCanvas->getBaseLayerSize().isEmpty()) {
@@ -60,9 +59,6 @@ protected:
SkCanvas* canvas = surface ? surface->getCanvas() : inputCanvas;
// init our new canvas with the old canvas's matrix
canvas->setMatrix(inputCanvas->getTotalMatrix());
-#else
- SkCanvas* canvas = inputCanvas;
-#endif
SkScalar x = 0, y = 0;
SkScalar maxH = 0;
for (auto twm : {TranslateWithMatrix::kNo, TranslateWithMatrix::kYes}) {
@@ -88,7 +84,6 @@ protected:
maxH = 0;
}
}
-#if SK_SUPPORT_GPU
// render offscreen buffer
if (surface) {
SkAutoCanvasRestore acr(inputCanvas, true);
@@ -96,7 +91,6 @@ protected:
inputCanvas->resetMatrix();
inputCanvas->drawImage(surface->makeImageSnapshot().get(), 0, 0, nullptr);
}
-#endif
}
private:
diff --git a/gm/discard.cpp b/gm/discard.cpp
index 8db3a68ab0..7a1e9d9f44 100644
--- a/gm/discard.cpp
+++ b/gm/discard.cpp
@@ -12,8 +12,6 @@
#include "SkRandom.h"
#include "SkSurface.h"
-#if SK_SUPPORT_GPU
-
namespace skiagm {
/*
@@ -87,5 +85,3 @@ private:
DEF_GM(return new DiscardGM;)
} // end namespace
-
-#endif
diff --git a/gm/flippity.cpp b/gm/flippity.cpp
index fb0288b191..853606e245 100644
--- a/gm/flippity.cpp
+++ b/gm/flippity.cpp
@@ -10,8 +10,6 @@
#include "SkSurface.h"
-#if SK_SUPPORT_GPU
-
#include "GrContextPriv.h"
#include "ProxyUtils.h"
#include "SkImage_Gpu.h"
@@ -271,5 +269,3 @@ private:
};
DEF_GM(return new FlippityGM;)
-
-#endif
diff --git a/gm/fontcache.cpp b/gm/fontcache.cpp
index 6c99700d93..c9c8cf7480 100644
--- a/gm/fontcache.cpp
+++ b/gm/fontcache.cpp
@@ -10,8 +10,6 @@
#include "gm.h"
-#if SK_SUPPORT_GPU
-
#include "GrContext.h"
#include "GrContextPriv.h"
#include "GrContextOptions.h"
@@ -142,5 +140,3 @@ constexpr SkScalar FontCacheGM::kSize;
DEF_GM(return new FontCacheGM(GrContextOptions::Enable::kNo))
DEF_GM(return new FontCacheGM(GrContextOptions::Enable::kYes))
-
-#endif
diff --git a/gm/image.cpp b/gm/image.cpp
index 2c1b8d8458..2592131334 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -16,9 +16,7 @@
#include "SkStream.h"
#include "SkSurface.h"
-#if SK_SUPPORT_GPU
#include "GrContext.h"
-#endif
static void drawContents(SkSurface* surface, SkColor fillC) {
SkSize size = SkSize::Make(SkIntToScalar(surface->width()),
@@ -152,11 +150,8 @@ protected:
SkImageInfo info = SkImageInfo::MakeN32Premul(W, H);
sk_sp<SkSurface> surf0(SkSurface::MakeRasterDirect(info, fBuffer, RB));
sk_sp<SkSurface> surf1(SkSurface::MakeRaster(info));
- sk_sp<SkSurface> surf2; // gpu
-
-#if SK_SUPPORT_GPU
- surf2 = SkSurface::MakeRenderTarget(canvas->getGrContext(), SkBudgeted::kNo, info);
-#endif
+ sk_sp<SkSurface> surf2(SkSurface::MakeRenderTarget(canvas->getGrContext(),
+ SkBudgeted::kNo, info));
test_surface(canvas, surf0.get(), true);
canvas->translate(80, 0);
diff --git a/gm/image_pict.cpp b/gm/image_pict.cpp
index 11bb902291..eee458360f 100644
--- a/gm/image_pict.cpp
+++ b/gm/image_pict.cpp
@@ -14,13 +14,11 @@
#include "SkPictureRecorder.h"
#include "SkSurface.h"
-#if SK_SUPPORT_GPU
#include "GrContext.h"
#include "GrContextPriv.h"
#include "GrSurfaceContext.h"
#include "GrTextureProxy.h"
#include "../src/image/SkImage_Gpu.h"
-#endif
static void draw_something(SkCanvas* canvas, const SkRect& bounds) {
SkPaint paint;
@@ -145,7 +143,6 @@ public:
EmptyGenerator(const SkImageInfo& info) : SkImageGenerator(info) {}
};
-#if SK_SUPPORT_GPU
class TextureGenerator : public SkImageGenerator {
public:
TextureGenerator(GrContext* ctx, const SkImageInfo& info, sk_sp<SkPicture> pic)
@@ -216,7 +213,6 @@ static std::unique_ptr<SkImageGenerator> make_tex_generator(GrContext* ctx, sk_s
}
return skstd::make_unique<TextureGenerator>(ctx, info, pic);
}
-#endif
class ImageCacheratorGM : public skiagm::GM {
SkString fName;
@@ -269,7 +265,6 @@ protected:
}
static void draw_as_tex(SkCanvas* canvas, SkImage* image, SkScalar x, SkScalar y) {
-#if SK_SUPPORT_GPU
sk_sp<SkColorSpace> texColorSpace;
sk_sp<GrTextureProxy> proxy(as_IB(image)->asTextureProxyRef(
canvas->getGrContext(), GrSamplerState::ClampBilerp(),
@@ -291,7 +286,6 @@ protected:
sk_ref_sp(canvas->getGrContext()), image->uniqueID(), kPremul_SkAlphaType,
std::move(proxy), std::move(texColorSpace), SkBudgeted::kNo));
canvas->drawImage(texImage.get(), x, y);
-#endif
}
void drawSet(SkCanvas* canvas) const {
@@ -333,6 +327,4 @@ private:
};
DEF_GM( return new ImageCacheratorGM("picture", make_pic_generator); )
DEF_GM( return new ImageCacheratorGM("raster", make_ras_generator); )
-#if SK_SUPPORT_GPU
- DEF_GM( return new ImageCacheratorGM("texture", make_tex_generator); )
-#endif
+DEF_GM( return new ImageCacheratorGM("texture", make_tex_generator); )
diff --git a/gm/imagefromyuvtextures.cpp b/gm/imagefromyuvtextures.cpp
index a6aa000f1f..8a26a0066e 100644
--- a/gm/imagefromyuvtextures.cpp
+++ b/gm/imagefromyuvtextures.cpp
@@ -9,8 +9,6 @@
#include "gm.h"
-#if SK_SUPPORT_GPU
-
#include "GrContext.h"
#include "GrContextPriv.h"
#include "GrGpu.h"
@@ -169,5 +167,3 @@ private:
DEF_GM(return new ImageFromYUVTextures;)
}
-
-#endif
diff --git a/gm/imagemasksubset.cpp b/gm/imagemasksubset.cpp
index 9974af35c4..adfea6b8e9 100644
--- a/gm/imagemasksubset.cpp
+++ b/gm/imagemasksubset.cpp
@@ -53,9 +53,7 @@ const MakerT makers[] = {
// SkImage_Gpu
[](SkCanvas* c, const SkImageInfo& info) -> sk_sp<SkImage> {
sk_sp<SkSurface> surface;
-#if SK_SUPPORT_GPU
surface = SkSurface::MakeRenderTarget(c->getGrContext(), SkBudgeted::kNo, info);
-#endif
return make_mask(surface ? surface : SkSurface::MakeRaster(info));
},
diff --git a/gm/pathmaskcache.cpp b/gm/pathmaskcache.cpp
index 400c5df9d1..0952033001 100644
--- a/gm/pathmaskcache.cpp
+++ b/gm/pathmaskcache.cpp
@@ -7,8 +7,6 @@
#include "gm.h"
-#if SK_SUPPORT_GPU
-
#include "GrContext.h"
#include "GrContextOptions.h"
#include "SkPath.h"
@@ -113,5 +111,3 @@ private:
};
DEF_GM( return new PathMaskCache(); )
-
-#endif
diff --git a/gm/rectangletexture.cpp b/gm/rectangletexture.cpp
index 1ce915bf52..a603be7bdc 100644
--- a/gm/rectangletexture.cpp
+++ b/gm/rectangletexture.cpp
@@ -9,8 +9,6 @@
#include "gm.h"
-#if SK_SUPPORT_GPU
-
#include "GrBackendSurface.h"
#include "GrContext.h"
#include "GrContextPriv.h"
@@ -188,5 +186,3 @@ private:
DEF_GM(return new RectangleTexture;)
}
-
-#endif
diff --git a/gm/rrects.cpp b/gm/rrects.cpp
index d6b52918ef..ff704c82a2 100644
--- a/gm/rrects.cpp
+++ b/gm/rrects.cpp
@@ -7,14 +7,12 @@
#include "gm.h"
#include "sk_tool_utils.h"
-#if SK_SUPPORT_GPU
#include "GrCaps.h"
#include "GrContext.h"
#include "GrRenderTargetContextPriv.h"
#include "effects/GrRRectEffect.h"
#include "ops/GrDrawOp.h"
#include "ops/GrRectOpFactory.h"
-#endif
#include "SkRRect.h"
namespace skiagm {
@@ -83,11 +81,7 @@ protected:
SkIntToScalar(kImageHeight));
#endif
-#if SK_SUPPORT_GPU
int lastEdgeType = (kEffect_Type == fType) ? (int) GrClipEdgeType::kLast: 0;
-#else
- int lastEdgeType = 0;
-#endif
int y = 1;
for (int et = 0; et <= lastEdgeType; ++et) {
@@ -103,7 +97,6 @@ protected:
canvas->save();
canvas->translate(SkIntToScalar(x), SkIntToScalar(y));
if (kEffect_Type == fType) {
-#if SK_SUPPORT_GPU
SkRRect rrect = fRRects[curRRect];
rrect.offset(SkIntToScalar(x), SkIntToScalar(y));
GrClipEdgeType edgeType = (GrClipEdgeType) et;
@@ -125,7 +118,6 @@ protected:
} else {
drew = false;
}
-#endif
} else if (kBW_Clip_Type == fType || kAA_Clip_Type == fType) {
bool aaClip = (kAA_Clip_Type == fType);
canvas->clipRRect(fRRects[curRRect], aaClip);
@@ -257,8 +249,6 @@ DEF_GM( return new RRectGM(RRectGM::kAA_Draw_Type); )
DEF_GM( return new RRectGM(RRectGM::kBW_Draw_Type); )
DEF_GM( return new RRectGM(RRectGM::kAA_Clip_Type); )
DEF_GM( return new RRectGM(RRectGM::kBW_Clip_Type); )
-#if SK_SUPPORT_GPU
DEF_GM( return new RRectGM(RRectGM::kEffect_Type); )
-#endif
}
diff --git a/gm/srcmode.cpp b/gm/srcmode.cpp
index e43933ce11..21cf9797f5 100644
--- a/gm/srcmode.cpp
+++ b/gm/srcmode.cpp
@@ -116,11 +116,9 @@ protected:
SkImageInfo info = SkImageInfo::MakeN32Premul(size);
bool callNewSurface = true;
-#if SK_SUPPORT_GPU
if (canvas->getGrContext() && skipGPU) {
callNewSurface = false;
}
-#endif
sk_sp<SkSurface> surface = callNewSurface ? canvas->makeSurface(info) : nullptr;
if (nullptr == surface) {
// picture canvas will return null, so fall-back to raster
diff --git a/gm/textblobmixedsizes.cpp b/gm/textblobmixedsizes.cpp
index 7ada13a3c5..fcb1a598e4 100644
--- a/gm/textblobmixedsizes.cpp
+++ b/gm/textblobmixedsizes.cpp
@@ -98,7 +98,6 @@ protected:
SkCanvas* canvas = inputCanvas;
sk_sp<SkSurface> surface;
if (fUseDFT) {
-#if SK_SUPPORT_GPU
// Create a new Canvas to enable DFT
GrContext* ctx = inputCanvas->getGrContext();
SkISize size = onISize();
@@ -111,7 +110,6 @@ protected:
canvas = surface.get() ? surface->getCanvas() : inputCanvas;
// init our new canvas with the old canvas's matrix
canvas->setMatrix(inputCanvas->getTotalMatrix());
-#endif
}
canvas->drawColor(sk_tool_utils::color_to_565(SK_ColorWHITE));
@@ -164,7 +162,6 @@ protected:
}
canvas->restore();
-#if SK_SUPPORT_GPU
// render offscreen buffer
if (surface) {
SkAutoCanvasRestore acr(inputCanvas, true);
@@ -172,7 +169,6 @@ protected:
inputCanvas->resetMatrix();
inputCanvas->drawImage(surface->makeImageSnapshot().get(), 0, 0, nullptr);
}
-#endif
}
private:
@@ -189,7 +185,5 @@ private:
//////////////////////////////////////////////////////////////////////////////
DEF_GM( return new TextBlobMixedSizes(false); )
-#if SK_SUPPORT_GPU
DEF_GM( return new TextBlobMixedSizes(true); )
-#endif
}
diff --git a/gm/textblobrandomfont.cpp b/gm/textblobrandomfont.cpp
index acde46887d..87dabf6526 100644
--- a/gm/textblobrandomfont.cpp
+++ b/gm/textblobrandomfont.cpp
@@ -17,8 +17,6 @@
#include "SkTextBlob.h"
#include "SkTypeface.h"
-#if SK_SUPPORT_GPU
-
#include "GrContext.h"
namespace skiagm {
@@ -168,4 +166,3 @@ private:
DEF_GM(return new TextBlobRandomFont;)
}
-#endif
diff --git a/gm/textblobuseaftergpufree.cpp b/gm/textblobuseaftergpufree.cpp
index b892c7fde1..f09eb1fa11 100644
--- a/gm/textblobuseaftergpufree.cpp
+++ b/gm/textblobuseaftergpufree.cpp
@@ -8,8 +8,6 @@
#include "gm.h"
#include "sk_tool_utils.h"
-#if SK_SUPPORT_GPU
-
#include "SkCanvas.h"
#include "SkSurface.h"
#include "SkTextBlob.h"
@@ -73,4 +71,3 @@ private:
DEF_GM(return new TextBlobUseAfterGpuFree;)
}
-#endif
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index e5e26278e3..e314668d00 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -9,8 +9,6 @@
#include "gm.h"
-#if SK_SUPPORT_GPU
-
#include "GrContext.h"
#include "GrContextPriv.h"
#include "GrProxyProvider.h"
@@ -155,5 +153,3 @@ private:
DEF_GM(return new TextureDomainEffect;)
}
-
-#endif
diff --git a/gm/windowrectangles.cpp b/gm/windowrectangles.cpp
index d03cf6dd28..9e1b64e08d 100644
--- a/gm/windowrectangles.cpp
+++ b/gm/windowrectangles.cpp
@@ -10,7 +10,6 @@
#include "SkClipStack.h"
#include "SkRRect.h"
-#if SK_SUPPORT_GPU
#include "GrAppliedClip.h"
#include "GrCaps.h"
#include "GrContextPriv.h"
@@ -20,7 +19,6 @@
#include "GrResourceProvider.h"
#include "GrStencilClip.h"
#include "effects/GrTextureDomain.h"
-#endif
constexpr static SkIRect kDeviceRect = {0, 0, 600, 600};
constexpr static SkIRect kCoverRect = {50, 50, 550, 550};
@@ -104,8 +102,6 @@ DEF_GM( return new WindowRectanglesGM(); )
////////////////////////////////////////////////////////////////////////////////////////////////////
-#if SK_SUPPORT_GPU
-
constexpr static int kNumWindows = 8;
/**
@@ -286,6 +282,4 @@ void WindowRectanglesMaskGM::fail(SkCanvas* canvas) {
DEF_GM( return new WindowRectanglesMaskGM(); )
-#endif
-
}
diff --git a/gm/xfermodes3.cpp b/gm/xfermodes3.cpp
index e1b1c76248..0d13148956 100644
--- a/gm/xfermodes3.cpp
+++ b/gm/xfermodes3.cpp
@@ -13,9 +13,7 @@
#include "SkBlendModePriv.h"
#include "SkColorPriv.h"
-#if SK_SUPPORT_GPU
#include "GrContext.h"
-#endif
namespace skiagm {
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp
index 0c69ec0dd5..5efbc3ad4f 100644
--- a/gm/yuvtorgbeffect.cpp
+++ b/gm/yuvtorgbeffect.cpp
@@ -9,8 +9,6 @@
#include "gm.h"
-#if SK_SUPPORT_GPU
-
#include "GrContext.h"
#include "GrContextPriv.h"
#include "GrProxyProvider.h"
@@ -264,5 +262,3 @@ private:
DEF_GM(return new YUVNV12toRGBEffect;)
}
-
-#endif