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

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

Issue 2154753003: Introduce GrColorSpaceXform, for gamut conversion on textures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More progress & refactoring Created 4 years, 5 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.h ('k') | src/gpu/GrTextureParamsAdjuster.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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // matrix to normalized coords. 179 // matrix to normalized coords.
180 SkMatrix maskMatrix; 180 SkMatrix maskMatrix;
181 maskMatrix.setIDiv(texture->width(), texture->height()); 181 maskMatrix.setIDiv(texture->width(), texture->height());
182 maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop )); 182 maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop ));
183 183
184 GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(paint)); 184 GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(paint));
185 pipelineBuilder.setUserStencil(userStencilSettings); 185 pipelineBuilder.setUserStencil(userStencilSettings);
186 186
187 pipelineBuilder.addCoverageFragmentProcessor( 187 pipelineBuilder.addCoverageFragmentProcessor(
188 GrSimpleTextureEffect::Make(texture, 188 GrSimpleTextureEffect::Make(texture,
189 nullptr,
189 maskMatrix, 190 maskMatrix,
190 GrTextureParams::kNone_Filt erMode, 191 GrTextureParams::kNone_Filt erMode,
191 kDevice_GrCoordSet)); 192 kDevice_GrCoordSet));
192 193
193 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(paint.ge tColor(), 194 SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(paint.ge tColor(),
194 SkMatrix ::I(), 195 SkMatrix ::I(),
195 dstRect, nullptr, &invert)); 196 dstRect, nullptr, &invert));
196 drawContext->drawBatch(pipelineBuilder, clip, batch); 197 drawContext->drawBatch(pipelineBuilder, clip, batch);
197 } 198 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrTextureParamsAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698