Brian Salomon | 72c7b98 | 2020-10-06 10:07:38 -0400 | [diff] [blame] | 1 | /* |
| 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 | |
| 16 | class GrDirectContext; |
| 17 | class SkSurface; |
| 18 | class SkSurfaceProps; |
| 19 | |
Brian Salomon | f9b0042 | 2020-10-08 16:00:14 -0400 | [diff] [blame^] | 20 | namespace sk_gpu_test { |
| 21 | |
| 22 | sk_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 Salomon | 72c7b98 | 2020-10-06 10:07:38 -0400 | [diff] [blame] | 32 | /** Creates an SkSurface backed by a non-textureable render target. */ |
| 33 | sk_sp<SkSurface> MakeBackendRenderTargetSurface(GrDirectContext*, |
| 34 | SkISize, |
Brian Salomon | 72c7b98 | 2020-10-06 10:07:38 -0400 | [diff] [blame] | 35 | GrSurfaceOrigin, |
Brian Salomon | f9b0042 | 2020-10-08 16:00:14 -0400 | [diff] [blame^] | 36 | int sampleCnt, |
Brian Salomon | 72c7b98 | 2020-10-06 10:07:38 -0400 | [diff] [blame] | 37 | SkColorType, |
| 38 | sk_sp<SkColorSpace> = nullptr, |
Brian Salomon | f9b0042 | 2020-10-08 16:00:14 -0400 | [diff] [blame^] | 39 | GrProtected = GrProtected::kNo, |
Brian Salomon | 72c7b98 | 2020-10-06 10:07:38 -0400 | [diff] [blame] | 40 | const SkSurfaceProps* = nullptr); |
Brian Salomon | f9b0042 | 2020-10-08 16:00:14 -0400 | [diff] [blame^] | 41 | } // namespace sk_gpu_test |
Brian Salomon | 72c7b98 | 2020-10-06 10:07:38 -0400 | [diff] [blame] | 42 | |
| 43 | #endif |