| OLD | NEW |
| 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 #ifndef GrContext_DEFINED | 8 #ifndef GrContext_DEFINED |
| 9 #define GrContext_DEFINED | 9 #define GrContext_DEFINED |
| 10 | 10 |
| (...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 | 1033 |
| 1034 // Add an existing texture to the texture cache. This is intended solely | 1034 // Add an existing texture to the texture cache. This is intended solely |
| 1035 // for use with textures released from an GrAutoScratchTexture. | 1035 // for use with textures released from an GrAutoScratchTexture. |
| 1036 void addExistingTextureToCache(GrTexture* texture); | 1036 void addExistingTextureToCache(GrTexture* texture); |
| 1037 | 1037 |
| 1038 /** | 1038 /** |
| 1039 * These functions create premul <-> unpremul effects if it is possible to g
enerate a pair | 1039 * These functions create premul <-> unpremul effects if it is possible to g
enerate a pair |
| 1040 * of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. O
therwise, they | 1040 * of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. O
therwise, they |
| 1041 * return NULL. | 1041 * return NULL. |
| 1042 */ | 1042 */ |
| 1043 const GrEffectRef* createPMToUPMEffect(GrTexture* texture, | 1043 const GrEffect* createPMToUPMEffect(GrTexture* texture, |
| 1044 bool swapRAndB, | 1044 bool swapRAndB, |
| 1045 const SkMatrix& matrix); | 1045 const SkMatrix& matrix); |
| 1046 const GrEffectRef* createUPMToPMEffect(GrTexture* texture, | 1046 const GrEffect* createUPMToPMEffect(GrTexture* texture, |
| 1047 bool swapRAndB, | 1047 bool swapRAndB, |
| 1048 const SkMatrix& matrix); | 1048 const SkMatrix& matrix); |
| 1049 | 1049 |
| 1050 /** | 1050 /** |
| 1051 * This callback allows the resource cache to callback into the GrContext | 1051 * This callback allows the resource cache to callback into the GrContext |
| 1052 * when the cache is still overbudget after a purge. | 1052 * when the cache is still overbudget after a purge. |
| 1053 */ | 1053 */ |
| 1054 static bool OverbudgetCB(void* data); | 1054 static bool OverbudgetCB(void* data); |
| 1055 | 1055 |
| 1056 /** Creates a new gpu path, based on the specified path and stroke and retur
ns it. | 1056 /** Creates a new gpu path, based on the specified path and stroke and retur
ns it. |
| 1057 * The caller owns a ref on the returned path which must be balanced by a ca
ll to unref. | 1057 * The caller owns a ref on the returned path which must be balanced by a ca
ll to unref. |
| 1058 * | 1058 * |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 } | 1145 } |
| 1146 | 1146 |
| 1147 GrTexture* texture() { return fTexture; } | 1147 GrTexture* texture() { return fTexture; } |
| 1148 | 1148 |
| 1149 private: | 1149 private: |
| 1150 GrContext* fContext; | 1150 GrContext* fContext; |
| 1151 GrTexture* fTexture; | 1151 GrTexture* fTexture; |
| 1152 }; | 1152 }; |
| 1153 | 1153 |
| 1154 #endif | 1154 #endif |
| OLD | NEW |