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

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

Issue 1161273005: Update XPF invariant info to not account for conflation (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_reenablebea
Patch Set: Created 5 years, 6 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 unified diff | Download patch
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 25 matching lines...) Expand all
36 const GrTextureParams& params) { 36 const GrTextureParams& params) {
37 this->addColorProcessor(GrSimpleTextureEffect::Create(texture, matrix, param s))->unref(); 37 this->addColorProcessor(GrSimpleTextureEffect::Create(texture, matrix, param s))->unref();
38 } 38 }
39 39
40 void GrPaint::addCoverageTextureProcessor(GrTexture* texture, 40 void GrPaint::addCoverageTextureProcessor(GrTexture* texture,
41 const SkMatrix& matrix, 41 const SkMatrix& matrix,
42 const GrTextureParams& params) { 42 const GrTextureParams& params) {
43 this->addCoverageProcessor(GrSimpleTextureEffect::Create(texture, matrix, pa rams))->unref(); 43 this->addCoverageProcessor(GrSimpleTextureEffect::Create(texture, matrix, pa rams))->unref();
44 } 44 }
45 45
46 bool GrPaint::isOpaqueAndConstantColor(GrColor* color) const { 46 bool GrPaint::isConstantBlendedColor(GrColor* color) const {
47 GrProcOptInfo coverageProcInfo; 47 GrProcOptInfo coverageProcInfo;
48 coverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), this->numCov erageStages(), 48 coverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), this->numCov erageStages(),
49 0xFFFFFFFF, kRGBA_GrColorComponentFla gs, true); 49 0xFFFFFFFF, kRGBA_GrColorComponentFla gs, true);
50 GrProcOptInfo colorProcInfo; 50 GrProcOptInfo colorProcInfo;
51 colorProcInfo.calcWithInitialValues(fColorStages.begin(), this->numColorStag es(), fColor, 51 colorProcInfo.calcWithInitialValues(fColorStages.begin(), this->numColorStag es(), fColor,
52 kRGBA_GrColorComponentFlags, false); 52 kRGBA_GrColorComponentFlags, false);
53 53
54 GrXPFactory::InvariantOutput output; 54 GrXPFactory::InvariantBlendedColor blendedColor;
55 fXPFactory->getInvariantOutput(colorProcInfo, coverageProcInfo, &output); 55 fXPFactory->getInvariantBlendedColor(colorProcInfo, coverageProcInfo, &blend edColor);
56 56
57 if (kRGBA_GrColorComponentFlags == output.fBlendedColorFlags && 57 if (kRGBA_GrColorComponentFlags == blendedColor.fKnownColorFlags) {
58 0xFF == GrColorUnpackA(output.fBlendedColor)) { 58 *color = blendedColor.fKnownColor;
59 *color = output.fBlendedColor;
60 return true; 59 return true;
61 } 60 }
62 return false; 61 return false;
63 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698