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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 446953002: Add an opaqueness hint to GrDrawState. (Closed) Base URL: https://skia.googlesource.com/skia.git@greg
Patch Set: Address comments Created 6 years, 4 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/GrDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('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 f8bb910cd85d4073f84e0b4b4aeb9527f858f876..2d27859c3ee5fd61aef50ac5e64300e2dc66ac09 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -13,6 +13,7 @@
#include "GrDrawTargetCaps.h"
#include "GrPath.h"
#include "GrRenderTarget.h"
+#include "GrTemplates.h"
#include "GrTexture.h"
#include "GrVertexBuffer.h"
@@ -613,21 +614,6 @@ void GrDrawTarget::removeGpuTraceMarker(const GrGpuTraceMarker* marker) {
////////////////////////////////////////////////////////////////////////////////
-bool GrDrawTarget::canApplyCoverage() const {
- // we can correctly apply coverage if a) we have dual source blending
- // or b) one of our blend optimizations applies
- // or c) the src, dst blend coeffs are 1,0 and we will read Dst Color
- GrBlendCoeff srcCoeff;
- GrBlendCoeff dstCoeff;
- GrDrawState::BlendOptFlags flag = this->getDrawState().getBlendOpts(true, &srcCoeff, &dstCoeff);
- return this->caps()->dualSourceBlendingSupport() ||
- GrDrawState::kNone_BlendOpt != flag ||
- (this->getDrawState().willEffectReadDstColor() &&
- kOne_GrBlendCoeff == srcCoeff && kZero_GrBlendCoeff == dstCoeff);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
void GrDrawTarget::drawIndexedInstances(GrPrimitiveType type,
int instanceCount,
int verticesPerInstance,
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698