skia2/tools/gpu/BackendSurfaceFactory.h
Brian Salomon 7205080055 Revert "Reland "Revert "Use ManagedBackendTexture in place of TestUtils backend texture helpers."""
This reverts commit 4efaf5e9fe.

Cq-Include-Trybots: luci.skia.skia.primary:Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D,Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D
Change-Id: I0f5f1c427e8892a67b027b0fbe4863d9fcee2363
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/325863
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-13 01:22:13 +00:00

59 lines
2.5 KiB
C++

/*
* 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;
namespace sk_gpu_test {
sk_sp<SkSurface> MakeBackendTextureSurface(GrDirectContext*,
const SkImageInfo&,
GrSurfaceOrigin,
int sampleCnt,
GrMipmapped = GrMipmapped::kNo,
GrProtected = GrProtected::kNo,
const SkSurfaceProps* = nullptr);
sk_sp<SkSurface> MakeBackendTextureSurface(GrDirectContext*,
SkISize,
GrSurfaceOrigin,
int sampleCnt,
SkColorType,
sk_sp<SkColorSpace> = nullptr,
GrMipmapped = GrMipmapped::kNo,
GrProtected = GrProtected::kNo,
const SkSurfaceProps* = nullptr);
/** Creates an SkSurface backed by a non-textureable render target. */
sk_sp<SkSurface> MakeBackendRenderTargetSurface(GrDirectContext*,
const SkImageInfo&,
GrSurfaceOrigin,
int sampleCnt,
GrProtected = GrProtected::kNo,
const SkSurfaceProps* = nullptr);
sk_sp<SkSurface> MakeBackendRenderTargetSurface(GrDirectContext*,
SkISize,
GrSurfaceOrigin,
int sampleCnt,
SkColorType,
sk_sp<SkColorSpace> = nullptr,
GrProtected = GrProtected::kNo,
const SkSurfaceProps* = nullptr);
} // namespace sk_gpu_test
#endif