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

Unified Diff: src/gpu/GrXferProcessor.cpp

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 8 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/GrVertices.h ('k') | src/gpu/GrYUVProvider.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 a95445e287825db5934a55f27f7c4cf88da104ee..43f40c515809deba0fdcb002051d5db97e673698 100644
--- a/src/gpu/GrXferProcessor.cpp
+++ b/src/gpu/GrXferProcessor.cpp
@@ -10,7 +10,7 @@
#include "GrProcOptInfo.h"
#include "gl/GrGLCaps.h"
-GrXferProcessor::GrXferProcessor()
+GrXferProcessor::GrXferProcessor(GrRenderTarget* dst)
: fWillReadDstColor(false)
, fDstReadUsesMixedSamples(false)
, fReadsCoverage(true)
@@ -19,14 +19,15 @@ GrXferProcessor::GrXferProcessor()
GrXferProcessor::GrXferProcessor(const DstTexture* dstTexture,
bool willReadDstColor,
- bool hasMixedSamples)
+ bool hasMixedSamples,
+ GrRenderTarget* dst)
: fWillReadDstColor(willReadDstColor)
, fDstReadUsesMixedSamples(willReadDstColor && hasMixedSamples)
, fReadsCoverage(true)
, fDstTextureOffset() {
if (dstTexture && dstTexture->texture()) {
SkASSERT(willReadDstColor);
- fDstTexture.reset(dstTexture->texture());
+ fDstTexture.reset(dstTexture->texture(), GrTextureParams::kNone_FilterMode,SkShader::kClamp_TileMode, dst);
fDstTextureOffset = dstTexture->offset();
this->addTextureAccess(&fDstTexture);
this->setWillReadFragmentPosition();
@@ -204,9 +205,11 @@ GrXferProcessor* GrXPFactory::createXferProcessor(const GrProcOptInfo& colorPOI,
const GrProcOptInfo& coveragePOI,
bool hasMixedSamples,
const DstTexture* dstTexture,
- const GrCaps& caps) const {
+ const GrCaps& caps, GrRenderTarget* dst) const {
#ifdef SK_DEBUG
- if (this->willReadDstColor(caps, colorPOI, coveragePOI, hasMixedSamples)) {
+ bool willReadDstColor = this->willReadDstColor(caps, colorPOI, coveragePOI, hasMixedSamples);
+
+ if (willReadDstColor) {
if (!caps.shaderCaps()->dstReadInShaderSupport()) {
SkASSERT(dstTexture && dstTexture->texture());
} else {
@@ -217,7 +220,7 @@ GrXferProcessor* GrXPFactory::createXferProcessor(const GrProcOptInfo& colorPOI,
}
SkASSERT(!hasMixedSamples || caps.shaderCaps()->dualSourceBlendingSupport());
#endif
- return this->onCreateXferProcessor(caps, colorPOI, coveragePOI, hasMixedSamples, dstTexture);
+ return this->onCreateXferProcessor(caps, colorPOI, coveragePOI, hasMixedSamples, dstTexture, dst);
}
bool GrXPFactory::willNeedDstTexture(const GrCaps& caps,
« no previous file with comments | « src/gpu/GrVertices.h ('k') | src/gpu/GrYUVProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698