8#ifndef SurfaceFillContext_DEFINED
9#define SurfaceFillContext_DEFINED
28#if defined(GR_TEST_UTILS)
29 OpsTask* testingOnly_PeekLastOpsTask() {
return fOpsTask.get(); }
45 template <SkAlphaType AlphaType>
59 template <SkAlphaType AlphaType>
61 this->internalClear(&scissor,
75 std::unique_ptr<GrFragmentProcessor>);
80 std::unique_ptr<GrFragmentProcessor>
fp) {
88 std::unique_ptr<GrFragmentProcessor>
fp) {
126 template <SkAlphaType AlphaType>
129 template <SkAlphaType AlphaType>
150 void internalClear(
const SkIRect* scissor,
151 std::array<float, 4>
color,
152 bool upgradePartialToFull =
false);
154 SkDEBUGCODE(
void onValidate()
const override;)
164inline std::array<float, 4> SurfaceFillContext::ConvertColor<kPremul_SkAlphaType>(
166 return color.unpremul().array();
170inline std::array<float, 4> SurfaceFillContext::ConvertColor<kUnpremul_SkAlphaType>(
172 return color.premul().array();
175template <SkAlphaType AlphaType>
179 return color.array();
@ kUnknown_SkAlphaType
uninitialized
sktext::gpu::SubRunAllocator * subRunAlloc()
SkArenaAlloc * arenaAlloc()
std::unique_ptr< GrOp > Owner
bool wrapsVkSecondaryCB() const
sk_sp< GrArenas > arenas()
GrSurfaceProxy * proxy() const
virtual GrRenderTargetProxy * asRenderTargetProxy()
SkISize dimensions() const
static SkMatrix RectToRect(const SkRect &src, const SkRect &dst, ScaleToFit mode=kFill_ScaleToFit)
GrRenderTargetProxy * asRenderTargetProxy()
const GrColorInfo & colorInfo() const
SurfaceContext(GrRecordingContext *, GrSurfaceProxyView readView, const GrColorInfo &)
void clear(const SkIRect &rect, const SkRGBA4f< AlphaType > &color)
void clear(const SkRGBA4f< AlphaType > &color)
SurfaceFillContext * asFillContext() override
void clearAtLeast(const SkIRect &scissor, const SkRGBA4f< AlphaType > &color)
static std::array< float, 4 > ConvertColor(SkRGBA4f< AlphaType > color)
bool wrapsVkSecondaryCB() const
void fillWithFP(std::unique_ptr< GrFragmentProcessor > fp)
GrSurfaceProxyView fWriteView
static void ClearToGrPaint(std::array< float, 4 > color, GrPaint *paint)
void fillRectToRectWithFP(const SkRect &srcRect, const SkIRect &dstRect, std::unique_ptr< GrFragmentProcessor > fp)
OpsTask * replaceOpsTask()
void fillRectWithFP(const SkIRect &dstRect, std::unique_ptr< GrFragmentProcessor >)
bool blitTexture(GrSurfaceProxyView, const SkIRect &srcRect, const SkIPoint &dstPoint)
SkArenaAlloc * arenaAlloc()
const GrSurfaceProxyView & writeSurfaceView() const
virtual OpsTask::CanDiscardPreviousOps canDiscardPreviousOpsOnFullClear() const
sk_sp< GrRenderTask > refRenderTask()
std::array< float, 4 > adjustColorAlphaType(SkRGBA4f< AlphaType > color) const
virtual void willReplaceOpsTask(OpsTask *prevTask, OpsTask *nextTask)
SurfaceFillContext(GrRecordingContext *rContext, GrSurfaceProxyView readView, GrSurfaceProxyView writeView, const GrColorInfo &colorInfo)
sktext::gpu::SubRunAllocator * subRunAlloc()
void fillRectToRectWithFP(const SkIRect &srcRect, const SkIRect &dstRect, std::unique_ptr< GrFragmentProcessor > fp)
sk_sp< SkBlender > blender SkRect rect
static constexpr SkIRect MakeSize(const SkISize &size)
static SkRect Make(const SkISize &size)