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

Side by Side Diff: src/gpu/GrSWMaskHelper.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 | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/GrSoftwarePathRenderer.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 2012 Google Inc. 2 * Copyright 2012 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 "GrSWMaskHelper.h" 8 #include "GrSWMaskHelper.h"
9 9
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 SK_Scalar1 * rect.fRight, 178 SK_Scalar1 * rect.fRight,
179 SK_Scalar1 * rect.fBottom); 179 SK_Scalar1 * rect.fBottom);
180 180
181 // We use device coords to compute the texture coordinates. We take the devi ce coords and apply 181 // We use device coords to compute the texture coordinates. We take the devi ce coords and apply
182 // a translation so that the top-left of the device bounds maps to 0,0, and then a scaling 182 // a translation so that the top-left of the device bounds maps to 0,0, and then a scaling
183 // matrix to normalized coords. 183 // matrix to normalized coords.
184 SkMatrix maskMatrix; 184 SkMatrix maskMatrix;
185 maskMatrix.setIDiv(texture->width(), texture->height()); 185 maskMatrix.setIDiv(texture->width(), texture->height());
186 maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop )); 186 maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop ));
187 187
188 GrPipelineBuilder pipelineBuilder(*paint, drawContext->isUnifiedMultisampled ()); 188 GrPipelineBuilder pipelineBuilder(*paint, drawContext->mustUseHWAA(*paint));
189 pipelineBuilder.setUserStencil(userStencilSettings); 189 pipelineBuilder.setUserStencil(userStencilSettings);
190 190
191 pipelineBuilder.addCoverageFragmentProcessor( 191 pipelineBuilder.addCoverageFragmentProcessor(
192 GrSimpleTextureEffect::Create(texture, 192 GrSimpleTextureEffect::Create(texture,
193 maskMatrix, 193 maskMatrix,
194 GrTextureParams::kNone_Fi lterMode, 194 GrTextureParams::kNone_Fi lterMode,
195 kDevice_GrCoordSet))->unr ef(); 195 kDevice_GrCoordSet))->unr ef();
196 196
197 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(color, S kMatrix::I(), 197 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(color, S kMatrix::I(),
198 dstRect, nullptr, &invert)); 198 dstRect, nullptr, &invert));
199 drawContext->drawBatch(pipelineBuilder, clip, batch); 199 drawContext->drawBatch(pipelineBuilder, clip, batch);
200 } 200 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipelineBuilder.cpp ('k') | src/gpu/GrSoftwarePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698