| 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 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 | 976 |
| 977 void setupDrawBuffer(); | 977 void setupDrawBuffer(); |
| 978 | 978 |
| 979 class AutoCheckFlush; | 979 class AutoCheckFlush; |
| 980 /// Sets the paint and returns the target to draw into. The paint can be NUL
L in which case the | 980 /// Sets the paint and returns the target to draw into. The paint can be NUL
L in which case the |
| 981 /// draw state is left unmodified. | 981 /// draw state is left unmodified. |
| 982 GrDrawTarget* prepareToDraw(GrDrawState* ds, const GrPaint* paint, const Aut
oCheckFlush*); | 982 GrDrawTarget* prepareToDraw(GrDrawState* ds, const GrPaint* paint, const Aut
oCheckFlush*); |
| 983 | 983 |
| 984 void internalDrawPath(GrDrawTarget*, | 984 void internalDrawPath(GrDrawTarget*, |
| 985 GrDrawState*, | 985 GrDrawState*, |
| 986 GrColor, |
| 986 bool useAA, | 987 bool useAA, |
| 987 const SkPath&, | 988 const SkPath&, |
| 988 const GrStrokeInfo&); | 989 const GrStrokeInfo&); |
| 989 | 990 |
| 990 GrTexture* createResizedTexture(const GrSurfaceDesc& desc, | 991 GrTexture* createResizedTexture(const GrSurfaceDesc& desc, |
| 991 const GrCacheID& cacheID, | 992 const GrCacheID& cacheID, |
| 992 const void* srcData, | 993 const void* srcData, |
| 993 size_t rowBytes, | 994 size_t rowBytes, |
| 994 bool filter); | 995 bool filter); |
| 995 | 996 |
| 996 /** | 997 /** |
| 997 * These functions create premul <-> unpremul effects if it is possible to g
enerate a pair | 998 * These functions create premul <-> unpremul effects if it is possible to g
enerate a pair |
| 998 * of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. O
therwise, they | 999 * of effects that make a readToUPM->writeToPM->readToUPM cycle invariant. O
therwise, they |
| 999 * return NULL. | 1000 * return NULL. |
| 1000 */ | 1001 */ |
| 1001 const GrFragmentProcessor* createPMToUPMEffect(GrTexture*, bool swapRAndB, c
onst SkMatrix&); | 1002 const GrFragmentProcessor* createPMToUPMEffect(GrTexture*, bool swapRAndB, c
onst SkMatrix&); |
| 1002 const GrFragmentProcessor* createUPMToPMEffect(GrTexture*, bool swapRAndB, c
onst SkMatrix&); | 1003 const GrFragmentProcessor* createUPMToPMEffect(GrTexture*, bool swapRAndB, c
onst SkMatrix&); |
| 1003 | 1004 |
| 1004 /** | 1005 /** |
| 1005 * This callback allows the resource cache to callback into the GrContext | 1006 * This callback allows the resource cache to callback into the GrContext |
| 1006 * when the cache is still over budget after a purge. | 1007 * when the cache is still over budget after a purge. |
| 1007 */ | 1008 */ |
| 1008 static void OverBudgetCB(void* data); | 1009 static void OverBudgetCB(void* data); |
| 1009 | 1010 |
| 1010 typedef SkRefCnt INHERITED; | 1011 typedef SkRefCnt INHERITED; |
| 1011 }; | 1012 }; |
| 1012 | 1013 |
| 1013 #endif | 1014 #endif |
| OLD | NEW |