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

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

Issue 1765633002: Don't allow nullptr in texels array params (unless using a transfer buffer). (Closed) Base URL: https://skia.googlesource.com/skia@usesdk
Patch Set: Upload again in case prev didn't work Created 4 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
« no previous file with comments | « no previous file | src/gpu/GrGpu.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 GrTextureProvider_DEFINED 8 #ifndef GrTextureProvider_DEFINED
9 #define GrTextureProvider_DEFINED 9 #define GrTextureProvider_DEFINED
10 10
(...skipping 27 matching lines...) Expand all
38 * @param srcData Pointer to the pixel values (optional). 38 * @param srcData Pointer to the pixel values (optional).
39 * @param rowBytes The number of bytes between rows of the texture. Zero 39 * @param rowBytes The number of bytes between rows of the texture. Zero
40 * implies tightly packed rows. For compressed pixel config s, this 40 * implies tightly packed rows. For compressed pixel config s, this
41 * field is ignored. 41 * field is ignored.
42 */ 42 */
43 GrTexture* createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted, con st void* srcData, 43 GrTexture* createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted, con st void* srcData,
44 size_t rowBytes); 44 size_t rowBytes);
45 45
46 /** Shortcut for creating a texture with no initial data to upload. */ 46 /** Shortcut for creating a texture with no initial data to upload. */
47 GrTexture* createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted) { 47 GrTexture* createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted) {
48 return this->createTexture(desc, budgeted, NULL, 0); 48 return this->createTexture(desc, budgeted, nullptr, 0);
49 } 49 }
50 50
51 /** Assigns a unique key to the texture. The texture will be findable via th is key using 51 /** Assigns a unique key to the texture. The texture will be findable via th is key using
52 findTextureByUniqueKey(). If an existing texture has this key, it's key will be removed. */ 52 findTextureByUniqueKey(). If an existing texture has this key, it's key will be removed. */
53 void assignUniqueKeyToTexture(const GrUniqueKey& key, GrTexture* texture) { 53 void assignUniqueKeyToTexture(const GrUniqueKey& key, GrTexture* texture) {
54 this->assignUniqueKeyToResource(key, texture); 54 this->assignUniqueKeyToResource(key, texture);
55 } 55 }
56 56
57 /** Finds a texture by unique key. If the texture is found it is ref'ed and returned. */ 57 /** Finds a texture by unique key. If the texture is found it is ref'ed and returned. */
58 GrTexture* findAndRefTextureByUniqueKey(const GrUniqueKey& key); 58 GrTexture* findAndRefTextureByUniqueKey(const GrUniqueKey& key);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 private: 166 private:
167 GrResourceCache* fCache; 167 GrResourceCache* fCache;
168 GrGpu* fGpu; 168 GrGpu* fGpu;
169 169
170 // In debug builds we guard against improper thread handling 170 // In debug builds we guard against improper thread handling
171 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) 171 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;)
172 }; 172 };
173 173
174 #endif 174 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698