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

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

Issue 24853002: Make GPU coord transforms automatic (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/effects/GrBezierEffect.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 #include "GrDrawState.h" 9 #include "GrDrawState.h"
10 #include "GrDrawTargetCaps.h" 10 #include "GrDrawTargetCaps.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // vertex positions rather than local coords. 197 // vertex positions rather than local coords.
198 SkMatrix maskMatrix; 198 SkMatrix maskMatrix;
199 maskMatrix.setIDiv(texture->width(), texture->height()); 199 maskMatrix.setIDiv(texture->width(), texture->height());
200 maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop )); 200 maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop ));
201 maskMatrix.preConcat(drawState->getViewMatrix()); 201 maskMatrix.preConcat(drawState->getViewMatrix());
202 202
203 drawState->addCoverageEffect( 203 drawState->addCoverageEffect(
204 GrSimpleTextureEffect::Create(texture, 204 GrSimpleTextureEffect::Create(texture,
205 maskMatrix, 205 maskMatrix,
206 GrTextureParams::kNone_Fi lterMode, 206 GrTextureParams::kNone_Fi lterMode,
207 GrEffect::kPosition_Coord sType))->unref(); 207 kPosition_GrCoordSet))->u nref();
208 208
209 target->drawSimpleRect(dstRect); 209 target->drawSimpleRect(dstRect);
210 } 210 }
OLDNEW
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/effects/GrBezierEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698