aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DMGpuSupport.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-03-09 09:01:53 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-09 16:32:10 +0000
commitf865b05fe50ca2c094b9c60e4405c6094415b4f6 (patch)
treea00eab7c3787b5b977b3ae7c15aa1732f5a42c97 /dm/DMGpuSupport.h
parentad06544cc6ac4b403a24adda4ee36b9f35b3071f (diff)
Add GM configs that test rendering to a GL backend texture and render target
This also adds GrGpu::create/deleteTestingOnlyBackendRenderTarget. Implemented in GL only for now. Change-Id: I9e5fdc953c4a249959af89e08332f520cefe9d90 Reviewed-on: https://skia-review.googlesource.com/113305 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'dm/DMGpuSupport.h')
-rw-r--r--dm/DMGpuSupport.h27
1 files changed, 5 insertions, 22 deletions
diff --git a/dm/DMGpuSupport.h b/dm/DMGpuSupport.h
index a552d69f70..1ed00953c1 100644
--- a/dm/DMGpuSupport.h
+++ b/dm/DMGpuSupport.h
@@ -28,19 +28,6 @@ namespace DM {
static const bool kGPUDisabled = false;
-static inline sk_sp<SkSurface> NewGpuSurface(
- sk_gpu_test::GrContextFactory* grFactory,
- sk_gpu_test::GrContextFactory::ContextType type,
- sk_gpu_test::GrContextFactory::ContextOverrides overrides,
- SkImageInfo info,
- int samples,
- bool useDIText) {
- uint32_t flags = useDIText ? SkSurfaceProps::kUseDeviceIndependentFonts_Flag : 0;
- SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
- return SkSurface::MakeRenderTarget(grFactory->get(type, overrides), SkBudgeted::kNo,
- info, samples, &props);
-}
-
} // namespace DM
#else// !SK_SUPPORT_GPU
@@ -60,6 +47,11 @@ public:
void dumpGpuStats(SkString*) const {}
};
+class SkCommandLineConfigGpu {
+public:
+ enum class SurfType;
+};
+
namespace sk_gpu_test {
class GrContextFactory {
public:
@@ -93,15 +85,6 @@ namespace DM {
static const bool kGPUDisabled = true;
-static inline SkSurface* NewGpuSurface(sk_gpu_test::GrContextFactory*,
- sk_gpu_test::GrContextFactory::ContextType,
- sk_gpu_test::GrContextFactory::ContextOverrides,
- SkImageInfo,
- int,
- bool) {
- return nullptr;
-}
-
} // namespace DM
#endif//SK_SUPPORT_GPU