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

Unified Diff: src/gpu/GrPaint.cpp

Issue 751283002: Add XferProcessor factory in GrPaint and GrDrawState. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comiple bug Created 6 years 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/GrOptDrawState.cpp ('k') | src/gpu/GrProcOptInfo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPaint.cpp
diff --git a/src/gpu/GrPaint.cpp b/src/gpu/GrPaint.cpp
index 7d89535a11c7be1d1b2ace710c0b650af2f9a555..bd5b2860f474e158e200827a9182a27a54632312 100644
--- a/src/gpu/GrPaint.cpp
+++ b/src/gpu/GrPaint.cpp
@@ -10,6 +10,7 @@
#include "GrBlend.h"
#include "GrProcOptInfo.h"
+#include "effects/GrPorterDuffXferProcessor.h"
#include "effects/GrSimpleTextureEffect.h"
void GrPaint::addColorTextureProcessor(GrTexture* texture, const SkMatrix& matrix) {
@@ -48,6 +49,13 @@ bool GrPaint::isOpaqueAndConstantColor(GrColor* color) const {
return false;
}
+void GrPaint::resetStages() {
+ fColorStages.reset();
+ fCoverageStages.reset();
+ fXPFactory.reset(GrPorterDuffXPFactory::Create(kOne_GrBlendCoeff,
+ kZero_GrBlendCoeff));
+}
+
bool GrPaint::getOpaqueAndKnownColor(GrColor* solidColor,
uint32_t* solidColorKnownComponents) const {
@@ -114,3 +122,4 @@ bool GrPaint::getOpaqueAndKnownColor(GrColor* solidColor,
}
return opaque;
}
+
« no previous file with comments | « src/gpu/GrOptDrawState.cpp ('k') | src/gpu/GrProcOptInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698