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

Unified Diff: src/gpu/GrPaint.cpp

Issue 1471053002: Don't create a GXPFactory when blend is SrcOver (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix compile Created 5 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.cpp ('k') | src/gpu/GrPipeline.cpp » ('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 6f218a4b0b96dfb2b0ae41c201795808b4acd770..1ec8e502be2a308c513b0afb7ebc025a1d660cdd 100644
--- a/src/gpu/GrPaint.cpp
+++ b/src/gpu/GrPaint.cpp
@@ -50,7 +50,14 @@ bool GrPaint::isConstantBlendedColor(GrColor* color) const {
kRGBA_GrColorComponentFlags, false);
GrXPFactory::InvariantBlendedColor blendedColor;
- fXPFactory->getInvariantBlendedColor(colorProcInfo, &blendedColor);
+ if (fXPFactory) {
+ fXPFactory->getInvariantBlendedColor(colorProcInfo, &blendedColor);
+ } else {
+ GrPorterDuffXPFactory::SrcOverInvariantBlendedColor(colorProcInfo.color(),
+ colorProcInfo.validFlags(),
+ colorProcInfo.isOpaque(),
+ &blendedColor);
+ }
if (kRGBA_GrColorComponentFlags == blendedColor.fKnownColorFlags) {
*color = blendedColor.fKnownColor;
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrPipeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698