aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/image_pict.cpp
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/image_pict.cpp
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/image_pict.cpp')
-rw-r--r--gm/image_pict.cpp10
1 files changed, 1 insertions, 9 deletions
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); )