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 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
947 | 947 |
948 /** Creates a new gpu path, based on the specified path and stroke and retur ns it. | 948 /** Creates a new gpu path, based on the specified path and stroke and retur ns it. |
949 * The caller owns a ref on the returned path which must be balanced by a ca ll to unref. | 949 * The caller owns a ref on the returned path which must be balanced by a ca ll to unref. |
950 * | 950 * |
951 * @param skPath the path geometry. | 951 * @param skPath the path geometry. |
952 * @param stroke the path stroke. | 952 * @param stroke the path stroke. |
953 * @return a new path or NULL if the operation is not supported by the backe nd. | 953 * @return a new path or NULL if the operation is not supported by the backe nd. |
954 */ | 954 */ |
955 GrPath* createPath(const SkPath& skPath, const SkStrokeRec& stroke); | 955 GrPath* createPath(const SkPath& skPath, const SkStrokeRec& stroke); |
956 | 956 |
957 /** | |
958 * Purge all the unlocked textures from the texture cache | |
959 */ | |
960 void purgeAllUnlocked(); | |
961 | |
962 friend class SkTools_PictureRenderer; // Allow access to purgeAllUnlocked fo r timings | |
bsalomon
2013/12/18 14:51:36
If we move the impl to the test-only cpp then mayb
robertphillips
2013/12/18 15:59:13
Done.
| |
963 | |
957 typedef SkRefCnt INHERITED; | 964 typedef SkRefCnt INHERITED; |
958 }; | 965 }; |
959 | 966 |
960 /** | 967 /** |
961 * Gets and locks a scratch texture from a descriptor using either exact or appr oximate criteria. | 968 * Gets and locks a scratch texture from a descriptor using either exact or appr oximate criteria. |
962 * Unlocks texture in the destructor. | 969 * Unlocks texture in the destructor. |
963 */ | 970 */ |
964 class GrAutoScratchTexture : public ::SkNoncopyable { | 971 class GrAutoScratchTexture : public ::SkNoncopyable { |
965 public: | 972 public: |
966 GrAutoScratchTexture() | 973 GrAutoScratchTexture() |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1037 } | 1044 } |
1038 | 1045 |
1039 GrTexture* texture() { return fTexture; } | 1046 GrTexture* texture() { return fTexture; } |
1040 | 1047 |
1041 private: | 1048 private: |
1042 GrContext* fContext; | 1049 GrContext* fContext; |
1043 GrTexture* fTexture; | 1050 GrTexture* fTexture; |
1044 }; | 1051 }; |
1045 | 1052 |
1046 #endif | 1053 #endif |
OLD | NEW |