aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2015-05-22 15:22:48 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-22 15:22:48 -0700
commitd23a395d519835f78630aaea3f2a2c30ecdffe87 (patch)
tree641636014edef293ac894052c95ee955678f9512
parentbb106b5f6ee18f7453b63f3a95f421b60a957f39 (diff)
Revert of Move DstCoordTexture to GrXP, rename and remove the word "copy" from dstcopytexture names. (patchset #6 id:100001 of https://codereview.chromium.org/1132093004/)
Reason for revert: This is asserting on GTX660 bots with '!dst'. This may just be catching an existing issue. https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/622/steps/dm/logs/stdio https://build.chromium.org/p/client.skia/builders/Test-Win7-MSVC-ShuttleA-GPU-HD2000-x86-Debug-ANGLE/builds/209/steps/dm/logs/stdio https://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/318/steps/dm/logs/stdio Original issue's description: > Move DstCoordTexture to GrXP, rename and remove the word "copy" from dstcopytexture names. > > Committed: https://skia.googlesource.com/skia/+/bb106b5f6ee18f7453b63f3a95f421b60a957f39 TBR=egdaniel@google.com,bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1158453004
-rw-r--r--include/gpu/GrTexture.h39
-rw-r--r--include/gpu/GrXferProcessor.h72
-rw-r--r--include/gpu/effects/GrCoverageSetOpXP.h2
-rw-r--r--include/gpu/effects/GrPorterDuffXferProcessor.h2
-rw-r--r--src/effects/SkArithmeticMode_gpu.cpp15
-rw-r--r--src/effects/SkArithmeticMode_gpu.h2
-rw-r--r--src/gpu/GrDrawTarget.cpp18
-rw-r--r--src/gpu/GrDrawTarget.h13
-rw-r--r--src/gpu/GrPipeline.cpp5
-rw-r--r--src/gpu/GrPipeline.h2
-rw-r--r--src/gpu/GrPipelineBuilder.cpp8
-rw-r--r--src/gpu/GrPipelineBuilder.h6
-rw-r--r--src/gpu/GrXferProcessor.cpp35
-rw-r--r--src/gpu/effects/GrCoverageSetOpXP.cpp3
-rw-r--r--src/gpu/effects/GrCustomXfermode.cpp15
-rw-r--r--src/gpu/effects/GrCustomXfermodePriv.h2
-rw-r--r--src/gpu/effects/GrDisableColorXP.cpp3
-rw-r--r--src/gpu/effects/GrDisableColorXP.h2
-rw-r--r--src/gpu/effects/GrPorterDuffXferProcessor.cpp15
-rw-r--r--src/gpu/gl/GrGLProgram.cpp2
-rw-r--r--src/gpu/gl/GrGLProgram.h2
-rw-r--r--src/gpu/gl/GrGLProgramDesc.h2
-rw-r--r--src/gpu/gl/GrGLXferProcessor.cpp48
-rw-r--r--src/gpu/gl/GrGLXferProcessor.h4
-rw-r--r--src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp12
-rw-r--r--src/gpu/gl/builders/GrGLFragmentShaderBuilder.h8
-rw-r--r--tests/GrPorterDuffTest.cpp4
27 files changed, 170 insertions, 171 deletions
diff --git a/include/gpu/GrTexture.h b/include/gpu/GrTexture.h
index ddba94065b..d565f2f9a7 100644
--- a/include/gpu/GrTexture.h
+++ b/include/gpu/GrTexture.h
@@ -70,4 +70,43 @@ private:
typedef GrSurface INHERITED;
};
+/**
+ * Represents a texture that is intended to be accessed in device coords with an offset.
+ */
+class GrDeviceCoordTexture {
+public:
+ GrDeviceCoordTexture() { fOffset.set(0, 0); }
+
+ GrDeviceCoordTexture(const GrDeviceCoordTexture& other) {
+ *this = other;
+ }
+
+ GrDeviceCoordTexture(GrTexture* texture, const SkIPoint& offset)
+ : fTexture(SkSafeRef(texture))
+ , fOffset(offset) {
+ }
+
+ GrDeviceCoordTexture& operator=(const GrDeviceCoordTexture& other) {
+ fTexture.reset(SkSafeRef(other.fTexture.get()));
+ fOffset = other.fOffset;
+ return *this;
+ }
+
+ const SkIPoint& offset() const { return fOffset; }
+
+ void setOffset(const SkIPoint& offset) { fOffset = offset; }
+ void setOffset(int ox, int oy) { fOffset.set(ox, oy); }
+
+ GrTexture* texture() const { return fTexture.get(); }
+
+ GrTexture* setTexture(GrTexture* texture) {
+ fTexture.reset(SkSafeRef(texture));
+ return texture;
+ }
+
+private:
+ SkAutoTUnref<GrTexture> fTexture;
+ SkIPoint fOffset;
+};
+
#endif
diff --git a/include/gpu/GrXferProcessor.h b/include/gpu/GrXferProcessor.h
index 812a9b32ab..85e5aa04ed 100644
--- a/include/gpu/GrXferProcessor.h
+++ b/include/gpu/GrXferProcessor.h
@@ -104,47 +104,6 @@ enum GrXferBarrierType {
class GrXferProcessor : public GrProcessor {
public:
/**
- * A texture that contains the dst pixel values and an integer coord offset from device space
- * to the space of the texture. Depending on GPU capabilities a DstTexture may be used by a
- * GrXferProcessor for blending in the fragment shader.
- */
- class DstTexture {
- public:
- DstTexture() { fOffset.set(0, 0); }
-
- DstTexture(const DstTexture& other) {
- *this = other;
- }
-
- DstTexture(GrTexture* texture, const SkIPoint& offset)
- : fTexture(SkSafeRef(texture))
- , fOffset(offset) {
- }
-
- DstTexture& operator=(const DstTexture& other) {
- fTexture.reset(SkSafeRef(other.fTexture.get()));
- fOffset = other.fOffset;
- return *this;
- }
-
- const SkIPoint& offset() const { return fOffset; }
-
- void setOffset(const SkIPoint& offset) { fOffset = offset; }
- void setOffset(int ox, int oy) { fOffset.set(ox, oy); }
-
- GrTexture* texture() const { return fTexture.get(); }
-
- GrTexture* setTexture(GrTexture* texture) {
- fTexture.reset(SkSafeRef(texture));
- return texture;
- }
-
- private:
- SkAutoTUnref<GrTexture> fTexture;
- SkIPoint fOffset;
- };
-
- /**
* Sets a unique key on the GrProcessorKeyBuilder calls onGetGLProcessorKey(...) to get the
* specific subclass's key.
*/
@@ -240,15 +199,15 @@ public:
* shader. If the returned texture is NULL then the XP is either not reading the dst or we have
* extentions that support framebuffer fetching and thus don't need a copy of the dst texture.
*/
- const GrTexture* getDstTexture() const { return fDstTexture.getTexture(); }
+ const GrTexture* getDstCopyTexture() const { return fDstCopy.getTexture(); }
/**
- * Returns the offset in device coords to use when accessing the dst texture to get the dst
- * pixel color in the shader. This value is only valid if getDstTexture() != NULL.
+ * Returns the offset into the DstCopyTexture to use when reading it in the shader. This value
+ * is only valid if getDstCopyTexture() != NULL.
*/
- const SkIPoint& dstTextureOffset() const {
- SkASSERT(this->getDstTexture());
- return fDstTextureOffset;
+ const SkIPoint& dstCopyTextureOffset() const {
+ SkASSERT(this->getDstCopyTexture());
+ return fDstCopyTextureOffset;
}
/**
@@ -279,10 +238,10 @@ public:
if (this->fReadsCoverage != that.fReadsCoverage) {
return false;
}
- if (this->fDstTexture.getTexture() != that.fDstTexture.getTexture()) {
+ if (this->fDstCopy.getTexture() != that.fDstCopy.getTexture()) {
return false;
}
- if (this->fDstTextureOffset != that.fDstTextureOffset) {
+ if (this->fDstCopyTextureOffset != that.fDstCopyTextureOffset) {
return false;
}
return this->onIsEqual(that);
@@ -290,7 +249,7 @@ public:
protected:
GrXferProcessor();
- GrXferProcessor(const DstTexture*, bool willReadDstColor);
+ GrXferProcessor(const GrDeviceCoordTexture* dstCopy, bool willReadDstColor);
private:
virtual OptFlags onGetOptimizations(const GrProcOptInfo& colorPOI,
@@ -327,8 +286,8 @@ private:
bool fWillReadDstColor;
bool fReadsCoverage;
- SkIPoint fDstTextureOffset;
- GrTextureAccess fDstTexture;
+ SkIPoint fDstCopyTextureOffset;
+ GrTextureAccess fDstCopy;
typedef GrFragmentProcessor INHERITED;
};
@@ -350,10 +309,9 @@ GR_MAKE_BITFIELD_OPS(GrXferProcessor::OptFlags);
*/
class GrXPFactory : public SkRefCnt {
public:
- typedef GrXferProcessor::DstTexture DstTexture;
GrXferProcessor* createXferProcessor(const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
- const DstTexture*,
+ const GrDeviceCoordTexture* dstCopy,
const GrCaps& caps) const;
/**
@@ -377,8 +335,8 @@ public:
virtual void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI,
InvariantOutput*) const = 0;
- bool willNeedDstTexture(const GrCaps& caps, const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI) const;
+ bool willNeedDstCopy(const GrCaps& caps, const GrProcOptInfo& colorPOI,
+ const GrProcOptInfo& coveragePOI) const;
bool isEqual(const GrXPFactory& that) const {
if (this->classID() != that.classID()) {
@@ -408,7 +366,7 @@ private:
virtual GrXferProcessor* onCreateXferProcessor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
- const DstTexture*) const = 0;
+ const GrDeviceCoordTexture* dstCopy) const = 0;
/**
* Returns true if the XP generated by this factory will explicitly read dst in the fragment
* shader.
diff --git a/include/gpu/effects/GrCoverageSetOpXP.h b/include/gpu/effects/GrCoverageSetOpXP.h
index 2f4530c300..f4224e1cbe 100644
--- a/include/gpu/effects/GrCoverageSetOpXP.h
+++ b/include/gpu/effects/GrCoverageSetOpXP.h
@@ -37,7 +37,7 @@ private:
GrXferProcessor* onCreateXferProcessor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
- const DstTexture*) const override;
+ const GrDeviceCoordTexture* dstCopy) const override;
bool willReadDstColor(const GrCaps& /*caps*/,
const GrProcOptInfo& /*colorPOI*/,
diff --git a/include/gpu/effects/GrPorterDuffXferProcessor.h b/include/gpu/effects/GrPorterDuffXferProcessor.h
index e4f72203f6..56ddb372b4 100644
--- a/include/gpu/effects/GrPorterDuffXferProcessor.h
+++ b/include/gpu/effects/GrPorterDuffXferProcessor.h
@@ -29,7 +29,7 @@ private:
GrXferProcessor* onCreateXferProcessor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
- const DstTexture*) const override;
+ const GrDeviceCoordTexture* dstCopy) const override;
bool willReadDstColor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
diff --git a/src/effects/SkArithmeticMode_gpu.cpp b/src/effects/SkArithmeticMode_gpu.cpp
index 3b815e5210..ae0839710c 100644
--- a/src/effects/SkArithmeticMode_gpu.cpp
+++ b/src/effects/SkArithmeticMode_gpu.cpp
@@ -161,8 +161,9 @@ GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrArithmeticFP);
class ArithmeticXP : public GrXferProcessor {
public:
static GrXferProcessor* Create(float k1, float k2, float k3, float k4, bool enforcePMColor,
- const DstTexture* dstTexture, bool willReadDstColor) {
- return SkNEW_ARGS(ArithmeticXP, (k1, k2, k3, k4, enforcePMColor, dstTexture,
+ const GrDeviceCoordTexture* dstCopy,
+ bool willReadDstColor) {
+ return SkNEW_ARGS(ArithmeticXP, (k1, k2, k3, k4, enforcePMColor, dstCopy,
willReadDstColor));
}
@@ -182,7 +183,7 @@ public:
private:
ArithmeticXP(float k1, float k2, float k3, float k4, bool enforcePMColor,
- const DstTexture*, bool willReadDstColor);
+ const GrDeviceCoordTexture* dstCopy, bool willReadDstColor);
GrXferProcessor::OptFlags onGetOptimizations(const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
@@ -262,8 +263,8 @@ private:
///////////////////////////////////////////////////////////////////////////////
ArithmeticXP::ArithmeticXP(float k1, float k2, float k3, float k4, bool enforcePMColor,
- const DstTexture* dstTexture, bool willReadDstColor)
- : INHERITED(dstTexture, willReadDstColor)
+ const GrDeviceCoordTexture* dstCopy, bool willReadDstColor)
+ : INHERITED(dstCopy, willReadDstColor)
, fK1(k1)
, fK2(k2)
, fK3(k3)
@@ -300,8 +301,8 @@ GrXferProcessor*
GrArithmeticXPFactory::onCreateXferProcessor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
- const DstTexture* dstTexture) const {
- return ArithmeticXP::Create(fK1, fK2, fK3, fK4, fEnforcePMColor, dstTexture,
+ const GrDeviceCoordTexture* dstCopy) const {
+ return ArithmeticXP::Create(fK1, fK2, fK3, fK4, fEnforcePMColor, dstCopy,
this->willReadDstColor(caps, colorPOI, coveragePOI));
}
diff --git a/src/effects/SkArithmeticMode_gpu.h b/src/effects/SkArithmeticMode_gpu.h
index 0c1e9d72f3..cbf32ff9cb 100644
--- a/src/effects/SkArithmeticMode_gpu.h
+++ b/src/effects/SkArithmeticMode_gpu.h
@@ -90,7 +90,7 @@ private:
GrXferProcessor* onCreateXferProcessor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
- const DstTexture*) const override;
+ const GrDeviceCoordTexture* dstCopy) const override;
bool willReadDstColor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 644161f4d9..e5baaa7404 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -43,9 +43,9 @@ GrDrawTarget::GrDrawTarget(GrContext* context)
bool GrDrawTarget::setupDstReadIfNecessary(const GrPipelineBuilder& pipelineBuilder,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
- GrXferProcessor::DstTexture* dstTexture,
+ GrDeviceCoordTexture* dstCopy,
const SkRect* drawBounds) {
- if (!pipelineBuilder.willXPNeedDstTexture(*this->caps(), colorPOI, coveragePOI)) {
+ if (!pipelineBuilder.willXPNeedDstCopy(*this->caps(), colorPOI, coveragePOI)) {
return true;
}
@@ -55,8 +55,8 @@ bool GrDrawTarget::setupDstReadIfNecessary(const GrPipelineBuilder& pipelineBuil
if (GrTexture* rtTex = rt->asTexture()) {
// The render target is a texture, se we can read from it directly in the shader. The XP
// will be responsible to detect this situation and request a texture barrier.
- dstTexture->setTexture(rtTex);
- dstTexture->setOffset(0, 0);
+ dstCopy->setTexture(rtTex);
+ dstCopy->setOffset(0, 0);
return true;
}
}
@@ -102,8 +102,8 @@ bool GrDrawTarget::setupDstReadIfNecessary(const GrPipelineBuilder& pipelineBuil
}
SkIPoint dstPoint = {0, 0};
if (this->copySurface(copy, rt, copyRect, dstPoint)) {
- dstTexture->setTexture(copy);
- dstTexture->setOffset(copyRect.fLeft, copyRect.fTop);
+ dstCopy->setTexture(copy);
+ dstCopy->setOffset(copyRect.fLeft, copyRect.fTop);
return true;
} else {
return false;
@@ -497,7 +497,7 @@ void GrDrawTarget::setupPipeline(const PipelineInfo& pipelineInfo,
pipelineInfo.fCoveragePOI,
*this->caps(),
*pipelineInfo.fScissor,
- &pipelineInfo.fDstTexture));
+ &pipelineInfo.fDstCopy));
}
///////////////////////////////////////////////////////////////////////////////
@@ -511,7 +511,7 @@ GrDrawTarget::PipelineInfo::PipelineInfo(GrPipelineBuilder* pipelineBuilder,
fColorPOI = fPipelineBuilder->colorProcInfo(primProc);
fCoveragePOI = fPipelineBuilder->coverageProcInfo(primProc);
if (!target->setupDstReadIfNecessary(*fPipelineBuilder, fColorPOI, fCoveragePOI,
- &fDstTexture, devBounds)) {
+ &fDstCopy, devBounds)) {
fPipelineBuilder = NULL;
}
}
@@ -526,7 +526,7 @@ GrDrawTarget::PipelineInfo::PipelineInfo(GrPipelineBuilder* pipelineBuilder,
fColorPOI = fPipelineBuilder->colorProcInfo(batch);
fCoveragePOI = fPipelineBuilder->coverageProcInfo(batch);
if (!target->setupDstReadIfNecessary(*fPipelineBuilder, fColorPOI, fCoveragePOI,
- &fDstTexture, devBounds)) {
+ &fDstCopy, devBounds)) {
fPipelineBuilder = NULL;
}
}
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 9cb91e345d..a5e3b8efee 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -18,7 +18,6 @@
#include "GrPipelineBuilder.h"
#include "GrTraceMarker.h"
#include "GrVertexBuffer.h"
-#include "GrXferProcessor.h"
#include "SkClipStack.h"
#include "SkMatrix.h"
@@ -231,7 +230,7 @@ protected:
bool setupDstReadIfNecessary(const GrPipelineBuilder&,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
- GrXferProcessor::DstTexture*,
+ GrDeviceCoordTexture* dstCopy,
const SkRect* drawBounds);
struct PipelineInfo {
@@ -251,11 +250,11 @@ protected:
bool mustSkipDraw() const { return (NULL == fPipelineBuilder); }
- GrPipelineBuilder* fPipelineBuilder;
- GrScissorState* fScissor;
- GrProcOptInfo fColorPOI;
- GrProcOptInfo fCoveragePOI;
- GrXferProcessor::DstTexture fDstTexture;
+ GrPipelineBuilder* fPipelineBuilder;
+ GrScissorState* fScissor;
+ GrProcOptInfo fColorPOI;
+ GrProcOptInfo fCoveragePOI;
+ GrDeviceCoordTexture fDstCopy;
};
void setupPipeline(const PipelineInfo& pipelineInfo, GrPipeline* pipeline);
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index d9d3d94853..f17f402b4d 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -19,11 +19,10 @@ GrPipeline::GrPipeline(const GrPipelineBuilder& pipelineBuilder,
const GrProcOptInfo& coveragePOI,
const GrCaps& caps,
const GrScissorState& scissorState,
- const GrXferProcessor::DstTexture* dstTexture) {
+ const GrDeviceCoordTexture* dstCopy) {
// Create XferProcessor from DS's XPFactory
SkAutoTUnref<GrXferProcessor> xferProcessor(
- pipelineBuilder.getXPFactory()->createXferProcessor(
- colorPOI, coveragePOI, dstTexture, caps));
+ pipelineBuilder.getXPFactory()->createXferProcessor(colorPOI, coveragePOI, dstCopy, caps));
GrColor overrideColor = GrColor_ILLEGAL;
if (colorPOI.firstEffectiveStageIndex() != 0) {
diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h
index 4b979f0310..a85ae67135 100644
--- a/src/gpu/GrPipeline.h
+++ b/src/gpu/GrPipeline.h
@@ -34,7 +34,7 @@ public:
const GrProcOptInfo& coveragePOI,
const GrCaps&,
const GrScissorState&,
- const GrXferProcessor::DstTexture*);
+ const GrDeviceCoordTexture* dstCopy);
/*
* Returns true if these pipelines are equivalent.
diff --git a/src/gpu/GrPipelineBuilder.cpp b/src/gpu/GrPipelineBuilder.cpp
index f34476e102..3e9f330d07 100644
--- a/src/gpu/GrPipelineBuilder.cpp
+++ b/src/gpu/GrPipelineBuilder.cpp
@@ -86,10 +86,10 @@ void GrPipelineBuilder::setFromPaint(const GrPaint& paint, GrRenderTarget* rt, c
//////////////////////////////////////////////////////////////////////////////s
-bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps,
- const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI) const {
- return this->getXPFactory()->willNeedDstTexture(caps, colorPOI, coveragePOI);
+bool GrPipelineBuilder::willXPNeedDstCopy(const GrCaps& caps,
+ const GrProcOptInfo& colorPOI,
+ const GrProcOptInfo& coveragePOI) const {
+ return this->getXPFactory()->willNeedDstCopy(caps, colorPOI, coveragePOI);
}
void GrPipelineBuilder::AutoRestoreFragmentProcessors::set(GrPipelineBuilder* pipelineBuilder) {
diff --git a/src/gpu/GrPipelineBuilder.h b/src/gpu/GrPipelineBuilder.h
index 09b4f91e73..447a981f3a 100644
--- a/src/gpu/GrPipelineBuilder.h
+++ b/src/gpu/GrPipelineBuilder.h
@@ -177,10 +177,10 @@ public:
}
/**
- * Checks whether the xp will need destination in a texture to correctly blend.
+ * Checks whether the xp will need a copy of the destination to correctly blend.
*/
- bool willXPNeedDstTexture(const GrCaps& caps, const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI) const;
+ bool willXPNeedDstCopy(const GrCaps& caps, const GrProcOptInfo& colorPOI,
+ const GrProcOptInfo& coveragePOI) const;
/// @}
diff --git a/src/gpu/GrXferProcessor.cpp b/src/gpu/GrXferProcessor.cpp
index e771f643c7..343a05eaae 100644
--- a/src/gpu/GrXferProcessor.cpp
+++ b/src/gpu/GrXferProcessor.cpp
@@ -9,17 +9,17 @@
#include "gl/GrGLCaps.h"
GrXferProcessor::GrXferProcessor()
- : fWillReadDstColor(false), fReadsCoverage(true), fDstTextureOffset() {
+ : fWillReadDstColor(false), fReadsCoverage(true), fDstCopyTextureOffset() {
}
-GrXferProcessor::GrXferProcessor(const DstTexture* dstTexture, bool willReadDstColor)
+GrXferProcessor::GrXferProcessor(const GrDeviceCoordTexture* dstCopy, bool willReadDstColor)
: fWillReadDstColor(willReadDstColor)
, fReadsCoverage(true)
- , fDstTextureOffset() {
- if (dstTexture && dstTexture->texture()) {
- fDstTexture.reset(dstTexture->texture());
- fDstTextureOffset = dstTexture->offset();
- this->addTextureAccess(&fDstTexture);
+ , fDstCopyTextureOffset() {
+ if (dstCopy && dstCopy->texture()) {
+ fDstCopy.reset(dstCopy->texture());
+ fDstCopyTextureOffset = dstCopy->offset();
+ this->addTextureAccess(&fDstCopy);
this->setWillReadFragmentPosition();
}
}
@@ -43,8 +43,8 @@ GrXferProcessor::OptFlags GrXferProcessor::getOptimizations(const GrProcOptInfo&
void GrXferProcessor::getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const {
uint32_t key = this->willReadDstColor() ? 0x1 : 0x0;
- if (this->getDstTexture() &&
- kTopLeft_GrSurfaceOrigin == this->getDstTexture()->origin()) {
+ if (this->getDstCopyTexture() &&
+ kTopLeft_GrSurfaceOrigin == this->getDstCopyTexture()->origin()) {
key |= 0x2;
}
b->add32(key);
@@ -54,7 +54,7 @@ void GrXferProcessor::getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBu
bool GrXferProcessor::willNeedXferBarrier(const GrRenderTarget* rt,
const GrCaps& caps,
GrXferBarrierType* outBarrierType) const {
- if (static_cast<const GrSurface*>(rt) == this->getDstTexture()) {
+ if (static_cast<const GrSurface*>(rt) == this->getDstCopyTexture()) {
// Texture barriers are required when a shader reads and renders to the same texture.
SkASSERT(rt);
SkASSERT(caps.textureBarrierSupport());
@@ -162,24 +162,25 @@ SkString GrXferProcessor::BlendInfo::dump() const {
GrXferProcessor* GrXPFactory::createXferProcessor(const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
- const DstTexture* dstTexture,
+ const GrDeviceCoordTexture* dstCopy,
const GrCaps& caps) const {
#ifdef SK_DEBUG
if (this->willReadDstColor(caps, colorPOI, coveragePOI)) {
if (!caps.shaderCaps()->dstReadInShaderSupport()) {
- SkASSERT(dstTexture && dstTexture->texture());
+ SkASSERT(dstCopy && dstCopy->texture());
} else {
- SkASSERT(!dstTexture || !dstTexture->texture());
+ SkASSERT(!dstCopy || !dstCopy->texture());
}
} else {
- SkASSERT(!dstTexture || !dstTexture->texture());
+ SkASSERT(!dstCopy || !dstCopy->texture());
}
#endif
- return this->onCreateXferProcessor(caps, colorPOI, coveragePOI, dstTexture);
+ return this->onCreateXferProcessor(caps, colorPOI, coveragePOI, dstCopy);
}
-bool GrXPFactory::willNeedDstTexture(const GrCaps& caps, const GrProcOptInfo& colorPOI,
- const GrProcOptInfo& coveragePOI) const {
+bool GrXPFactory::willNeedDstCopy(const GrCaps& caps, const GrProcOptInfo& colorPOI,
+ const GrProcOptInfo& coveragePOI) const {
return (this->willReadDstColor(caps, colorPOI, coveragePOI)
&& !caps.shaderCaps()->dstReadInShaderSupport());
}
+
diff --git a/src/gpu/effects/GrCoverageSetOpXP.cpp b/src/gpu/effects/GrCoverageSetOpXP.cpp
index cb6d303d73..cb7f4974be 100644
--- a/src/gpu/effects/GrCoverageSetOpXP.cpp
+++ b/src/gpu/effects/GrCoverageSetOpXP.cpp
@@ -226,8 +226,7 @@ GrXferProcessor*
GrCoverageSetOpXPFactory::onCreateXferProcessor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& covPOI,
- const DstTexture* dst) const {
- SkASSERT(!dst);
+ const GrDeviceCoordTexture* dstCopy) const {
return CoverageSetOpXP::Create(fRegionOp, fInvertCoverage);
}
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp
index be2b343d45..e716ea5dce 100644
--- a/src/gpu/effects/GrCustomXfermode.cpp
+++ b/src/gpu/effects/GrCustomXfermode.cpp
@@ -508,12 +508,12 @@ GrFragmentProcessor* GrCustomXferFP::TestCreate(SkRandom* rand,
class CustomXP : public GrXferProcessor {
public:
- static GrXferProcessor* Create(SkXfermode::Mode mode, const DstTexture* dstTexture,
+ static GrXferProcessor* Create(SkXfermode::Mode mode, const GrDeviceCoordTexture* dstCopy,
bool willReadDstColor) {
if (!GrCustomXfermode::IsSupportedMode(mode)) {
return NULL;
} else {
- return SkNEW_ARGS(CustomXP, (mode, dstTexture, willReadDstColor));
+ return SkNEW_ARGS(CustomXP, (mode, dstCopy, willReadDstColor));
}
}
@@ -534,7 +534,7 @@ public:
}
private:
- CustomXP(SkXfermode::Mode mode, const DstTexture*, bool willReadDstColor);
+ CustomXP(SkXfermode::Mode mode, const GrDeviceCoordTexture* dstCopy, bool willReadDstColor);
GrXferProcessor::OptFlags onGetOptimizations(const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
@@ -626,8 +626,9 @@ private:
///////////////////////////////////////////////////////////////////////////////
-CustomXP::CustomXP(SkXfermode::Mode mode, const DstTexture* dstTexture, bool willReadDstColor)
- : INHERITED(dstTexture, willReadDstColor),
+CustomXP::CustomXP(SkXfermode::Mode mode, const GrDeviceCoordTexture* dstCopy,
+ bool willReadDstColor)
+ : INHERITED(dstCopy, willReadDstColor),
fMode(mode),
fHWBlendEquation(static_cast<GrBlendEquation>(-1)) {
this->initClassID<CustomXP>();
@@ -789,8 +790,8 @@ GrXferProcessor*
GrCustomXPFactory::onCreateXferProcessor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
- const DstTexture* dstTexture) const {
- return CustomXP::Create(fMode, dstTexture, this->willReadDstColor(caps, colorPOI, coveragePOI));
+ const GrDeviceCoordTexture* dstCopy) const {
+ return CustomXP::Create(fMode, dstCopy, this->willReadDstColor(caps, colorPOI, coveragePOI));
}
bool GrCustomXPFactory::willReadDstColor(const GrCaps& caps,
diff --git a/src/gpu/effects/GrCustomXfermodePriv.h b/src/gpu/effects/GrCustomXfermodePriv.h
index f7fccca730..ff4b64c90c 100644
--- a/src/gpu/effects/GrCustomXfermodePriv.h
+++ b/src/gpu/effects/GrCustomXfermodePriv.h
@@ -71,7 +71,7 @@ private:
GrXferProcessor* onCreateXferProcessor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
- const DstTexture*) const override;
+ const GrDeviceCoordTexture* dstCopy) const override;
bool willReadDstColor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
diff --git a/src/gpu/effects/GrDisableColorXP.cpp b/src/gpu/effects/GrDisableColorXP.cpp
index d380e89f1c..38c8f91c27 100644
--- a/src/gpu/effects/GrDisableColorXP.cpp
+++ b/src/gpu/effects/GrDisableColorXP.cpp
@@ -103,8 +103,7 @@ GrXferProcessor*
GrDisableColorXPFactory::onCreateXferProcessor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& covPOI,
- const DstTexture* dst) const {
- SkASSERT(!dst);
+ const GrDeviceCoordTexture* dstCopy) const {
return DisableColorXP::Create();
}
diff --git a/src/gpu/effects/GrDisableColorXP.h b/src/gpu/effects/GrDisableColorXP.h
index 6289834b5e..c5ed8f0b8c 100644
--- a/src/gpu/effects/GrDisableColorXP.h
+++ b/src/gpu/effects/GrDisableColorXP.h
@@ -35,7 +35,7 @@ private:
GrXferProcessor* onCreateXferProcessor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
- const DstTexture* dstTexture) const override;
+ const GrDeviceCoordTexture* dstCopy) const override;
bool willReadDstColor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
index 3bcaf26403..bc61f499e4 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
@@ -307,9 +307,9 @@ static BlendFormula get_unoptimized_blend_formula(SkXfermode::Mode xfermode) {
class PorterDuffXferProcessor : public GrXferProcessor {
public:
- static GrXferProcessor* Create(SkXfermode::Mode xfermode, const DstTexture* dstTexture,
+ static GrXferProcessor* Create(SkXfermode::Mode xfermode, const GrDeviceCoordTexture* dstCopy,
bool willReadDstColor) {
- return SkNEW_ARGS(PorterDuffXferProcessor, (xfermode, dstTexture, willReadDstColor));
+ return SkNEW_ARGS(PorterDuffXferProcessor, (xfermode, dstCopy, willReadDstColor));
}
~PorterDuffXferProcessor() override;
@@ -326,7 +326,8 @@ public:
BlendFormula getBlendFormula() const { return fBlendFormula; }
private:
- PorterDuffXferProcessor(SkXfermode::Mode, const DstTexture*, bool willReadDstColor);
+ PorterDuffXferProcessor(SkXfermode::Mode, const GrDeviceCoordTexture* dstCopy,
+ bool willReadDstColor);
GrXferProcessor::OptFlags onGetOptimizations(const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
@@ -505,9 +506,9 @@ private:
///////////////////////////////////////////////////////////////////////////////
PorterDuffXferProcessor::PorterDuffXferProcessor(SkXfermode::Mode xfermode,
- const DstTexture* dstTexture,
+ const GrDeviceCoordTexture* dstCopy,
bool willReadDstColor)
- : INHERITED(dstTexture, willReadDstColor)
+ : INHERITED(dstCopy, willReadDstColor)
, fXfermode(xfermode)
, fBlendFormula(get_unoptimized_blend_formula(xfermode)) {
this->initClassID<PorterDuffXferProcessor>();
@@ -722,11 +723,11 @@ GrXferProcessor*
GrPorterDuffXPFactory::onCreateXferProcessor(const GrCaps& caps,
const GrProcOptInfo& colorPOI,
const GrProcOptInfo& covPOI,
- const DstTexture* dstTexture) const {
+ const GrDeviceCoordTexture* dstCopy) const {
if (covPOI.isFourChannelOutput()) {
return PDLCDXferProcessor::Create(fXfermode, colorPOI);
} else {
- return PorterDuffXferProcessor::Create(fXfermode, dstTexture,
+ return PorterDuffXferProcessor::Create(fXfermode, dstCopy,
this->willReadDstColor(caps, colorPOI, covPOI));
}
}
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index da242aa563..8ae581c21e 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -36,7 +36,7 @@ GrGLProgram::GrGLProgram(GrGLGpu* gpu,
GrGLInstalledFragProcs* fragmentProcessors)
: fColor(GrColor_ILLEGAL)
, fCoverage(0)
- , fDstTextureUnit(-1)
+ , fDstCopyTexUnit(-1)
, fBuiltinUniformHandles(builtinUniforms)
, fProgramID(programID)
, fGeometryProcessor(geometryProcessor)
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index defbd61965..3c97e0f84d 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -138,7 +138,7 @@ protected:
RenderTargetState fRenderTargetState;
GrColor fColor;
uint8_t fCoverage;
- int fDstTextureUnit;
+ int fDstCopyTexUnit;
BuiltinUniformHandles fBuiltinUniformHandles;
GrGLuint fProgramID;
diff --git a/src/gpu/gl/GrGLProgramDesc.h b/src/gpu/gl/GrGLProgramDesc.h
index 1d53e62692..a10b0e8875 100644
--- a/src/gpu/gl/GrGLProgramDesc.h
+++ b/src/gpu/gl/GrGLProgramDesc.h
@@ -54,6 +54,8 @@ public:
* this optstate.
* @param GrGLGpu A GL Gpu, the caps and Gpu object are used to output processor specific
* parts of the descriptor.
+ * @param GrDeviceCoordTexture A dstCopy texture, which may be null if frame buffer fetch is
+ * supported
* @param GrProgramDesc The built and finalized descriptor
**/
static bool Build(GrProgramDesc*,
diff --git a/src/gpu/gl/GrGLXferProcessor.cpp b/src/gpu/gl/GrGLXferProcessor.cpp
index b707a3f632..657da41274 100644
--- a/src/gpu/gl/GrGLXferProcessor.cpp
+++ b/src/gpu/gl/GrGLXferProcessor.cpp
@@ -12,8 +12,8 @@
#include "gl/builders/GrGLProgramBuilder.h"
void GrGLXferProcessor::emitCode(const EmitArgs& args) {
- if (args.fXP.getDstTexture()) {
- bool topDown = kTopLeft_GrSurfaceOrigin == args.fXP.getDstTexture()->origin();
+ if (args.fXP.getDstCopyTexture()) {
+ bool topDown = kTopLeft_GrSurfaceOrigin == args.fXP.getDstCopyTexture()->origin();
GrGLXPFragmentBuilder* fsBuilder = args.fPB->getFragmentShaderBuilder();
@@ -27,24 +27,24 @@ void GrGLXferProcessor::emitCode(const EmitArgs& args) {
const char* dstColor = fsBuilder->dstColor();
- const char* dstTopLeftName;
- const char* dstCoordScaleName;
+ const char* dstCopyTopLeftName;
+ const char* dstCopyCoordScaleName;
- fDstTopLeftUni = args.fPB->addUniform(GrGLProgramBuilder::kFragment_Visibility,
- kVec2f_GrSLType,
- kDefault_GrSLPrecision,
- "DstTextureUpperLeft",
- &dstTopLeftName);
- fDstScaleUni = args.fPB->addUniform(GrGLProgramBuilder::kFragment_Visibility,
- kVec2f_GrSLType,
- kDefault_GrSLPrecision,
- "DstTextureCoordScale",
- &dstCoordScaleName);
+ fDstCopyTopLeftUni = args.fPB->addUniform(GrGLProgramBuilder::kFragment_Visibility,
+ kVec2f_GrSLType,
+ kDefault_GrSLPrecision,
+ "DstCopyUpperLeft",
+ &dstCopyTopLeftName);
+ fDstCopyScaleUni = args.fPB->addUniform(GrGLProgramBuilder::kFragment_Visibility,
+ kVec2f_GrSLType,
+ kDefault_GrSLPrecision,
+ "DstCopyCoordScale",
+ &dstCopyCoordScaleName);
const char* fragPos = fsBuilder->fragmentPosition();
fsBuilder->codeAppend("// Read color from copy of the destination.\n");
fsBuilder->codeAppendf("vec2 _dstTexCoord = (%s.xy - %s) * %s;",
- fragPos, dstTopLeftName, dstCoordScaleName);
+ fragPos, dstCopyTopLeftName, dstCopyCoordScaleName);
if (!topDown) {
fsBuilder->codeAppend("_dstTexCoord.y = 1.0 - _dstTexCoord.y;");
@@ -59,18 +59,18 @@ void GrGLXferProcessor::emitCode(const EmitArgs& args) {
}
void GrGLXferProcessor::setData(const GrGLProgramDataManager& pdm, const GrXferProcessor& xp) {
- if (xp.getDstTexture()) {
- if (fDstTopLeftUni.isValid()) {
- pdm.set2f(fDstTopLeftUni, static_cast<GrGLfloat>(xp.dstTextureOffset().fX),
- static_cast<GrGLfloat>(xp.dstTextureOffset().fY));
- pdm.set2f(fDstScaleUni, 1.f / xp.getDstTexture()->width(),
- 1.f / xp.getDstTexture()->height());
+ if (xp.getDstCopyTexture()) {
+ if (fDstCopyTopLeftUni.isValid()) {
+ pdm.set2f(fDstCopyTopLeftUni, static_cast<GrGLfloat>(xp.dstCopyTextureOffset().fX),
+ static_cast<GrGLfloat>(xp.dstCopyTextureOffset().fY));
+ pdm.set2f(fDstCopyScaleUni, 1.f / xp.getDstCopyTexture()->width(),
+ 1.f / xp.getDstCopyTexture()->height());
} else {
- SkASSERT(!fDstScaleUni.isValid());
+ SkASSERT(!fDstCopyScaleUni.isValid());
}
} else {
- SkASSERT(!fDstTopLeftUni.isValid());
- SkASSERT(!fDstScaleUni.isValid());
+ SkASSERT(!fDstCopyTopLeftUni.isValid());
+ SkASSERT(!fDstCopyScaleUni.isValid());
}
this->onSetData(pdm, xp);
}
diff --git a/src/gpu/gl/GrGLXferProcessor.h b/src/gpu/gl/GrGLXferProcessor.h
index 6b05dcb37d..7f60f32fe5 100644
--- a/src/gpu/gl/GrGLXferProcessor.h
+++ b/src/gpu/gl/GrGLXferProcessor.h
@@ -63,8 +63,8 @@ private:
virtual void onSetData(const GrGLProgramDataManager&, const GrXferProcessor&) = 0;
- GrGLProgramDataManager::UniformHandle fDstTopLeftUni;
- GrGLProgramDataManager::UniformHandle fDstScaleUni;
+ GrGLProgramDataManager::UniformHandle fDstCopyTopLeftUni;
+ GrGLProgramDataManager::UniformHandle fDstCopyScaleUni;
typedef GrGLProcessor INHERITED;
};
diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
index ee137c483a..044752f7a5 100644
--- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.cpp
@@ -12,7 +12,7 @@
#define GL_CALL(X) GR_GL_CALL(fProgramBuilder->gpu()->glInterface(), X)
#define GL_CALL_RET(R, X) GR_GL_CALL_RET(fProgramBuilder->gpu()->glInterface(), R, X)
-const char* GrGLFragmentShaderBuilder::kDstTextureColorName = "_dstColor";
+const char* GrGLFragmentShaderBuilder::kDstCopyColorName = "_dstColor";
static const char* declared_color_output_name() { return "fsColorOut"; }
static const char* dual_source_output_name() { return "dualSourceOut"; }
static void append_default_precision_qualifier(GrSLPrecision p,
@@ -78,17 +78,17 @@ static const char* specific_layout_qualifier_name(GrBlendEquation equation) {
}
GrGLFragmentShaderBuilder::DstReadKey
-GrGLFragmentShaderBuilder::KeyForDstRead(const GrTexture* dstTexture, const GrGLCaps& caps) {
+GrGLFragmentShaderBuilder::KeyForDstRead(const GrTexture* dstCopy, const GrGLCaps& caps) {
uint32_t key = kYesDstRead_DstReadKeyBit;
if (caps.glslCaps()->fbFetchSupport()) {
return key;
}
- SkASSERT(dstTexture);
- if (!caps.textureSwizzleSupport() && GrPixelConfigIsAlphaOnly(dstTexture->config())) {
+ SkASSERT(dstCopy);
+ if (!caps.textureSwizzleSupport() && GrPixelConfigIsAlphaOnly(dstCopy->config())) {
// The fact that the config is alpha-only must be considered when generating code.
key |= kUseAlphaConfig_DstReadKeyBit;
}
- if (kTopLeft_GrSurfaceOrigin == dstTexture->origin()) {
+ if (kTopLeft_GrSurfaceOrigin == dstCopy->origin()) {
key |= kTopLeftOrigin_DstReadKeyBit;
}
SkASSERT(static_cast<DstReadKey>(key) == key);
@@ -220,7 +220,7 @@ const char* GrGLFragmentShaderBuilder::dstColor() {
}
return fbFetchColorName;
} else {
- return kDstTextureColorName;
+ return kDstCopyColorName;
}
}
diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h
index 66e55827c0..1ab7af6b1b 100644
--- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h
+++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h
@@ -81,10 +81,10 @@ public:
typedef uint8_t DstReadKey;
typedef uint8_t FragPosKey;
- /** Returns a key for adding code to read the dst texture color in service of effects that
+ /** Returns a key for adding code to read the copy-of-dst color in service of effects that
require reading the dst. It must not return 0 because 0 indicates that there is no dst
- texture at all (in which case this function should not be called). */
- static DstReadKey KeyForDstRead(const GrTexture* dsttexture, const GrGLCaps&);
+ copy read at all (in which case this function should not be called). */
+ static DstReadKey KeyForDstRead(const GrTexture* dstCopy, const GrGLCaps&);
/** Returns a key for reading the fragment location. This should only be called if there is an
effect that will requires the fragment position. If the fragment position is not required,
@@ -149,7 +149,7 @@ private:
kBottomLeftFragPosRead_FragPosKey = 0x2,// Read frag pos relative to bottom-left.
};
- static const char* kDstTextureColorName;
+ static const char* kDstCopyColorName;
bool fHasCustomColorOutput;
bool fHasSecondaryOutput;
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp
index 78c2e798f0..b01277c854 100644
--- a/tests/GrPorterDuffTest.cpp
+++ b/tests/GrPorterDuffTest.cpp
@@ -76,7 +76,7 @@ public:
const GrProcOptInfo& colorPOI, const GrProcOptInfo& covPOI) {
SkAutoTUnref<GrXPFactory> xpf(GrPorterDuffXPFactory::Create(xfermode));
SkAutoTUnref<GrXferProcessor> xp(xpf->createXferProcessor(colorPOI, covPOI, 0, caps));
- TEST_ASSERT(!xpf->willNeedDstTexture(caps, colorPOI, covPOI));
+ TEST_ASSERT(!xpf->willNeedDstCopy(caps, colorPOI, covPOI));
xpf->getInvariantOutput(colorPOI, covPOI, &fInvariantOutput);
fOptFlags = xp->getOptimizations(colorPOI, covPOI, false, 0, caps);
GetXPOutputTypes(xp, &fPrimaryOutputType, &fSecondaryOutputType);
@@ -1311,7 +1311,7 @@ static void test_lcd_coverage(skiatest::Reporter* reporter, const GrCaps& caps)
SkASSERT(covPOI.isFourChannelOutput());
SkAutoTUnref<GrXPFactory> xpf(GrPorterDuffXPFactory::Create(SkXfermode::kSrcOver_Mode));
- TEST_ASSERT(!xpf->willNeedDstTexture(caps, colorPOI, covPOI));
+ TEST_ASSERT(!xpf->willNeedDstCopy(caps, colorPOI, covPOI));
GrXPFactory::InvariantOutput invariantOutput;
xpf->getInvariantOutput(colorPOI, covPOI, &invariantOutput);