#include "src/gpu/ganesh/GrOpFlushState.h"
#include "include/core/SkAlphaType.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkRect.h"
#include "include/gpu/ganesh/GrBackendSurface.h"
#include "include/gpu/ganesh/GrDirectContext.h"
#include "src/gpu/ganesh/GrCaps.h"
#include "src/gpu/ganesh/GrDataUtils.h"
#include "src/gpu/ganesh/GrDirectContextPriv.h"
#include "src/gpu/ganesh/GrGpu.h"
#include "src/gpu/ganesh/GrImageInfo.h"
#include "src/gpu/ganesh/GrPixmap.h"
#include "src/gpu/ganesh/GrProgramInfo.h"
#include "src/gpu/ganesh/GrSimpleMesh.h"
#include "src/gpu/ganesh/GrSurface.h"
#include "src/gpu/ganesh/GrSurfaceProxy.h"
#include "src/gpu/ganesh/GrTextureProxy.h"
#include <functional>
#include <memory>
GrOpFlushState::GrOpFlushState(GrGpu* gpu, GrResourceProvider* resourceProvider,
skgpu::TokenTracker* tokenTracker,
sk_sp<GrBufferAllocPool::CpuBufferCache> cpuBufferCache)
: … { … }
const GrCaps& GrOpFlushState::caps() const { … }
GrThreadSafeCache* GrOpFlushState::threadSafeCache() const { … }
void GrOpFlushState::executeDrawsAndUploadsForMeshDrawOp(
const GrOp* op, const SkRect& chainBounds, const GrPipeline* pipeline,
const GrUserStencilSettings* userStencilSettings) { … }
void GrOpFlushState::preExecuteDraws() { … }
void GrOpFlushState::reset() { … }
void GrOpFlushState::doUpload(GrDeferredTextureUploadFn& upload,
bool shouldPrepareSurfaceForSampling) { … }
skgpu::AtlasToken GrOpFlushState::addInlineUpload(GrDeferredTextureUploadFn&& upload) { … }
skgpu::AtlasToken GrOpFlushState::addASAPUpload(GrDeferredTextureUploadFn&& upload) { … }
void GrOpFlushState::recordDraw(
const GrGeometryProcessor* geomProc,
const GrSimpleMesh meshes[],
int meshCnt,
const GrSurfaceProxy* const geomProcProxies[],
GrPrimitiveType primitiveType) { … }
void* GrOpFlushState::makeVertexSpace(size_t vertexSize, int vertexCount,
sk_sp<const GrBuffer>* buffer, int* startVertex) { … }
uint16_t* GrOpFlushState::makeIndexSpace(int indexCount, sk_sp<const GrBuffer>* buffer,
int* startIndex) { … }
void* GrOpFlushState::makeVertexSpaceAtLeast(size_t vertexSize, int minVertexCount,
int fallbackVertexCount, sk_sp<const GrBuffer>* buffer,
int* startVertex, int* actualVertexCount) { … }
uint16_t* GrOpFlushState::makeIndexSpaceAtLeast(int minIndexCount, int fallbackIndexCount,
sk_sp<const GrBuffer>* buffer, int* startIndex,
int* actualIndexCount) { … }
void GrOpFlushState::putBackIndices(int indexCount) { … }
void GrOpFlushState::putBackVertices(int vertices, size_t vertexStride) { … }
GrAppliedClip GrOpFlushState::detachAppliedClip() { … }
sktext::gpu::StrikeCache* GrOpFlushState::strikeCache() const { … }
GrAtlasManager* GrOpFlushState::atlasManager() const { … }
#if !defined(SK_ENABLE_OPTIMIZE_SIZE)
skgpu::ganesh::SmallPathAtlasMgr* GrOpFlushState::smallPathAtlasManager() const { … }
#endif
void GrOpFlushState::drawMesh(const GrSimpleMesh& mesh) { … }
GrOpFlushState::Draw::~Draw() { … }