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

Side by Side Diff: gm/constcolorprocessor.cpp

Issue 2041283002: Replace targetHasUnifiedMultisampling in GrPB constructor (Closed) Base URL: https://skia.googlesource.com/skia.git@fixdash
Patch Set: rebase Created 4 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 | « no previous file | include/gpu/GrDrawContext.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 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 // This test only works with the GPU backend. 8 // This test only works with the GPU backend.
9 9
10 #include "gm.h" 10 #include "gm.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } else { 100 } else {
101 skPaint.setColor(kPaintColors[paintType]); 101 skPaint.setColor(kPaintColors[paintType]);
102 } 102 }
103 // SRGBTODO: No sRGB inputs allowed here? 103 // SRGBTODO: No sRGB inputs allowed here?
104 SkAssertResult(SkPaintToGrPaint(context, skPaint, viewMatrix , false, &grPaint)); 104 SkAssertResult(SkPaintToGrPaint(context, skPaint, viewMatrix , false, &grPaint));
105 105
106 GrConstColorProcessor::InputMode mode = (GrConstColorProcess or::InputMode) m; 106 GrConstColorProcessor::InputMode mode = (GrConstColorProcess or::InputMode) m;
107 GrColor color = kColors[procColor]; 107 GrColor color = kColors[procColor];
108 SkAutoTUnref<GrFragmentProcessor> fp(GrConstColorProcessor:: Create(color, mode)); 108 SkAutoTUnref<GrFragmentProcessor> fp(GrConstColorProcessor:: Create(color, mode));
109 109
110 GrPipelineBuilder pipelineBuilder(grPaint, 110 GrPipelineBuilder pipelineBuilder(grPaint, drawContext->must UseHWAA(grPaint));
111 drawContext->isUnifiedMult isampled());
112 pipelineBuilder.addColorFragmentProcessor(fp); 111 pipelineBuilder.addColorFragmentProcessor(fp);
113 112
114 SkAutoTUnref<GrDrawBatch> batch( 113 SkAutoTUnref<GrDrawBatch> batch(
115 GrRectBatchFactory::CreateNonAAFill(grPaint.getColor (), viewMatrix, 114 GrRectBatchFactory::CreateNonAAFill(grPaint.getColor (), viewMatrix,
116 renderRect, null ptr, nullptr)); 115 renderRect, null ptr, nullptr));
117 drawContext->drawContextPriv().testingOnly_drawBatch(pipelin eBuilder, batch); 116 drawContext->drawContextPriv().testingOnly_drawBatch(pipelin eBuilder, batch);
118 117
119 // Draw labels for the input to the processor and the proces sor to the right of 118 // Draw labels for the input to the processor and the proces sor to the right of
120 // the test rect. The input label appears above the processo r label. 119 // the test rect. The input label appears above the processo r label.
121 SkPaint labelPaint; 120 SkPaint labelPaint;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 typedef GM INHERITED; 184 typedef GM INHERITED;
186 }; 185 };
187 186
188 const SkScalar ConstColorProcessor::kPad = 10.f; 187 const SkScalar ConstColorProcessor::kPad = 10.f;
189 const SkScalar ConstColorProcessor::kRectSize = 20.f; 188 const SkScalar ConstColorProcessor::kRectSize = 20.f;
190 189
191 DEF_GM(return new ConstColorProcessor;) 190 DEF_GM(return new ConstColorProcessor;)
192 } 191 }
193 192
194 #endif 193 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrDrawContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698