2020-10-06 14:07:38 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2020 Google LLC
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef TestSurface_DEFINED
|
|
|
|
#define TestSurface_DEFINED
|
|
|
|
|
2022-03-09 14:50:30 +00:00
|
|
|
#include "include/core/SkRefCnt.h"
|
2020-10-06 14:07:38 +00:00
|
|
|
#include "include/core/SkSize.h"
|
|
|
|
#include "include/gpu/GrTypes.h"
|
|
|
|
#include "include/private/SkColorData.h"
|
|
|
|
|
|
|
|
class GrDirectContext;
|
2022-03-09 14:50:30 +00:00
|
|
|
class SkColorSpace;
|
2020-10-06 14:07:38 +00:00
|
|
|
class SkSurface;
|
|
|
|
class SkSurfaceProps;
|
2022-03-09 14:50:30 +00:00
|
|
|
enum SkColorType : int;
|
|
|
|
struct SkImageInfo;
|
2020-10-06 14:07:38 +00:00
|
|
|
|
2020-10-08 20:00:14 +00:00
|
|
|
namespace sk_gpu_test {
|
|
|
|
|
2020-10-13 00:45:06 +00:00
|
|
|
sk_sp<SkSurface> MakeBackendTextureSurface(GrDirectContext*,
|
|
|
|
const SkImageInfo&,
|
|
|
|
GrSurfaceOrigin,
|
|
|
|
int sampleCnt,
|
|
|
|
GrMipmapped = GrMipmapped::kNo,
|
|
|
|
GrProtected = GrProtected::kNo,
|
|
|
|
const SkSurfaceProps* = nullptr);
|
|
|
|
|
2020-10-08 20:00:14 +00:00
|
|
|
sk_sp<SkSurface> MakeBackendTextureSurface(GrDirectContext*,
|
|
|
|
SkISize,
|
|
|
|
GrSurfaceOrigin,
|
|
|
|
int sampleCnt,
|
|
|
|
SkColorType,
|
|
|
|
sk_sp<SkColorSpace> = nullptr,
|
|
|
|
GrMipmapped = GrMipmapped::kNo,
|
|
|
|
GrProtected = GrProtected::kNo,
|
|
|
|
const SkSurfaceProps* = nullptr);
|
|
|
|
|
2020-10-06 14:07:38 +00:00
|
|
|
/** Creates an SkSurface backed by a non-textureable render target. */
|
2020-10-13 00:45:06 +00:00
|
|
|
sk_sp<SkSurface> MakeBackendRenderTargetSurface(GrDirectContext*,
|
|
|
|
const SkImageInfo&,
|
|
|
|
GrSurfaceOrigin,
|
|
|
|
int sampleCnt,
|
|
|
|
GrProtected = GrProtected::kNo,
|
|
|
|
const SkSurfaceProps* = nullptr);
|
|
|
|
|
2020-10-06 14:07:38 +00:00
|
|
|
sk_sp<SkSurface> MakeBackendRenderTargetSurface(GrDirectContext*,
|
|
|
|
SkISize,
|
|
|
|
GrSurfaceOrigin,
|
2020-10-08 20:00:14 +00:00
|
|
|
int sampleCnt,
|
2020-10-06 14:07:38 +00:00
|
|
|
SkColorType,
|
|
|
|
sk_sp<SkColorSpace> = nullptr,
|
2020-10-08 20:00:14 +00:00
|
|
|
GrProtected = GrProtected::kNo,
|
2020-10-06 14:07:38 +00:00
|
|
|
const SkSurfaceProps* = nullptr);
|
2020-10-08 20:00:14 +00:00
|
|
|
} // namespace sk_gpu_test
|
2020-10-06 14:07:38 +00:00
|
|
|
|
|
|
|
#endif
|