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

Side by Side Diff: src/gpu/effects/GrTextureDomain.cpp

Issue 1246193002: Moved GrGLFragmentProcessor definition to its own file (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 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/effects/GrTextureDomain.h ('k') | src/gpu/effects/GrYUVtoRGBEffect.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 "GrTextureDomain.h" 8 #include "GrTextureDomain.h"
9 #include "GrInvariantOutput.h" 9 #include "GrInvariantOutput.h"
10 #include "GrSimpleTextureEffect.h" 10 #include "GrSimpleTextureEffect.h"
11 #include "SkFloatingPoint.h" 11 #include "SkFloatingPoint.h"
12 #include "gl/GrGLProcessor.h" 12 #include "gl/GrGLFragmentProcessor.h"
13 #include "gl/builders/GrGLProgramBuilder.h" 13 #include "gl/builders/GrGLProgramBuilder.h"
14 14
15 GrTextureDomain::GrTextureDomain(const SkRect& domain, Mode mode, int index) 15 GrTextureDomain::GrTextureDomain(const SkRect& domain, Mode mode, int index)
16 : fIndex(index) { 16 : fIndex(index) {
17 17
18 static const SkRect kFullRect = {0, 0, SK_Scalar1, SK_Scalar1}; 18 static const SkRect kFullRect = {0, 0, SK_Scalar1, SK_Scalar1};
19 if (domain.contains(kFullRect) && kClamp_Mode == mode) { 19 if (domain.contains(kFullRect) && kClamp_Mode == mode) {
20 fMode = kIgnore_Mode; 20 fMode = kIgnore_Mode;
21 } else { 21 } else {
22 fMode = mode; 22 fMode = mode;
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false; 303 bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false;
304 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrC oordSet; 304 GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrC oordSet;
305 return GrTextureDomainEffect::Create(d->fProcDataManager, 305 return GrTextureDomainEffect::Create(d->fProcDataManager,
306 d->fTextures[texIdx], 306 d->fTextures[texIdx],
307 matrix, 307 matrix,
308 domain, 308 domain,
309 mode, 309 mode,
310 bilerp ? GrTextureParams::kBilerp_Filte rMode : GrTextureParams::kNone_FilterMode, 310 bilerp ? GrTextureParams::kBilerp_Filte rMode : GrTextureParams::kNone_FilterMode,
311 coords); 311 coords);
312 } 312 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrTextureDomain.h ('k') | src/gpu/effects/GrYUVtoRGBEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698