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

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

Issue 20362002: make the filter mode for GrTextureAccess an enum so we can plumb down (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fall back to mipmaps for HQ sampling (for now) Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrTextContext.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 "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // maps to 0,0, and then a scaling matrix to normalized coords. We apply thi s matrix to the 190 // maps to 0,0, and then a scaling matrix to normalized coords. We apply thi s matrix to the
191 // vertex positions rather than local coords. 191 // vertex positions rather than local coords.
192 SkMatrix maskMatrix; 192 SkMatrix maskMatrix;
193 maskMatrix.setIDiv(texture->width(), texture->height()); 193 maskMatrix.setIDiv(texture->width(), texture->height());
194 maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop )); 194 maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop ));
195 maskMatrix.preConcat(drawState->getViewMatrix()); 195 maskMatrix.preConcat(drawState->getViewMatrix());
196 196
197 drawState->addCoverageEffect( 197 drawState->addCoverageEffect(
198 GrSimpleTextureEffect::Create(texture, 198 GrSimpleTextureEffect::Create(texture,
199 maskMatrix, 199 maskMatrix,
200 false, 200 GrTextureParams::kNone_Fi lterMode,
201 GrEffect::kPosition_Coord sType))->unref(); 201 GrEffect::kPosition_Coord sType))->unref();
202 202
203 target->drawSimpleRect(dstRect); 203 target->drawSimpleRect(dstRect);
204 } 204 }
OLDNEW
« no previous file with comments | « src/gpu/GrContext.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698