GrRenderTargetContext scaffolding
I added the renderTargetContext() method to GrTextTarget so I don't
have to convert the entire call stack over in one CL. In the end,
GrTextTarget and GrRenderTargetContext::TextTarget will be deleted.
Change-Id: I49387737c26b69111050101d9da3380617db2918
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295376
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp
index 5eb1602..13823a4 100644
--- a/src/gpu/ops/GrAtlasTextOp.cpp
+++ b/src/gpu/ops/GrAtlasTextOp.cpp
@@ -72,14 +72,14 @@
fDrawMatrix, fDrawOrigin, fClipRect);
}
-std::unique_ptr<GrAtlasTextOp> GrAtlasTextOp::MakeBitmap(GrRecordingContext* context,
+std::unique_ptr<GrAtlasTextOp> GrAtlasTextOp::MakeBitmap(GrRenderTargetContext* rtc,
GrPaint&& paint,
GrTextBlob::SubRun* subrun,
const SkMatrix& drawMatrix,
SkPoint drawOrigin,
const SkIRect& clipRect,
const SkPMColor4f& filteredColor) {
- GrOpMemoryPool* pool = context->priv().opMemoryPool();
+ GrOpMemoryPool* pool = rtc->fContext->priv().opMemoryPool();
MaskType maskType = [&]() {
switch (subrun->maskFormat()) {
@@ -104,17 +104,17 @@
}
std::unique_ptr<GrAtlasTextOp> GrAtlasTextOp::MakeDistanceField(
- GrRecordingContext* context,
- GrPaint&& paint,
- GrTextBlob::SubRun* subrun,
- const SkMatrix& drawMatrix,
- SkPoint drawOrigin,
- const SkIRect& clipRect,
- const SkPMColor4f& filteredColor,
- bool useGammaCorrectDistanceTable,
- SkColor luminanceColor,
- const SkSurfaceProps& props) {
- GrOpMemoryPool* pool = context->priv().opMemoryPool();
+ GrRenderTargetContext* rtc,
+ GrPaint&& paint,
+ GrTextBlob::SubRun* subrun,
+ const SkMatrix& drawMatrix,
+ SkPoint drawOrigin,
+ const SkIRect& clipRect,
+ const SkPMColor4f& filteredColor,
+ bool useGammaCorrectDistanceTable,
+ SkColor luminanceColor,
+ const SkSurfaceProps& props) {
+ GrOpMemoryPool* pool = rtc->fContext->priv().opMemoryPool();
bool isBGR = SkPixelGeometryIsBGR(props.pixelGeometry());
bool isLCD = subrun->hasUseLCDText() && SkPixelGeometryIsH(props.pixelGeometry());
MaskType maskType = !subrun->isAntiAliased() ? kAliasedDistanceField_MaskType