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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 735363003: dstCopy on optdrawstate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 1 month 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/GrDrawTarget.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 4043eb8dee544d26789c35e725dc40d8de5b17d9..2f395e666de203251b955954f5f638a74c6c890a 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -41,8 +41,6 @@ GrDrawTarget::DrawInfo& GrDrawTarget::DrawInfo::operator =(const DrawInfo& di) {
fDevBounds = NULL;
}
- fDstCopy = di.fDstCopy;
-
this->setVertexBuffer(di.vertexBuffer());
this->setIndexBuffer(di.indexBuffer());
@@ -468,14 +466,15 @@ void GrDrawTarget::drawIndexed(GrDrawState* ds,
if (devBounds) {
info.setDevBounds(*devBounds);
}
+
// TODO: We should continue with incorrect blending.
- if (!this->setupDstReadIfNecessary(ds, &info)) {
+ GrDeviceCoordTexture dstCopy;
+ if (!this->setupDstReadIfNecessary(ds, &dstCopy, devBounds)) {
return;
}
-
this->setDrawBuffers(&info);
- this->onDraw(*ds, info, scissorState);
+ this->onDraw(*ds, info, scissorState, dstCopy.texture() ? &dstCopy : NULL);
}
}
@@ -511,13 +510,14 @@ void GrDrawTarget::drawNonIndexed(GrDrawState* ds,
}
// TODO: We should continue with incorrect blending.
- if (!this->setupDstReadIfNecessary(ds, &info)) {
+ GrDeviceCoordTexture dstCopy;
+ if (!this->setupDstReadIfNecessary(ds, &dstCopy, devBounds)) {
return;
}
this->setDrawBuffers(&info);
- this->onDraw(*ds, info, scissorState);
+ this->onDraw(*ds, info, scissorState, dstCopy.texture() ? &dstCopy : NULL);
}
}
@@ -759,8 +759,10 @@ void GrDrawTarget::drawIndexedInstances(GrDrawState* ds,
if (devBounds) {
info.setDevBounds(*devBounds);
}
+
// TODO: We should continue with incorrect blending.
- if (!this->setupDstReadIfNecessary(ds, &info)) {
+ GrDeviceCoordTexture dstCopy;
+ if (!this->setupDstReadIfNecessary(ds, &dstCopy, devBounds)) {
return;
}
@@ -777,7 +779,7 @@ void GrDrawTarget::drawIndexedInstances(GrDrawState* ds,
info.fStartIndex,
info.fVertexCount,
info.fIndexCount)) {
- this->onDraw(*ds, info, scissorState);
+ this->onDraw(*ds, info, scissorState, dstCopy.texture() ? &dstCopy : NULL);
}
info.fStartVertex += info.fVertexCount;
instanceCount -= info.fInstanceCount;
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698