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

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

Issue 301993002: Constify the arguments to createTexture (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More cleanup Created 6 years, 6 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
« no previous file with comments | « no previous file | src/gpu/GrContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 * @param desc Description of the texture properties. 206 * @param desc Description of the texture properties.
207 * @param cacheID Cache-specific properties (e.g., texture gen ID) 207 * @param cacheID Cache-specific properties (e.g., texture gen ID)
208 * @param srcData Pointer to the pixel values. 208 * @param srcData Pointer to the pixel values.
209 * @param rowBytes The number of bytes between rows of the texture. Zero 209 * @param rowBytes The number of bytes between rows of the texture. Zero
210 * implies tightly packed rows. 210 * implies tightly packed rows.
211 * @param cacheKey (optional) If non-NULL, we'll write the cache key we use d to cacheKey. 211 * @param cacheKey (optional) If non-NULL, we'll write the cache key we use d to cacheKey.
212 */ 212 */
213 GrTexture* createTexture(const GrTextureParams* params, 213 GrTexture* createTexture(const GrTextureParams* params,
214 const GrTextureDesc& desc, 214 const GrTextureDesc& desc,
215 const GrCacheID& cacheID, 215 const GrCacheID& cacheID,
216 void* srcData, 216 const void* srcData,
217 size_t rowBytes, 217 size_t rowBytes,
218 GrResourceKey* cacheKey = NULL); 218 GrResourceKey* cacheKey = NULL);
219 219
220 /** 220 /**
221 * Search for an entry based on key and dimensions. If found, ref it and ret urn it. The return 221 * Search for an entry based on key and dimensions. If found, ref it and ret urn it. The return
222 * value will be NULL if not found. The caller must balance with a call to u nref. 222 * value will be NULL if not found. The caller must balance with a call to u nref.
223 * 223 *
224 * @param desc Description of the texture properties. 224 * @param desc Description of the texture properties.
225 * @param cacheID Cache-specific properties (e.g., texture gen ID) 225 * @param cacheID Cache-specific properties (e.g., texture gen ID)
226 * @param params The texture params used to draw a texture may help deter mine 226 * @param params The texture params used to draw a texture may help deter mine
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 class AutoCheckFlush; 993 class AutoCheckFlush;
994 /// Sets the paint and returns the target to draw into. The paint can be NUL L in which case the 994 /// Sets the paint and returns the target to draw into. The paint can be NUL L in which case the
995 /// draw state is left unmodified. 995 /// draw state is left unmodified.
996 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects *, AutoCheckFlush*); 996 GrDrawTarget* prepareToDraw(const GrPaint*, BufferedDraw, AutoRestoreEffects *, AutoCheckFlush*);
997 997
998 void internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath& path, 998 void internalDrawPath(GrDrawTarget* target, bool useAA, const SkPath& path,
999 const SkStrokeRec& stroke); 999 const SkStrokeRec& stroke);
1000 1000
1001 GrTexture* createResizedTexture(const GrTextureDesc& desc, 1001 GrTexture* createResizedTexture(const GrTextureDesc& desc,
1002 const GrCacheID& cacheID, 1002 const GrCacheID& cacheID,
1003 void* srcData, 1003 const void* srcData,
1004 size_t rowBytes, 1004 size_t rowBytes,
1005 bool filter); 1005 bool filter);
1006 1006
1007 // Needed so GrTexture's returnToCache helper function can call 1007 // Needed so GrTexture's returnToCache helper function can call
1008 // addExistingTextureToCache 1008 // addExistingTextureToCache
1009 friend class GrTexture; 1009 friend class GrTexture;
1010 friend class GrStencilAndCoverPathRenderer; 1010 friend class GrStencilAndCoverPathRenderer;
1011 1011
1012 // Add an existing texture to the texture cache. This is intended solely 1012 // Add an existing texture to the texture cache. This is intended solely
1013 // for use with textures released from an GrAutoScratchTexture. 1013 // for use with textures released from an GrAutoScratchTexture.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 } 1123 }
1124 1124
1125 GrTexture* texture() { return fTexture; } 1125 GrTexture* texture() { return fTexture; }
1126 1126
1127 private: 1127 private:
1128 GrContext* fContext; 1128 GrContext* fContext;
1129 GrTexture* fTexture; 1129 GrTexture* fTexture;
1130 }; 1130 };
1131 1131
1132 #endif 1132 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698