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

Side by Side Diff: include/gpu/GrContext.h

Issue 201153023: Adding a new SkSurface factory for generating surfaces from the scratch texture pool. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: build/typo fix Created 6 years, 9 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
OLDNEW
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 * Frees GPU created by the context. Can be called to reduce GPU memory 104 * Frees GPU created by the context. Can be called to reduce GPU memory
105 * pressure. 105 * pressure.
106 */ 106 */
107 void freeGpuResources(); 107 void freeGpuResources();
108 108
109 /** 109 /**
110 * Returns the number of bytes of GPU memory hosted by the texture cache. 110 * Returns the number of bytes of GPU memory hosted by the texture cache.
111 */ 111 */
112 size_t getGpuTextureCacheBytes() const; 112 size_t getGpuTextureCacheBytes() const;
113 113
114 /**
115 * Returns the number of resources hosted by the texture cache.
116 */
117 int getGpuTextureCacheResourceCount() const;
118
114 /////////////////////////////////////////////////////////////////////////// 119 ///////////////////////////////////////////////////////////////////////////
115 // Textures 120 // Textures
116 121
117 /** 122 /**
118 * Creates a new entry, based on the specified key and texture and returns i t. The caller owns a 123 * Creates a new entry, based on the specified key and texture and returns i t. The caller owns a
119 * ref on the returned texture which must be balanced by a call to unref. 124 * ref on the returned texture which must be balanced by a call to unref.
120 * 125 *
121 * @param params The texture params used to draw a texture may help deter mine 126 * @param params The texture params used to draw a texture may help deter mine
122 * the cache entry used. (e.g. different versions may exist 127 * the cache entry used. (e.g. different versions may exist
123 * for different wrap modes on GPUs with limited NPOT 128 * for different wrap modes on GPUs with limited NPOT
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 } 1062 }
1058 1063
1059 GrTexture* texture() { return fTexture; } 1064 GrTexture* texture() { return fTexture; }
1060 1065
1061 private: 1066 private:
1062 GrContext* fContext; 1067 GrContext* fContext;
1063 GrTexture* fTexture; 1068 GrTexture* fTexture;
1064 }; 1069 };
1065 1070
1066 #endif 1071 #endif
OLDNEW
« no previous file with comments | « include/core/SkSurface.h ('k') | include/gpu/SkGpuDevice.h » ('j') | src/gpu/SkGpuDevice.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698