Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2874)

Unified Diff: src/gpu/GrXferProcessor.cpp

Issue 1158453004: Revert of Move DstCoordTexture to GrXP, rename and remove the word "copy" from dstcopytexture names. (Closed) Base URL: https://skia.googlesource.com/skia.git@copy
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/effects/GrCoverageSetOpXP.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrXferProcessor.cpp
diff --git a/src/gpu/GrXferProcessor.cpp b/src/gpu/GrXferProcessor.cpp
index e771f643c7fbfaa46f8348cd2846e6b1e1e29a9a..343a05eaae36a17433b70bd8967362cd4d12c6cc 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 @@
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 @@
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 @@
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());
}
+
« no previous file with comments | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/effects/GrCoverageSetOpXP.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698