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

Side by Side Diff: src/gpu/gl/GrGLEffectMatrix.h

Issue 24018007: Add a GrCustomCoordsTextureEffect class (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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/effects/GrSingleTextureEffect.h ('k') | no next file » | 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 #ifndef GrGLEffectMatrix_DEFINED 8 #ifndef GrGLEffectMatrix_DEFINED
9 #define GrGLEffectMatrix_DEFINED 9 #define GrGLEffectMatrix_DEFINED
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 * arbitrary shift in its final key. However, when GrGLEffectMatrix::emitCod e*() code is called 53 * arbitrary shift in its final key. However, when GrGLEffectMatrix::emitCod e*() code is called
54 * the relevant bits must be in the lower kKeyBits of the key parameter. 54 * the relevant bits must be in the lower kKeyBits of the key parameter.
55 */ 55 */
56 enum { 56 enum {
57 kKeyBits = kKeyBitsPrivate, 57 kKeyBits = kKeyBitsPrivate,
58 kKeyMask = (1 << kKeyBits) - 1, 58 kKeyMask = (1 << kKeyBits) - 1,
59 }; 59 };
60 60
61 GrGLEffectMatrix(CoordsType coordsType) 61 GrGLEffectMatrix(CoordsType coordsType)
62 : fCoordsType(coordsType) { 62 : fCoordsType(coordsType) {
63 SkASSERT(GrEffect::kLocal_CoordsType == coordsType ||
64 GrEffect::kPosition_CoordsType == coordsType);
65 fPrevMatrix = SkMatrix::InvalidMatrix(); 63 fPrevMatrix = SkMatrix::InvalidMatrix();
66 } 64 }
67 65
68 /** 66 /**
69 * Generates the key for the portion of the code emitted by this class's emi tCode() function. 67 * Generates the key for the portion of the code emitted by this class's emi tCode() function.
70 * Pass a texture to make GrGLEffectMatrix automatically adjust for the text ure's origin. Pass 68 * Pass a texture to make GrGLEffectMatrix automatically adjust for the text ure's origin. Pass
71 * NULL when not using the EffectMatrix for a texture lookup, or if the GrGL Effect subclass 69 * NULL when not using the EffectMatrix for a texture lookup, or if the GrGL Effect subclass
72 * wants to handle origin adjustments in some other manner. The coords type param must match the 70 * wants to handle origin adjustments in some other manner. The coords type param must match the
73 * param that would be used to initialize GrGLEffectMatrix for the generatin g GrEffect. 71 * param that would be used to initialize GrGLEffectMatrix for the generatin g GrEffect.
74 */ 72 */
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 const GrDrawEffect& drawEffect, 109 const GrDrawEffect& drawEffect,
112 const GrTexture*); 110 const GrTexture*);
113 111
114 GrGLUniformManager::UniformHandle fUni; 112 GrGLUniformManager::UniformHandle fUni;
115 GrSLType fUniType; 113 GrSLType fUniType;
116 SkMatrix fPrevMatrix; 114 SkMatrix fPrevMatrix;
117 CoordsType fCoordsType; 115 CoordsType fCoordsType;
118 }; 116 };
119 117
120 #endif 118 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrSingleTextureEffect.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698