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

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

Issue 808813002: Add Coverage Drawing XP (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more nits 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/GrProcessor.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 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrOptDrawState.h" 8 #include "GrOptDrawState.h"
9 9
10 #include "GrDrawState.h" 10 #include "GrDrawState.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 if (colorPOI.firstEffectiveStageIndex() != 0) { 48 if (colorPOI.firstEffectiveStageIndex() != 0) {
49 overrideColor = colorPOI.inputColorToEffectiveStage(); 49 overrideColor = colorPOI.inputColorToEffectiveStage();
50 } 50 }
51 51
52 GrXferProcessor::OptFlags optFlags; 52 GrXferProcessor::OptFlags optFlags;
53 if (xferProcessor) { 53 if (xferProcessor) {
54 fXferProcessor.reset(xferProcessor.get()); 54 fXferProcessor.reset(xferProcessor.get());
55 55
56 optFlags = xferProcessor->getOptimizations(colorPOI, 56 optFlags = xferProcessor->getOptimizations(colorPOI,
57 coveragePOI, 57 coveragePOI,
58 drawState.isCoverageDrawing() ,
59 drawState.isColorWriteDisable d(), 58 drawState.isColorWriteDisable d(),
60 drawState.getStencil().doesWr ite(), 59 drawState.getStencil().doesWr ite(),
61 &overrideColor, 60 &overrideColor,
62 caps); 61 caps);
63 } 62 }
64 63
65 // When path rendering the stencil settings are not always set on the draw s tate 64 // When path rendering the stencil settings are not always set on the draw s tate
66 // so we must check the draw type. In cases where we will skip drawing we si mply return a 65 // so we must check the draw type. In cases where we will skip drawing we si mply return a
67 // null GrOptDrawState. 66 // null GrOptDrawState.
68 if (!xferProcessor || ((GrXferProcessor::kSkipDraw_OptFlag & optFlags) && 67 if (!xferProcessor || ((GrXferProcessor::kSkipDraw_OptFlag & optFlags) &&
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { 206 if (this->getFragmentStage(i) != that.getFragmentStage(i)) {
208 return false; 207 return false;
209 } 208 }
210 } 209 }
211 210
212 // Now update the GrPrimitiveProcessor's batch tracker 211 // Now update the GrPrimitiveProcessor's batch tracker
213 fPrimitiveProcessor->makeEqual(&fBatchTracker, that.getBatchTracker()); 212 fPrimitiveProcessor->makeEqual(&fBatchTracker, that.getBatchTracker());
214 return true; 213 return true;
215 } 214 }
216 215
OLDNEW
« no previous file with comments | « src/gpu/GrDrawState.cpp ('k') | src/gpu/GrProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698