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

Side by Side Diff: src/gpu/GrTextContext.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/GrSWMaskHelper.cpp ('k') | src/gpu/GrTexture.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 2010 Google Inc. 2 * Copyright 2010 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 8
9 9
10 #include "GrTextContext.h" 10 #include "GrTextContext.h"
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 27
28 GrDrawState* drawState = fDrawTarget->drawState(); 28 GrDrawState* drawState = fDrawTarget->drawState();
29 GrDrawState::AutoRestoreEffects are(drawState); 29 GrDrawState::AutoRestoreEffects are(drawState);
30 drawState->setFromPaint(fPaint, SkMatrix::I(), fContext->getRenderTarget()); 30 drawState->setFromPaint(fPaint, SkMatrix::I(), fContext->getRenderTarget());
31 31
32 if (fCurrVertex > 0) { 32 if (fCurrVertex > 0) {
33 // setup our sampler state for our text texture/atlas 33 // setup our sampler state for our text texture/atlas
34 GrAssert(GrIsALIGN4(fCurrVertex)); 34 GrAssert(GrIsALIGN4(fCurrVertex));
35 GrAssert(fCurrTexture); 35 GrAssert(fCurrTexture);
36 GrTextureParams params(SkShader::kRepeat_TileMode, false); 36 GrTextureParams params(SkShader::kRepeat_TileMode, GrTextureParams::kNon e_FilterMode);
37 37
38 // This effect could be stored with one of the cache objects (atlas?) 38 // This effect could be stored with one of the cache objects (atlas?)
39 drawState->addCoverageEffect( 39 drawState->addCoverageEffect(
40 GrSimpleTextureEffect::CreateWithCustomCoords(fC urrTexture, params), 40 GrSimpleTextureEffect::CreateWithCustomCoords(fC urrTexture, params),
41 kGlyphCoordsAttributeIndex)->unref(); 41 kGlyphCoordsAttributeIndex)->unref();
42 42
43 if (!GrPixelConfigIsAlphaOnly(fCurrTexture->config())) { 43 if (!GrPixelConfigIsAlphaOnly(fCurrTexture->config())) {
44 if (kOne_GrBlendCoeff != fPaint.getSrcBlendCoeff() || 44 if (kOne_GrBlendCoeff != fPaint.getSrcBlendCoeff() ||
45 kISA_GrBlendCoeff != fPaint.getDstBlendCoeff() || 45 kISA_GrBlendCoeff != fPaint.getDstBlendCoeff() ||
46 fPaint.numColorStages()) { 46 fPaint.numColorStages()) {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 SkFixedToFloat(vx + width), 240 SkFixedToFloat(vx + width),
241 SkFixedToFloat(vy + height), 241 SkFixedToFloat(vy + height),
242 2 * sizeof(SkPoint)); 242 2 * sizeof(SkPoint));
243 fVertices[2*fCurrVertex+1].setRectFan(SkFixedToFloat(texture->normalizeFixed X(tx)), 243 fVertices[2*fCurrVertex+1].setRectFan(SkFixedToFloat(texture->normalizeFixed X(tx)),
244 SkFixedToFloat(texture->normalizeFixed Y(ty)), 244 SkFixedToFloat(texture->normalizeFixed Y(ty)),
245 SkFixedToFloat(texture->normalizeFixed X(tx + width)), 245 SkFixedToFloat(texture->normalizeFixed X(tx + width)),
246 SkFixedToFloat(texture->normalizeFixed Y(ty + height)), 246 SkFixedToFloat(texture->normalizeFixed Y(ty + height)),
247 2 * sizeof(SkPoint)); 247 2 * sizeof(SkPoint));
248 fCurrVertex += 4; 248 fCurrVertex += 4;
249 } 249 }
OLDNEW
« no previous file with comments | « src/gpu/GrSWMaskHelper.cpp ('k') | src/gpu/GrTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698