39#if defined(SK_GRAPHITE)
50static const int kSize = 8;
68#if defined(SK_GRAPHITE)
133 bool contextIsProtected,
134 bool beTexIsProtected) {
166 for (
bool contextIsProtected : {
true,
false }) {
167 for (
bool beTexIsProtected : {
true,
false }) {
168 create_backend_texture_ganesh(
reporter, contextIsProtected, beTexIsProtected);
173#if defined(SK_GRAPHITE)
178 bool contextIsProtected,
179 bool beTexIsProtected) {
206 helper->recorder()->deleteBackendTexture(backendTex);
214 for (
bool contextIsProtected : {
true,
false }) {
215 for (
bool beTexIsProtected : {
true,
false }) {
216 create_backend_texture_graphite(
reporter, contextIsProtected, beTexIsProtected);
245 bool fCalled =
false;
246 std::unique_ptr<const SkSurface::AsyncReadResult>
fResult;
250 auto context =
static_cast<AsyncContext*
>(c);
251 context->fResult = std::move(
result);
252 context->fCalled =
true;
268 AsyncContext cbContext;
277 helper->submitAndWaitForCompletion(&cbContext.fCalled);
350 paint.setAntiAlias(
true);
447 constexpr bool kIsProtected =
true;
465 paint.setAntiAlias(
true);
466 paint.setStrokeWidth(.4f);
527 constexpr bool kIsProtected =
true;
558DEF_GANESH_TEST(VkProtectedContext_DrawProtectedImageOnProtectedSurface,
565DEF_GRAPHITE_TEST(VkProtectedContext_DrawProtectedImageOnProtectedSurface_Graphite,
skgpu::Protected GrProtected
static void async_callback(void *c, std::unique_ptr< const SkImage::AsyncReadResult > result)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kColorDodge
brighten destination to reflect source
@ kOuter_SkBlurStyle
nothing inside, fuzzy outside
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
constexpr SkColor SK_ColorBLACK
@ kIdentity_SkYUVColorSpace
maps Y->R, U->G, V->B
LoopControlFlowInfo fResult
#define DEF_GANESH_TEST(name, reporter, options, ctsEnforcement)
#define DEF_GRAPHITE_TEST(name, reporter, ctsEnforcement)
#define REPORTER_ASSERT(r, cond,...)
void deleteBackendTexture(const GrBackendTexture &)
GrBackendTexture createBackendTexture(int width, int height, const GrBackendFormat &, skgpu::Mipmapped, GrRenderable, GrProtected=GrProtected::kNo, std::string_view label={})
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawPath(const SkPath &path, const SkPaint &paint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static sk_sp< SkColorSpace > MakeSRGB()
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
sk_sp< SkImage > makeImageSnapshot()
const TextureInfo & info() const
Protected isProtected() const
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
sk_sp< const SkImage > image
SkISize dimensions() const
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
static constexpr SkRect MakeWH(float w, float h)
VkImageCreateFlags fFlags
VkImageUsageFlags fImageUsageFlags
@ VK_IMAGE_CREATE_PROTECTED_BIT
@ VK_IMAGE_USAGE_TRANSFER_DST_BIT
@ VK_IMAGE_USAGE_SAMPLED_BIT
@ VK_IMAGE_USAGE_TRANSFER_SRC_BIT
@ VK_FORMAT_R8G8B8A8_UNORM