GrRenderTargetContext->GrSurfaceDrawContext
Just the class/files. variable names and additional comments to follow.
Change-Id: Ic03d07fd5009eaf3d706c2536486a117328963fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/342617
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index 192c6b2..3a893cc 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -17,7 +17,7 @@
#include "src/gpu/GrGeometryProcessor.h"
#include "src/gpu/GrProcessor.h"
#include "src/gpu/GrProgramInfo.h"
-#include "src/gpu/GrRenderTargetContext.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
#include "src/gpu/GrVertexWriter.h"
#include "src/gpu/geometry/GrPathUtils.h"
#include "src/gpu/geometry/GrStyledShape.h"
diff --git a/src/gpu/ops/GrAAHairLinePathRenderer.cpp b/src/gpu/ops/GrAAHairLinePathRenderer.cpp
index c896428..e471e9e 100644
--- a/src/gpu/ops/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/ops/GrAAHairLinePathRenderer.cpp
@@ -20,9 +20,9 @@
#include "src/gpu/GrOpFlushState.h"
#include "src/gpu/GrProcessor.h"
#include "src/gpu/GrProgramInfo.h"
-#include "src/gpu/GrRenderTargetContext.h"
#include "src/gpu/GrResourceProvider.h"
#include "src/gpu/GrStyle.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
#include "src/gpu/effects/GrBezierEffect.h"
#include "src/gpu/geometry/GrPathUtils.h"
#include "src/gpu/geometry/GrStyledShape.h"
diff --git a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
index f6731a7..adef79e 100644
--- a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp
@@ -17,8 +17,8 @@
#include "src/gpu/GrOpFlushState.h"
#include "src/gpu/GrProcessor.h"
#include "src/gpu/GrProgramInfo.h"
-#include "src/gpu/GrRenderTargetContext.h"
#include "src/gpu/GrStyle.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
#include "src/gpu/GrVertexWriter.h"
#include "src/gpu/geometry/GrPathUtils.h"
#include "src/gpu/geometry/GrStyledShape.h"
diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp
index 467ff3c..4ed4993 100644
--- a/src/gpu/ops/GrAtlasTextOp.cpp
+++ b/src/gpu/ops/GrAtlasTextOp.cpp
@@ -18,8 +18,8 @@
#include "src/gpu/GrMemoryPool.h"
#include "src/gpu/GrOpFlushState.h"
#include "src/gpu/GrRecordingContextPriv.h"
-#include "src/gpu/GrRenderTargetContext.h"
#include "src/gpu/GrResourceProvider.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
#include "src/gpu/SkGr.h"
#include "src/gpu/effects/GrBitmapTextGeoProc.h"
#include "src/gpu/effects/GrDistanceFieldGeoProc.h"
@@ -435,7 +435,7 @@
#if GR_TEST_UTILS
-GrOp::Owner GrAtlasTextOp::CreateOpTestingOnly(GrRenderTargetContext* rtc,
+GrOp::Owner GrAtlasTextOp::CreateOpTestingOnly(GrSurfaceDrawContext* rtc,
const SkPaint& skPaint,
const SkFont& font,
const SkMatrixProvider& mtxProvider,
@@ -479,8 +479,8 @@
}
GR_DRAW_OP_TEST_DEFINE(GrAtlasTextOp) {
- // Setup dummy SkPaint / GrPaint / GrRenderTargetContext
- auto rtc = GrRenderTargetContext::Make(
+ // Setup dummy SkPaint / GrPaint / GrSurfaceDrawContext
+ auto rtc = GrSurfaceDrawContext::Make(
context, GrColorType::kRGBA_8888, nullptr, SkBackingFit::kApprox, {1024, 1024});
SkSimpleMatrixProvider matrixProvider(GrTest::TestMatrixInvertible(random));
diff --git a/src/gpu/ops/GrAtlasTextOp.h b/src/gpu/ops/GrAtlasTextOp.h
index d0c31ac9..a0ac0a3 100644
--- a/src/gpu/ops/GrAtlasTextOp.h
+++ b/src/gpu/ops/GrAtlasTextOp.h
@@ -66,7 +66,7 @@
static constexpr int kMaskTypeCount = static_cast<int>(MaskType::kLast) + 1;
#if GR_TEST_UTILS
- static GrOp::Owner CreateOpTestingOnly(GrRenderTargetContext* rtc,
+ static GrOp::Owner CreateOpTestingOnly(GrSurfaceDrawContext* rtc,
const SkPaint& skPaint,
const SkFont& font,
const SkMatrixProvider& mtxProvider,
diff --git a/src/gpu/ops/GrDashLinePathRenderer.cpp b/src/gpu/ops/GrDashLinePathRenderer.cpp
index 0b079cc..417bc84 100644
--- a/src/gpu/ops/GrDashLinePathRenderer.cpp
+++ b/src/gpu/ops/GrDashLinePathRenderer.cpp
@@ -7,7 +7,7 @@
#include "src/gpu/GrAuditTrail.h"
#include "src/gpu/GrGpu.h"
-#include "src/gpu/GrRenderTargetContext.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
#include "src/gpu/geometry/GrStyledShape.h"
#include "src/gpu/ops/GrDashLinePathRenderer.h"
#include "src/gpu/ops/GrDashOp.h"
diff --git a/src/gpu/ops/GrDefaultPathRenderer.cpp b/src/gpu/ops/GrDefaultPathRenderer.cpp
index 4d1fdce..b61b015 100644
--- a/src/gpu/ops/GrDefaultPathRenderer.cpp
+++ b/src/gpu/ops/GrDefaultPathRenderer.cpp
@@ -533,7 +533,7 @@
} // anonymous namespace
-bool GrDefaultPathRenderer::internalDrawPath(GrRenderTargetContext* renderTargetContext,
+bool GrDefaultPathRenderer::internalDrawPath(GrSurfaceDrawContext* renderTargetContext,
GrPaint&& paint,
GrAAType aaType,
const GrUserStencilSettings& userStencilSettings,
diff --git a/src/gpu/ops/GrDefaultPathRenderer.h b/src/gpu/ops/GrDefaultPathRenderer.h
index 38c734a..e7274d6 100644
--- a/src/gpu/ops/GrDefaultPathRenderer.h
+++ b/src/gpu/ops/GrDefaultPathRenderer.h
@@ -31,7 +31,7 @@
void onStencilPath(const StencilPathArgs&) override;
- bool internalDrawPath(GrRenderTargetContext*,
+ bool internalDrawPath(GrSurfaceDrawContext*,
GrPaint&&,
GrAAType,
const GrUserStencilSettings&,
diff --git a/src/gpu/ops/GrDrawPathOp.cpp b/src/gpu/ops/GrDrawPathOp.cpp
index 625659d..b3924ff 100644
--- a/src/gpu/ops/GrDrawPathOp.cpp
+++ b/src/gpu/ops/GrDrawPathOp.cpp
@@ -15,7 +15,7 @@
#include "src/gpu/GrProgramInfo.h"
#include "src/gpu/GrRecordingContextPriv.h"
#include "src/gpu/GrRenderTarget.h"
-#include "src/gpu/GrRenderTargetContext.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
#include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
static constexpr GrUserStencilSettings kCoverPass{
diff --git a/src/gpu/ops/GrFillRectOp.cpp b/src/gpu/ops/GrFillRectOp.cpp
index 1ab5bca..cee66c8 100644
--- a/src/gpu/ops/GrFillRectOp.cpp
+++ b/src/gpu/ops/GrFillRectOp.cpp
@@ -482,7 +482,7 @@
GrPaint&& paint,
GrAAType aaType,
const SkMatrix& viewMatrix,
- const GrRenderTargetContext::QuadSetEntry quads[],
+ const GrSurfaceDrawContext::QuadSetEntry quads[],
int cnt,
const GrUserStencilSettings* stencilSettings,
int* numConsumed) {
@@ -518,13 +518,13 @@
return op;
}
-void GrFillRectOp::AddFillRectOps(GrRenderTargetContext* rtc,
+void GrFillRectOp::AddFillRectOps(GrSurfaceDrawContext* rtc,
const GrClip* clip,
GrRecordingContext* context,
GrPaint&& paint,
GrAAType aaType,
const SkMatrix& viewMatrix,
- const GrRenderTargetContext::QuadSetEntry quads[],
+ const GrSurfaceDrawContext::QuadSetEntry quads[],
int cnt,
const GrUserStencilSettings* stencilSettings) {
diff --git a/src/gpu/ops/GrFillRectOp.h b/src/gpu/ops/GrFillRectOp.h
index 8710861..1a99c53 100644
--- a/src/gpu/ops/GrFillRectOp.h
+++ b/src/gpu/ops/GrFillRectOp.h
@@ -9,7 +9,7 @@
#define GrFillRectOp_DEFINED
#include "include/private/GrTypesPriv.h"
-#include "src/gpu/GrRenderTargetContext.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
#include "src/gpu/ops/GrSimpleMeshDrawOpHelper.h"
class GrDrawOp;
@@ -48,13 +48,13 @@
// Bulk API for drawing quads with a single op
// TODO(michaelludwig) - remove if the bulk API is not useful for SkiaRenderer
- static void AddFillRectOps(GrRenderTargetContext*,
+ static void AddFillRectOps(GrSurfaceDrawContext*,
const GrClip* clip,
GrRecordingContext*,
GrPaint&&,
GrAAType,
const SkMatrix& viewMatrix,
- const GrRenderTargetContext::QuadSetEntry quads[],
+ const GrSurfaceDrawContext::QuadSetEntry quads[],
int quadCount,
const GrUserStencilSettings* = nullptr);
@@ -69,7 +69,7 @@
GrPaint&&,
GrAAType,
const SkMatrix& viewMatrix,
- const GrRenderTargetContext::QuadSetEntry quads[],
+ const GrSurfaceDrawContext::QuadSetEntry quads[],
int quadCount,
const GrUserStencilSettings*,
int* numConsumed);
diff --git a/src/gpu/ops/GrSmallPathRenderer.cpp b/src/gpu/ops/GrSmallPathRenderer.cpp
index 507ad39..642a9c7 100644
--- a/src/gpu/ops/GrSmallPathRenderer.cpp
+++ b/src/gpu/ops/GrSmallPathRenderer.cpp
@@ -20,8 +20,8 @@
#include "src/gpu/GrCaps.h"
#include "src/gpu/GrDistanceFieldGenFromVector.h"
#include "src/gpu/GrDrawOpTest.h"
-#include "src/gpu/GrRenderTargetContext.h"
#include "src/gpu/GrResourceProvider.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
#include "src/gpu/GrVertexWriter.h"
#include "src/gpu/effects/GrBitmapTextGeoProc.h"
#include "src/gpu/effects/GrDistanceFieldGeoProc.h"
diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp
index ca85bfd..1274cf1 100644
--- a/src/gpu/ops/GrTextureOp.cpp
+++ b/src/gpu/ops/GrTextureOp.cpp
@@ -177,7 +177,7 @@
// Count the number of proxy runs in the entry set. This usually is already computed by
// SkGpuDevice, but when the BatchLengthLimiter chops the set up it must determine a new proxy count
// for each split.
-static int proxy_run_count(const GrRenderTargetContext::TextureSetEntry set[], int count) {
+static int proxy_run_count(const GrSurfaceDrawContext::TextureSetEntry set[], int count) {
int actualProxyRunCount = 0;
const GrSurfaceProxy* lastProxy = nullptr;
for (int i = 0; i < count; ++i) {
@@ -237,7 +237,7 @@
}
static GrOp::Owner Make(GrRecordingContext* context,
- GrRenderTargetContext::TextureSetEntry set[],
+ GrSurfaceDrawContext::TextureSetEntry set[],
int cnt,
int proxyRunCnt,
GrSamplerState::Filter filter,
@@ -473,7 +473,7 @@
fViewCountPairs[0] = {proxyView.detachProxy(), quadCount};
}
- TextureOp(GrRenderTargetContext::TextureSetEntry set[],
+ TextureOp(GrSurfaceDrawContext::TextureSetEntry set[],
int cnt,
int proxyRunCnt,
GrSamplerState::Filter filter,
@@ -1178,7 +1178,7 @@
// A helper class that assists in breaking up bulk API quad draws into manageable chunks.
class GrTextureOp::BatchSizeLimiter {
public:
- BatchSizeLimiter(GrRenderTargetContext* rtc,
+ BatchSizeLimiter(GrSurfaceDrawContext* rtc,
const GrClip* clip,
GrRecordingContext* context,
int numEntries,
@@ -1199,7 +1199,7 @@
, fTextureColorSpaceXform(textureColorSpaceXform)
, fNumLeft(numEntries) {}
- void createOp(GrRenderTargetContext::TextureSetEntry set[],
+ void createOp(GrSurfaceDrawContext::TextureSetEntry set[],
int clumpSize,
GrAAType aaType) {
int clumpProxyCount = proxy_run_count(&set[fNumClumped], clumpSize);
@@ -1224,7 +1224,7 @@
int baseIndex() const { return fNumClumped; }
private:
- GrRenderTargetContext* fRTC;
+ GrSurfaceDrawContext* fRTC;
const GrClip* fClip;
GrRecordingContext* fContext;
GrSamplerState::Filter fFilter;
@@ -1239,10 +1239,10 @@
};
// Greedily clump quad draws together until the index buffer limit is exceeded.
-void GrTextureOp::AddTextureSetOps(GrRenderTargetContext* rtc,
+void GrTextureOp::AddTextureSetOps(GrSurfaceDrawContext* rtc,
const GrClip* clip,
GrRecordingContext* context,
- GrRenderTargetContext::TextureSetEntry set[],
+ GrSurfaceDrawContext::TextureSetEntry set[],
int cnt,
int proxyRunCnt,
GrSamplerState::Filter filter,
diff --git a/src/gpu/ops/GrTextureOp.h b/src/gpu/ops/GrTextureOp.h
index aee32b0..61bcfc8 100644
--- a/src/gpu/ops/GrTextureOp.h
+++ b/src/gpu/ops/GrTextureOp.h
@@ -11,8 +11,8 @@
#include "include/core/SkRefCnt.h"
#include "include/private/GrTypesPriv.h"
#include "src/gpu/GrColor.h"
-#include "src/gpu/GrRenderTargetContext.h"
#include "src/gpu/GrSamplerState.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
class GrColorSpaceXform;
class GrDrawOp;
@@ -56,10 +56,10 @@
// Automatically falls back to using one GrFillRectOp per entry if dynamic states are not
// supported, or if the blend mode is not src-over. 'cnt' is the size of the entry array.
// 'proxyCnt' <= 'cnt' and represents the number of proxy switches within the array.
- static void AddTextureSetOps(GrRenderTargetContext*,
+ static void AddTextureSetOps(GrSurfaceDrawContext*,
const GrClip* clip,
GrRecordingContext*,
- GrRenderTargetContext::TextureSetEntry[],
+ GrSurfaceDrawContext::TextureSetEntry[],
int cnt,
int proxyRunCnt,
GrSamplerState::Filter,
diff --git a/src/gpu/ops/GrTriangulatingPathRenderer.cpp b/src/gpu/ops/GrTriangulatingPathRenderer.cpp
index df585d9..ffaf5d0 100644
--- a/src/gpu/ops/GrTriangulatingPathRenderer.cpp
+++ b/src/gpu/ops/GrTriangulatingPathRenderer.cpp
@@ -17,11 +17,11 @@
#include "src/gpu/GrOpFlushState.h"
#include "src/gpu/GrProgramInfo.h"
#include "src/gpu/GrRecordingContextPriv.h"
-#include "src/gpu/GrRenderTargetContext.h"
#include "src/gpu/GrResourceCache.h"
#include "src/gpu/GrResourceProvider.h"
#include "src/gpu/GrSimpleMesh.h"
#include "src/gpu/GrStyle.h"
+#include "src/gpu/GrSurfaceDrawContext.h"
#include "src/gpu/GrThreadSafeCache.h"
#include "src/gpu/GrTriangulator.h"
#include "src/gpu/geometry/GrPathUtils.h"