| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 GrCoordTransform_DEFINED | 8 #ifndef GrCoordTransform_DEFINED |
| 9 #define GrCoordTransform_DEFINED | 9 #define GrCoordTransform_DEFINED |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 * usually not the coordinates a GrEffect wants. | 32 * usually not the coordinates a GrEffect wants. |
| 33 */ | 33 */ |
| 34 kPosition_GrCoordSet | 34 kPosition_GrCoordSet |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 /** | 37 /** |
| 38 * A class representing a linear transformation from one of the built-in coordin
ate sets (local or | 38 * A class representing a linear transformation from one of the built-in coordin
ate sets (local or |
| 39 * position). GrEffects just define these transformations, and the framework doe
s the rest of the | 39 * position). GrEffects just define these transformations, and the framework doe
s the rest of the |
| 40 * work to make the transformed coordinates available in their fragment shader. | 40 * work to make the transformed coordinates available in their fragment shader. |
| 41 */ | 41 */ |
| 42 class GrCoordTransform : public SkNoncopyable { | 42 class GrCoordTransform : SkNoncopyable { |
| 43 public: | 43 public: |
| 44 GrCoordTransform() { SkDEBUGCODE(fInEffect = false); } | 44 GrCoordTransform() { SkDEBUGCODE(fInEffect = false); } |
| 45 | 45 |
| 46 /** | 46 /** |
| 47 * Create a transformation that maps [0, 1] to a texture's boundaries. | 47 * Create a transformation that maps [0, 1] to a texture's boundaries. |
| 48 */ | 48 */ |
| 49 GrCoordTransform(GrCoordSet sourceCoords, const GrTexture* texture) { | 49 GrCoordTransform(GrCoordSet sourceCoords, const GrTexture* texture) { |
| 50 SkDEBUGCODE(fInEffect = false); | 50 SkDEBUGCODE(fInEffect = false); |
| 51 this->reset(sourceCoords, texture); | 51 this->reset(sourceCoords, texture); |
| 52 } | 52 } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 #ifdef SK_DEBUG | 111 #ifdef SK_DEBUG |
| 112 public: | 112 public: |
| 113 void setInEffect() const { fInEffect = true; } | 113 void setInEffect() const { fInEffect = true; } |
| 114 private: | 114 private: |
| 115 mutable bool fInEffect; | 115 mutable bool fInEffect; |
| 116 #endif | 116 #endif |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 #endif | 119 #endif |
| OLD | NEW |