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

Unified Diff: include/gpu/GrTypes.h

Issue 1886613003: Remove GrTextureStorageAllocator. This was added from Chromium but never used and not expected to b… (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkSurface.h ('k') | src/gpu/GrTexture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrTypes.h
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index 47c13ec02d91888bcd8d0738862976847f09e2b3..902594522d87ddf0f25ec5671e3c870c565fd53e 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -444,58 +444,6 @@ struct GrMipLevel {
};
/**
- * An container of function pointers which consumers of Skia can fill in and
- * pass to Skia. Skia will use these function pointers in place of its backend
- * API texture creation function. Either all of the function pointers should be
- * filled in, or they should all be nullptr.
- */
-struct GrTextureStorageAllocator {
- GrTextureStorageAllocator()
- : fAllocateTextureStorage(nullptr)
- , fDeallocateTextureStorage(nullptr) {
- }
-
- enum class Result {
- kSucceededAndUploaded,
- kSucceededWithoutUpload,
- kFailed
- };
- typedef Result (*AllocateTextureStorageProc)(
- void* ctx, GrBackendObject texture, unsigned width,
- unsigned height, GrPixelConfig config, const void* srcData, GrSurfaceOrigin);
- typedef void (*DeallocateTextureStorageProc)(void* ctx, GrBackendObject texture);
-
- /*
- * Generates and binds a texture to |textureStorageTarget()|. Allocates
- * storage for the texture.
- *
- * In OpenGL, the MIN and MAX filters for the created texture must be
- * GL_LINEAR. The WRAP_S and WRAP_T must be GL_CLAMP_TO_EDGE.
- *
- * If |srcData| is not nullptr, then the implementation of this function
- * may attempt to upload the data into the texture. On successful upload,
- * or if |srcData| is nullptr, returns kSucceededAndUploaded.
- */
- AllocateTextureStorageProc fAllocateTextureStorage;
-
- /*
- * Deallocate the storage for the given texture.
- *
- * Skia does not always destroy its outstanding textures. See
- * GrContext::abandonContext() for more details. The consumer of Skia is
- * responsible for making sure that all textures are destroyed, even if this
- * callback is not invoked.
- */
- DeallocateTextureStorageProc fDeallocateTextureStorage;
-
- /*
- * The context to use when invoking fAllocateTextureStorage and
- * fDeallocateTextureStorage.
- */
- void* fCtx;
-};
-
-/**
* Describes a surface to be created.
*/
struct GrSurfaceDesc {
@@ -528,13 +476,6 @@ struct GrSurfaceDesc {
* max supported count.
*/
int fSampleCnt;
-
- /**
- * A custom platform-specific allocator to use in place of the backend APIs
- * usual texture creation method (e.g. TexImage2D in OpenGL).
- */
- GrTextureStorageAllocator fTextureStorageAllocator;
-
bool fIsMipMapped; //!< Indicates if the texture has mipmaps
};
« no previous file with comments | « include/core/SkSurface.h ('k') | src/gpu/GrTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698