blob: c0177e77aae2efadbb40c43ce8c55880e0f01510 [file] [log] [blame]
Brian Salomon72c7b982020-10-06 10:07:38 -04001/*
2 * Copyright 2020 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef TestSurface_DEFINED
9#define TestSurface_DEFINED
10
11#include "include/core/SkImageInfo.h"
12#include "include/core/SkSize.h"
13#include "include/gpu/GrTypes.h"
14#include "include/private/SkColorData.h"
15
16class GrDirectContext;
17class SkSurface;
18class SkSurfaceProps;
19
Brian Salomonf9b00422020-10-08 16:00:14 -040020namespace sk_gpu_test {
21
22sk_sp<SkSurface> MakeBackendTextureSurface(GrDirectContext*,
23 SkISize,
24 GrSurfaceOrigin,
25 int sampleCnt,
26 SkColorType,
27 sk_sp<SkColorSpace> = nullptr,
28 GrMipmapped = GrMipmapped::kNo,
29 GrProtected = GrProtected::kNo,
30 const SkSurfaceProps* = nullptr);
31
Brian Salomon72c7b982020-10-06 10:07:38 -040032/** Creates an SkSurface backed by a non-textureable render target. */
33sk_sp<SkSurface> MakeBackendRenderTargetSurface(GrDirectContext*,
34 SkISize,
Brian Salomon72c7b982020-10-06 10:07:38 -040035 GrSurfaceOrigin,
Brian Salomonf9b00422020-10-08 16:00:14 -040036 int sampleCnt,
Brian Salomon72c7b982020-10-06 10:07:38 -040037 SkColorType,
38 sk_sp<SkColorSpace> = nullptr,
Brian Salomonf9b00422020-10-08 16:00:14 -040039 GrProtected = GrProtected::kNo,
Brian Salomon72c7b982020-10-06 10:07:38 -040040 const SkSurfaceProps* = nullptr);
Brian Salomonf9b00422020-10-08 16:00:14 -040041} // namespace sk_gpu_test
Brian Salomon72c7b982020-10-06 10:07:38 -040042
43#endif