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

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: rebase 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
« no previous file with comments | « src/gpu/GrInOrderCommandBuilder.cpp ('k') | src/gpu/GrPipelineBuilder.h » ('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 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;
48 coverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), this->numCov erageStages(),
49 0xFFFFFFFF, kRGBA_GrColorComponentFla gs, true);
50 GrProcOptInfo colorProcInfo; 47 GrProcOptInfo colorProcInfo;
51 colorProcInfo.calcWithInitialValues(fColorStages.begin(), this->numColorStag es(), fColor, 48 colorProcInfo.calcWithInitialValues(fColorStages.begin(), this->numColorStag es(), fColor,
52 kRGBA_GrColorComponentFlags, false); 49 kRGBA_GrColorComponentFlags, false);
53 50
54 GrXPFactory::InvariantOutput output; 51 GrXPFactory::InvariantBlendedColor blendedColor;
55 fXPFactory->getInvariantOutput(colorProcInfo, coverageProcInfo, &output); 52 fXPFactory->getInvariantBlendedColor(colorProcInfo, &blendedColor);
56 53
57 if (kRGBA_GrColorComponentFlags == output.fBlendedColorFlags && 54 if (kRGBA_GrColorComponentFlags == blendedColor.fKnownColorFlags) {
58 0xFF == GrColorUnpackA(output.fBlendedColor)) { 55 *color = blendedColor.fKnownColor;
59 *color = output.fBlendedColor;
60 return true; 56 return true;
61 } 57 }
62 return false; 58 return false;
63 } 59 }
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderCommandBuilder.cpp ('k') | src/gpu/GrPipelineBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698