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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrPipeline.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrPaint.h" 9 #include "GrPaint.h"
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 matrix, par ams))->unref(); 43 matrix, par ams))->unref();
44 } 44 }
45 45
46 bool GrPaint::isConstantBlendedColor(GrColor* color) const { 46 bool GrPaint::isConstantBlendedColor(GrColor* color) const {
47 GrProcOptInfo colorProcInfo; 47 GrProcOptInfo colorProcInfo;
48 colorProcInfo.calcWithInitialValues(fColorFragmentProcessors.begin(), 48 colorProcInfo.calcWithInitialValues(fColorFragmentProcessors.begin(),
49 this->numColorFragmentProcessors(), fCol or, 49 this->numColorFragmentProcessors(), fCol or,
50 kRGBA_GrColorComponentFlags, false); 50 kRGBA_GrColorComponentFlags, false);
51 51
52 GrXPFactory::InvariantBlendedColor blendedColor; 52 GrXPFactory::InvariantBlendedColor blendedColor;
53 fXPFactory->getInvariantBlendedColor(colorProcInfo, &blendedColor); 53 if (fXPFactory) {
54 fXPFactory->getInvariantBlendedColor(colorProcInfo, &blendedColor);
55 } else {
56 GrPorterDuffXPFactory::SrcOverInvariantBlendedColor(colorProcInfo.color( ),
57 colorProcInfo.validF lags(),
58 colorProcInfo.isOpaq ue(),
59 &blendedColor);
60 }
54 61
55 if (kRGBA_GrColorComponentFlags == blendedColor.fKnownColorFlags) { 62 if (kRGBA_GrColorComponentFlags == blendedColor.fKnownColorFlags) {
56 *color = blendedColor.fKnownColor; 63 *color = blendedColor.fKnownColor;
57 return true; 64 return true;
58 } 65 }
59 return false; 66 return false;
60 } 67 }
OLDNEW
« 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