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

Side by Side Diff: src/gpu/GrPaint.cpp

Issue 776843004: Use static XPF for porter duff xp factories. (Closed) Base URL: https://skia.googlesource.com/skia.git@xferFactorySolo
Patch Set: Block case statements 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | src/gpu/SkGr.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 *color = tempColor; 45 *color = tempColor;
46 return true; 46 return true;
47 } 47 }
48 } 48 }
49 return false; 49 return false;
50 } 50 }
51 51
52 void GrPaint::resetStages() { 52 void GrPaint::resetStages() {
53 fColorStages.reset(); 53 fColorStages.reset();
54 fCoverageStages.reset(); 54 fCoverageStages.reset();
55 fXPFactory.reset(GrPorterDuffXPFactory::Create(kOne_GrBlendCoeff, 55 fXPFactory.reset(GrPorterDuffXPFactory::Create(SkXfermode::kSrcOver_Mode));
56 kZero_GrBlendCoeff));
57 } 56 }
58 57
59 bool GrPaint::getOpaqueAndKnownColor(GrColor* solidColor, 58 bool GrPaint::getOpaqueAndKnownColor(GrColor* solidColor,
60 uint32_t* solidColorKnownComponents) const { 59 uint32_t* solidColorKnownComponents) const {
61 60
62 // TODO: Share this implementation with GrDrawState 61 // TODO: Share this implementation with GrDrawState
63 62
64 GrProcOptInfo coverageProcInfo; 63 GrProcOptInfo coverageProcInfo;
65 coverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), this->numCov erageStages(), 64 coverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), this->numCov erageStages(),
66 0xFFFFFFFF, kRGBA_GrColorComponentFla gs, true); 65 0xFFFFFFFF, kRGBA_GrColorComponentFla gs, true);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 *solidColorKnownComponents = 0; 115 *solidColorKnownComponents = 0;
117 break; 116 break;
118 } 117 }
119 } else { 118 } else {
120 solidColorKnownComponents = 0; 119 solidColorKnownComponents = 0;
121 } 120 }
122 } 121 }
123 return opaque; 122 return opaque;
124 } 123 }
125 124
OLDNEW
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698