aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gm/beziereffects.cpp9
-rw-r--r--gm/bigrrectaaeffect.cpp3
-rw-r--r--gm/constcolorprocessor.cpp3
-rw-r--r--gm/convexpolyeffect.cpp6
-rw-r--r--gm/rrects.cpp3
-rw-r--r--gm/texturedomaineffect.cpp3
-rw-r--r--gm/windowrectangles.cpp29
-rw-r--r--gm/yuvtorgbeffect.cpp6
-rw-r--r--include/gpu/GrRenderTargetContext.h4
-rw-r--r--src/gpu/GrContext.cpp12
-rw-r--r--src/gpu/GrReducedClip.cpp49
-rw-r--r--src/gpu/GrRenderTargetContextPriv.h4
-rw-r--r--src/gpu/GrRenderTargetOpList.h2
-rw-r--r--src/gpu/GrTextureParamsAdjuster.cpp8
-rw-r--r--src/gpu/SkGpuDevice.cpp14
-rw-r--r--src/gpu/batches/GrStencilAndCoverPathRenderer.cpp8
-rw-r--r--src/gpu/effects/GrConfigConversionEffect.cpp28
-rw-r--r--tests/GLProgramsTest.cpp5
-rw-r--r--tests/PrimitiveProcessorTest.cpp4
19 files changed, 88 insertions, 112 deletions
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp
index c6d58e17f0..0005857312 100644
--- a/gm/beziereffects.cpp
+++ b/gm/beziereffects.cpp
@@ -195,8 +195,7 @@ protected:
SkAutoTUnref<GrDrawBatch> batch(
new BezierCubicOrConicTestBatch(gp, bounds, color, klmEqs, klmSigns[c]));
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint,
- batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
}
++col;
if (numCols == col) {
@@ -328,8 +327,7 @@ protected:
SkAutoTUnref<GrDrawBatch> batch(
new BezierCubicOrConicTestBatch(gp, bounds, color, klmEqs, 1.f));
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint,
- batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
}
++col;
if (numCols == col) {
@@ -541,8 +539,7 @@ protected:
SkAutoTUnref<GrDrawBatch> batch(
new BezierQuadTestBatch(gp, bounds, color, DevToUV));
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint,
- batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
}
++col;
if (numCols == col) {
diff --git a/gm/bigrrectaaeffect.cpp b/gm/bigrrectaaeffect.cpp
index aa0d02d6d7..82ba7cbdf4 100644
--- a/gm/bigrrectaaeffect.cpp
+++ b/gm/bigrrectaaeffect.cpp
@@ -90,8 +90,7 @@ protected:
SkAutoTUnref<GrDrawBatch> batch(
GrRectBatchFactory::CreateNonAAFill(0xff000000, SkMatrix::I(), bounds,
nullptr, nullptr));
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint,
- batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
}
canvas->restore();
x = x + fTestOffsetX;
diff --git a/gm/constcolorprocessor.cpp b/gm/constcolorprocessor.cpp
index 4059c43269..53aca18872 100644
--- a/gm/constcolorprocessor.cpp
+++ b/gm/constcolorprocessor.cpp
@@ -112,8 +112,7 @@ protected:
SkAutoTUnref<GrDrawBatch> batch(
GrRectBatchFactory::CreateNonAAFill(grPaint.getColor(), viewMatrix,
renderRect, nullptr, nullptr));
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint,
- batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
// Draw labels for the input to the processor and the processor to the right of
// the test rect. The input label appears above the processor label.
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index e06fa9792b..f16963967e 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -185,8 +185,7 @@ protected:
SkAutoTUnref<GrDrawBatch> batch(new PolyBoundsBatch(p.getBounds(), 0xff000000));
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint,
- batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
x += SkScalarCeilToScalar(path->getBounds().width() + kDX);
}
@@ -225,8 +224,7 @@ protected:
SkAutoTUnref<GrDrawBatch> batch(new PolyBoundsBatch(rect, 0xff000000));
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint,
- batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
x += SkScalarCeilToScalar(rect.width() + kDX);
}
diff --git a/gm/rrects.cpp b/gm/rrects.cpp
index 6e0995d503..f012145c32 100644
--- a/gm/rrects.cpp
+++ b/gm/rrects.cpp
@@ -118,8 +118,7 @@ protected:
SkAutoTUnref<GrDrawBatch> batch(
GrRectBatchFactory::CreateNonAAFill(0xff000000, SkMatrix::I(),
bounds, nullptr, nullptr));
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(
- grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
} else {
drew = false;
}
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index 96f70e0bda..70d1420db1 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -130,8 +130,7 @@ protected:
SkAutoTUnref<GrDrawBatch> batch(
GrRectBatchFactory::CreateNonAAFill(GrColor_WHITE, viewMatrix,
renderRect, nullptr, nullptr));
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint,
- batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
x += renderRect.width() + kTestPad;
}
y += renderRect.height() + kTestPad;
diff --git a/gm/windowrectangles.cpp b/gm/windowrectangles.cpp
index bb914d5844..47bc3c92e7 100644
--- a/gm/windowrectangles.cpp
+++ b/gm/windowrectangles.cpp
@@ -204,27 +204,24 @@ void WindowRectanglesMaskGM::onCoverClipStack(const SkClipStack& stack, SkCanvas
void WindowRectanglesMaskGM::visualizeAlphaMask(GrContext* ctx, GrRenderTargetContext* rtc,
const GrReducedClip& reducedClip,
const GrPaint& paint) {
- sk_sp<GrRenderTargetContext> maskDC(
+ sk_sp<GrRenderTargetContext> maskRTC(
ctx->makeRenderTargetContextWithFallback(SkBackingFit::kExact, kLayerRect.width(),
kLayerRect.height(), kAlpha_8_GrPixelConfig,
nullptr));
- if (!maskDC ||
- !ctx->resourceProvider()->attachStencilAttachment(maskDC->accessRenderTarget())) {
+ if (!maskRTC ||
+ !ctx->resourceProvider()->attachStencilAttachment(maskRTC->accessRenderTarget())) {
return;
}
// Draw a checker pattern into the alpha mask so we can visualize the regions left untouched by
// the clip mask generation.
- this->stencilCheckerboard(maskDC.get(), true);
- maskDC->clear(nullptr, GrColorPackA4(0xff), true);
- maskDC->renderTargetContextPriv().drawAndStencilRect(StencilOnlyClip(),
- &GrUserStencilSettings::kUnused,
- SkRegion::kDifference_Op, false, false,
- SkMatrix::I(),
- SkRect::MakeIWH(maskDC->width(),
- maskDC->height()));
- reducedClip.drawAlphaClipMask(maskDC.get());
- sk_sp<GrTexture> mask(maskDC->asTexture());
+ this->stencilCheckerboard(maskRTC.get(), true);
+ maskRTC->clear(nullptr, GrColorPackA4(0xff), true);
+ maskRTC->priv().drawAndStencilRect(StencilOnlyClip(), &GrUserStencilSettings::kUnused,
+ SkRegion::kDifference_Op, false, false, SkMatrix::I(),
+ SkRect::MakeIWH(maskRTC->width(), maskRTC->height()));
+ reducedClip.drawAlphaClipMask(maskRTC.get());
+ sk_sp<GrTexture> mask(maskRTC->asTexture());
int x = kCoverRect.x() - kLayerRect.x(),
y = kCoverRect.y() - kLayerRect.y();
@@ -266,14 +263,14 @@ void WindowRectanglesMaskGM::stencilCheckerboard(GrRenderTargetContext* rtc, boo
0>()
);
- rtc->renderTargetContextPriv().clearStencilClip(GrFixedClip::Disabled(), false);
+ rtc->priv().clearStencilClip(GrFixedClip::Disabled(), false);
for (int y = 0; y < kLayerRect.height(); y += kMaskCheckerSize) {
for (int x = (y & 1) == flip ? 0 : kMaskCheckerSize;
x < kLayerRect.width(); x += 2 * kMaskCheckerSize) {
SkIRect checker = SkIRect::MakeXYWH(x, y, kMaskCheckerSize, kMaskCheckerSize);
- rtc->renderTargetContextPriv().stencilRect(GrNoClip(), &kSetClip, false, SkMatrix::I(),
- SkRect::Make(checker));
+ rtc->priv().stencilRect(GrNoClip(), &kSetClip, false, SkMatrix::I(),
+ SkRect::Make(checker));
}
}
}
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp
index 71f66f0f27..d094bdf4d1 100644
--- a/gm/yuvtorgbeffect.cpp
+++ b/gm/yuvtorgbeffect.cpp
@@ -125,8 +125,7 @@ protected:
SkAutoTUnref<GrDrawBatch> batch(
GrRectBatchFactory::CreateNonAAFill(GrColor_WHITE, viewMatrix,
renderRect, nullptr, nullptr));
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint,
- batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
}
x += renderRect.width() + kTestPad;
}
@@ -238,8 +237,7 @@ protected:
grPaint.addColorFragmentProcessor(fp);
SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(
GrColor_WHITE, viewMatrix, renderRect, nullptr, nullptr));
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint,
- batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
}
}
}
diff --git a/include/gpu/GrRenderTargetContext.h b/include/gpu/GrRenderTargetContext.h
index d188230b35..d1dc0c43ab 100644
--- a/include/gpu/GrRenderTargetContext.h
+++ b/include/gpu/GrRenderTargetContext.h
@@ -346,8 +346,8 @@ public:
sk_sp<GrTexture> asTexture() { return sk_ref_sp(fRenderTarget->asTexture()); }
// Provides access to functions that aren't part of the public API.
- GrRenderTargetContextPriv renderTargetContextPriv();
- const GrRenderTargetContextPriv renderTargetContextPriv() const;
+ GrRenderTargetContextPriv priv();
+ const GrRenderTargetContextPriv priv() const;
GrAuditTrail* auditTrail() { return fAuditTrail; }
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 6fb68c6008..d442b19005 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -441,7 +441,7 @@ bool GrContext::readSurfacePixels(GrSurface* src,
// TODO: Need to decide the semantics of this function for color spaces. Do we support
// conversion to a passed-in color space? For now, specifying nullptr means that this
// path will do no conversion, so it will match the behavior of the non-draw path.
- sk_sp<GrRenderTargetContext> tempDC = this->makeRenderTargetContext(
+ sk_sp<GrRenderTargetContext> tempRTC = this->makeRenderTargetContext(
tempDrawInfo.fTempSurfaceFit,
tempDrawInfo.fTempSurfaceDesc.fWidth,
tempDrawInfo.fTempSurfaceDesc.fHeight,
@@ -449,7 +449,7 @@ bool GrContext::readSurfacePixels(GrSurface* src,
nullptr,
tempDrawInfo.fTempSurfaceDesc.fSampleCnt,
tempDrawInfo.fTempSurfaceDesc.fOrigin);
- if (tempDC) {
+ if (tempRTC) {
SkMatrix textureMatrix;
textureMatrix.setTranslate(SkIntToScalar(left), SkIntToScalar(top));
textureMatrix.postIDiv(src->width(), src->height());
@@ -462,10 +462,10 @@ bool GrContext::readSurfacePixels(GrSurface* src,
} else if (GrGpu::kCallerPrefersDraw_DrawPreference == drawPreference) {
// We only wanted to do the draw in order to perform the unpremul so don't
// bother.
- tempDC.reset(nullptr);
+ tempRTC.reset(nullptr);
}
}
- if (!fp && tempDC) {
+ if (!fp && tempRTC) {
fp = GrConfigConversionEffect::Make(src->asTexture(), tempDrawInfo.fSwizzle,
GrConfigConversionEffect::kNone_PMConversion,
textureMatrix);
@@ -476,8 +476,8 @@ bool GrContext::readSurfacePixels(GrSurface* src,
paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
paint.setAllowSRGBInputs(true);
SkRect rect = SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height));
- tempDC->drawRect(GrNoClip(), paint, SkMatrix::I(), rect, nullptr);
- surfaceToRead.reset(tempDC->asTexture().release());
+ tempRTC->drawRect(GrNoClip(), paint, SkMatrix::I(), rect, nullptr);
+ surfaceToRead.reset(tempRTC->asTexture().release());
left = 0;
top = 0;
didTempDraw = true;
diff --git a/src/gpu/GrReducedClip.cpp b/src/gpu/GrReducedClip.cpp
index d390832be0..7b526ee045 100644
--- a/src/gpu/GrReducedClip.cpp
+++ b/src/gpu/GrReducedClip.cpp
@@ -535,12 +535,12 @@ static bool stencil_element(GrRenderTargetContext* rtc,
SkDEBUGFAIL("Should never get here with an empty element.");
break;
case Element::kRect_Type:
- return rtc->renderTargetContextPriv().drawAndStencilRect(clip, ss,
- (SkRegion::Op)element->getOp(),
- element->isInverseFilled(),
- element->isAA(),
- viewMatrix,
- element->getRect());
+ return rtc->priv().drawAndStencilRect(clip, ss,
+ (SkRegion::Op)element->getOp(),
+ element->isInverseFilled(),
+ element->isAA(),
+ viewMatrix,
+ element->getRect());
break;
default: {
SkPath path;
@@ -549,11 +549,11 @@ static bool stencil_element(GrRenderTargetContext* rtc,
path.toggleInverseFillType();
}
- return rtc->renderTargetContextPriv().drawAndStencilPath(clip, ss,
- (SkRegion::Op)element->getOp(),
- element->isInverseFilled(),
- element->isAA(), viewMatrix,
- path);
+ return rtc->priv().drawAndStencilPath(clip, ss,
+ (SkRegion::Op)element->getOp(),
+ element->isInverseFilled(),
+ element->isAA(), viewMatrix,
+ path);
break;
}
}
@@ -601,7 +601,7 @@ bool GrReducedClip::drawAlphaClipMask(GrRenderTargetContext* rtc) const {
// The scratch texture that we are drawing into can be substantially larger than the mask. Only
// clear the part that we care about.
GrColor initialCoverage = InitialState::kAllIn == this->initialState() ? -1 : 0;
- rtc->renderTargetContextPriv().clear(clip, initialCoverage, true);
+ rtc->priv().clear(clip, initialCoverage, true);
// Set the matrix so that rendered clip elements are transformed to mask space from clip space.
SkMatrix translate;
@@ -638,10 +638,8 @@ bool GrReducedClip::drawAlphaClipMask(GrRenderTargetContext* rtc) const {
GrUserStencilOp::kZero,
0xffff>()
);
- if (!rtc->renderTargetContextPriv().drawAndStencilRect(clip, &kDrawOutsideElement,
- op, !invert, false,
- translate,
- SkRect::Make(fIBounds))) {
+ if (!rtc->priv().drawAndStencilRect(clip, &kDrawOutsideElement, op, !invert, false,
+ translate, SkRect::Make(fIBounds))) {
return false;
}
} else {
@@ -706,8 +704,7 @@ bool GrReducedClip::drawStencilClipMask(GrContext* context,
}
bool initialState = InitialState::kAllIn == this->initialState();
- renderTargetContext->renderTargetContextPriv().clearStencilClip(stencilClip.fixedClip(),
- initialState);
+ renderTargetContext->priv().clearStencilClip(stencilClip.fixedClip(), initialState);
// Set the matrix so that rendered clip elements are transformed from clip to stencil space.
SkMatrix viewMatrix;
@@ -779,10 +776,8 @@ bool GrReducedClip::drawStencilClipMask(GrContext* context,
0xffff>()
);
if (Element::kRect_Type == element->getType()) {
- renderTargetContext->renderTargetContextPriv().stencilRect(stencilClip.fixedClip(),
- &kDrawToStencil, useHWAA,
- viewMatrix,
- element->getRect());
+ renderTargetContext->priv().stencilRect(stencilClip.fixedClip(), &kDrawToStencil,
+ useHWAA, viewMatrix, element->getRect());
} else {
if (!clipPath.isEmpty()) {
GrShape shape(clipPath, GrStyle::SimpleFill());
@@ -821,9 +816,8 @@ bool GrReducedClip::drawStencilClipMask(GrContext* context,
for (GrUserStencilSettings const* const* pass = stencilPasses; *pass; ++pass) {
if (drawDirectToClip) {
if (Element::kRect_Type == element->getType()) {
- renderTargetContext->renderTargetContextPriv().stencilRect(stencilClip, *pass,
- useHWAA, viewMatrix,
- element->getRect());
+ renderTargetContext->priv().stencilRect(stencilClip, *pass, useHWAA, viewMatrix,
+ element->getRect());
} else {
GrShape shape(clipPath, GrStyle::SimpleFill());
GrPaint paint;
@@ -844,9 +838,8 @@ bool GrReducedClip::drawStencilClipMask(GrContext* context,
} else {
// The view matrix is setup to do clip space -> stencil space translation, so
// draw rect in clip space.
- renderTargetContext->renderTargetContextPriv().stencilRect(stencilClip, *pass,
- false, viewMatrix,
- SkRect::Make(fIBounds));
+ renderTargetContext->priv().stencilRect(stencilClip, *pass, false, viewMatrix,
+ SkRect::Make(fIBounds));
}
}
}
diff --git a/src/gpu/GrRenderTargetContextPriv.h b/src/gpu/GrRenderTargetContextPriv.h
index 82792dd7da..092fd11c58 100644
--- a/src/gpu/GrRenderTargetContextPriv.h
+++ b/src/gpu/GrRenderTargetContextPriv.h
@@ -78,11 +78,11 @@ private:
friend class GrRenderTargetContext; // to construct/copy this type.
};
-inline GrRenderTargetContextPriv GrRenderTargetContext::renderTargetContextPriv() {
+inline GrRenderTargetContextPriv GrRenderTargetContext::priv() {
return GrRenderTargetContextPriv(this);
}
-inline const GrRenderTargetContextPriv GrRenderTargetContext::renderTargetContextPriv () const {
+inline const GrRenderTargetContextPriv GrRenderTargetContext::priv() const {
return GrRenderTargetContextPriv(const_cast<GrRenderTargetContext*>(this));
}
diff --git a/src/gpu/GrRenderTargetOpList.h b/src/gpu/GrRenderTargetOpList.h
index c321d99a61..e379c35f46 100644
--- a/src/gpu/GrRenderTargetOpList.h
+++ b/src/gpu/GrRenderTargetOpList.h
@@ -147,7 +147,7 @@ private:
GrXferProcessor::DstTexture*,
const SkRect& batchBounds);
- // Used only by renderTargetContextPriv.
+ // Used only via GrRenderTargetContextPriv.
void clearStencilClip(const GrFixedClip&, bool insideStencilMask, GrRenderTarget*);
struct RecordedBatch {
diff --git a/src/gpu/GrTextureParamsAdjuster.cpp b/src/gpu/GrTextureParamsAdjuster.cpp
index 902d1c3b21..b4f5e686d9 100644
--- a/src/gpu/GrTextureParamsAdjuster.cpp
+++ b/src/gpu/GrTextureParamsAdjuster.cpp
@@ -36,9 +36,9 @@ static GrTexture* copy_on_gpu(GrTexture* inputTexture, const SkIRect* subset,
GrPixelConfig config = GrMakePixelConfigUncompressed(inputTexture->config());
- sk_sp<GrRenderTargetContext> copyDC = context->makeRenderTargetContextWithFallback(
+ sk_sp<GrRenderTargetContext> copyRTC = context->makeRenderTargetContextWithFallback(
SkBackingFit::kExact, copyParams.fWidth, copyParams.fHeight, config, nullptr);
- if (!copyDC) {
+ if (!copyRTC) {
return nullptr;
}
@@ -84,8 +84,8 @@ static GrTexture* copy_on_gpu(GrTexture* inputTexture, const SkIRect* subset,
}
SkRect dstRect = SkRect::MakeIWH(copyParams.fWidth, copyParams.fHeight);
- copyDC->fillRectToRect(GrNoClip(), paint, SkMatrix::I(), dstRect, localRect);
- return copyDC->asTexture().release();
+ copyRTC->fillRectToRect(GrNoClip(), paint, SkMatrix::I(), dstRect, localRect);
+ return copyRTC->asTexture().release();
}
GrTextureAdjuster::GrTextureAdjuster(GrTexture* original, SkAlphaType alphaType,
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 68fcded959..dbb4699c1a 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -243,16 +243,16 @@ void SkGpuDevice::clearAll() {
void SkGpuDevice::replaceRenderTargetContext(bool shouldRetainContent) {
ASSERT_SINGLE_OWNER
- SkBudgeted budgeted = fRenderTargetContext->renderTargetContextPriv().isBudgeted();
+ SkBudgeted budgeted = fRenderTargetContext->priv().isBudgeted();
- sk_sp<GrRenderTargetContext> newDC(MakeRenderTargetContext(
+ sk_sp<GrRenderTargetContext> newRTC(MakeRenderTargetContext(
this->context(),
budgeted,
this->imageInfo(),
fRenderTargetContext->numColorSamples(),
fRenderTargetContext->origin(),
&this->surfaceProps()));
- if (!newDC) {
+ if (!newRTC) {
return;
}
@@ -260,12 +260,12 @@ void SkGpuDevice::replaceRenderTargetContext(bool shouldRetainContent) {
if (fRenderTargetContext->wasAbandoned()) {
return;
}
- newDC->copySurface(fRenderTargetContext->asTexture().get(),
- SkIRect::MakeWH(this->width(), this->height()),
- SkIPoint::Make(0, 0));
+ newRTC->copySurface(fRenderTargetContext->asTexture().get(),
+ SkIRect::MakeWH(this->width(), this->height()),
+ SkIPoint::Make(0, 0));
}
- fRenderTargetContext = newDC;
+ fRenderTargetContext = newRTC;
}
///////////////////////////////////////////////////////////////////////////////
diff --git a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
index 1aaebbf01d..b6bf940824 100644
--- a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
@@ -83,8 +83,7 @@ void GrStencilAndCoverPathRenderer::onStencilPath(const StencilPathArgs& args) {
SkASSERT(!args.fIsAA || args.fRenderTargetContext->isStencilBufferMultisampled());
SkAutoTUnref<GrPath> p(get_gr_path(fResourceProvider, *args.fShape));
- args.fRenderTargetContext->renderTargetContextPriv().stencilPath(*args.fClip, args.fIsAA,
- *args.fViewMatrix, p);
+ args.fRenderTargetContext->priv().stencilPath(*args.fClip, args.fIsAA, *args.fViewMatrix, p);
}
bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
@@ -125,9 +124,8 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
nullptr, &invert));
// fake inverse with a stencil and cover
- args.fRenderTargetContext->renderTargetContextPriv().stencilPath(*args.fClip,
- args.fPaint->isAntiAlias(),
- viewMatrix, path);
+ args.fRenderTargetContext->priv().stencilPath(*args.fClip, args.fPaint->isAntiAlias(),
+ viewMatrix, path);
{
static constexpr GrUserStencilSettings kInvertedCoverPass(
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index 079fd0da02..8a112491f2 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -184,13 +184,13 @@ void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context
}
}
- sk_sp<GrRenderTargetContext> readDC(context->makeRenderTargetContext(SkBackingFit::kExact,
- kSize, kSize,
- kConfig, nullptr));
- sk_sp<GrRenderTargetContext> tempDC(context->makeRenderTargetContext(SkBackingFit::kExact,
- kSize, kSize,
- kConfig, nullptr));
- if (!readDC || !tempDC) {
+ sk_sp<GrRenderTargetContext> readRTC(context->makeRenderTargetContext(SkBackingFit::kExact,
+ kSize, kSize,
+ kConfig, nullptr));
+ sk_sp<GrRenderTargetContext> tempRTC(context->makeRenderTargetContext(SkBackingFit::kExact,
+ kSize, kSize,
+ kConfig, nullptr));
+ if (!readRTC || !tempRTC) {
return;
}
GrSurfaceDesc desc;
@@ -226,28 +226,28 @@ void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context
sk_sp<GrFragmentProcessor> pmToUPM1(new GrConfigConversionEffect(
dataTex, GrSwizzle::RGBA(), *pmToUPMRule, SkMatrix::I()));
sk_sp<GrFragmentProcessor> upmToPM(new GrConfigConversionEffect(
- readDC->asTexture().get(), GrSwizzle::RGBA(), *upmToPMRule, SkMatrix::I()));
+ readRTC->asTexture().get(), GrSwizzle::RGBA(), *upmToPMRule, SkMatrix::I()));
sk_sp<GrFragmentProcessor> pmToUPM2(new GrConfigConversionEffect(
- tempDC->asTexture().get(), GrSwizzle::RGBA(), *pmToUPMRule, SkMatrix::I()));
+ tempRTC->asTexture().get(), GrSwizzle::RGBA(), *pmToUPMRule, SkMatrix::I()));
paint1.addColorFragmentProcessor(std::move(pmToUPM1));
paint1.setPorterDuffXPFactory(SkBlendMode::kSrc);
- readDC->fillRectToRect(GrNoClip(), paint1, SkMatrix::I(), kDstRect, kSrcRect);
+ readRTC->fillRectToRect(GrNoClip(), paint1, SkMatrix::I(), kDstRect, kSrcRect);
- readDC->asTexture()->readPixels(0, 0, kSize, kSize, kConfig, firstRead);
+ readRTC->asTexture()->readPixels(0, 0, kSize, kSize, kConfig, firstRead);
paint2.addColorFragmentProcessor(std::move(upmToPM));
paint2.setPorterDuffXPFactory(SkBlendMode::kSrc);
- tempDC->fillRectToRect(GrNoClip(), paint2, SkMatrix::I(), kDstRect, kSrcRect);
+ tempRTC->fillRectToRect(GrNoClip(), paint2, SkMatrix::I(), kDstRect, kSrcRect);
paint3.addColorFragmentProcessor(std::move(pmToUPM2));
paint3.setPorterDuffXPFactory(SkBlendMode::kSrc);
- readDC->fillRectToRect(GrNoClip(), paint3, SkMatrix::I(), kDstRect, kSrcRect);
+ readRTC->fillRectToRect(GrNoClip(), paint3, SkMatrix::I(), kDstRect, kSrcRect);
- readDC->asTexture()->readPixels(0, 0, kSize, kSize, kConfig, secondRead);
+ readRTC->asTexture()->readPixels(0, 0, kSize, kSize, kConfig, secondRead);
failed = false;
for (int y = 0; y < kSize && !failed; ++y) {
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index fc490614c1..cb6f350ceb 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -340,8 +340,7 @@ bool GrDrawingManager::ProgramUnitTest(GrContext* context, int maxStages) {
bool snapToCenters = set_random_state(&grPaint, &random);
const GrUserStencilSettings* uss = get_random_stencil(&random);
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint, batch, uss,
- snapToCenters);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch, uss, snapToCenters);
}
// Flush everything, test passes if flush is successful(ie, no asserts are hit, no crashes)
drawingManager->flush();
@@ -375,7 +374,7 @@ bool GrDrawingManager::ProgramUnitTest(GrContext* context, int maxStages) {
BlockInputFragmentProcessor::Make(std::move(fp)));
grPaint.addColorFragmentProcessor(std::move(blockFP));
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
drawingManager->flush();
}
}
diff --git a/tests/PrimitiveProcessorTest.cpp b/tests/PrimitiveProcessorTest.cpp
index 48a7cfd0a5..b48d5ea211 100644
--- a/tests/PrimitiveProcessorTest.cpp
+++ b/tests/PrimitiveProcessorTest.cpp
@@ -127,7 +127,7 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) {
GrPaint grPaint;
// This one should succeed.
batch.reset(new Batch(attribCnt));
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
context->flush();
#if GR_GPU_STATS
REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 1);
@@ -136,7 +136,7 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) {
context->resetGpuStats();
// This one should fail.
batch.reset(new Batch(attribCnt+1));
- renderTargetContext->renderTargetContextPriv().testingOnly_drawBatch(grPaint, batch);
+ renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
context->flush();
#if GR_GPU_STATS
REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0);