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

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: remove whitespace at end of line 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
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"
egdaniel 2014/08/06 19:42:31 why are you adding an include when it doesn't seem
bsalomon 2014/08/08 15:00:12 Removed it from a header, it's used here.
#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,

Powered by Google App Engine
This is Rietveld 408576698