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
|
|
|
|
|
|
|
|
#include "include/core/SkImageInfo.h"
|
|
|
|
#include "include/core/SkSize.h"
|
|
|
|
#include "include/gpu/GrTypes.h"
|
|
|
|
#include "include/private/SkColorData.h"
|
|
|
|
|
|
|
|
class GrDirectContext;
|
|
|
|
class SkSurface;
|
|
|
|
class SkSurfaceProps;
|
|
|
|
|
2020-10-08 20:00:14 +00:00
|
|
|
namespace sk_gpu_test {
|
|
|
|
|
|
|
|
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. */
|
|
|
|
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
|