27be14f2ca
This breaks out the SkAlphaType and SkColorType enums into their own files, which lets us break the dependency between SkColor and SkImageInfo. It does not yet sever the link, but we plan to land this so as to migrate clients to the new enum files if necessary. This is estimated to save Chrome 230 MB of build size [1] (about 0.1%) http://screen/4dMqPC9rvAyCk6y [1] https://commondatastorage.googleapis.com/chromium-browser-clang/chrome_includes_2022-03-08_182556.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkColor%5C.h%24&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkColor%5C.h%24&included=&limit=1000 Change-Id: I331d414fe2996632ab11825c1092060ff5fe2ebd Bug: 242216 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/517678 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
62 lines
2.6 KiB
C++
62 lines
2.6 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/SkRefCnt.h"
|
|
#include "include/core/SkSize.h"
|
|
#include "include/gpu/GrTypes.h"
|
|
#include "include/private/SkColorData.h"
|
|
|
|
class GrDirectContext;
|
|
class SkColorSpace;
|
|
class SkSurface;
|
|
class SkSurfaceProps;
|
|
enum SkColorType : int;
|
|
struct SkImageInfo;
|
|
|
|
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
|