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

Unified Diff: include/gpu/GrTextureProvider.h

Issue 1249543003: Creating functions for uploading a mipmapped texture. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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
Index: include/gpu/GrTextureProvider.h
diff --git a/include/gpu/GrTextureProvider.h b/include/gpu/GrTextureProvider.h
index 28fda48c43e87dbf17d033e6fa37d0f62dc68a57..8271abc8ff75f422d4cfab5f8fc1800af706c960 100644
--- a/include/gpu/GrTextureProvider.h
+++ b/include/gpu/GrTextureProvider.h
@@ -9,6 +9,7 @@
#define GrTextureProvider_DEFINED
#include "GrTexture.h"
+#include "../core/SkMipMap.h"
scroggo 2015/07/21 14:44:23 Within Skia, we do not fully qualify our includes.
class SK_API GrTextureProvider {
public:
@@ -29,6 +30,19 @@ public:
GrTexture* createTexture(const GrSurfaceDesc& desc, bool budgeted, const void* srcData,
size_t rowBytes);
+
+ /**
+ * Creates a new mipmapped texture in the resource cache and returns it. The
+ * caller owns a ref on the returned texture which must be balanced by a
+ * call to unref.
+ *
+ * @param desc Description of the texture properties.
+ * @param budgeted Does the texture count against the resource cache budget?
+ * @param srcData The mipmip data used to populate the texture.
+ */
+ GrTexture* createMipmappedTexture(const GrSurfaceDesc& desc, bool budgeted,
+ const SkMipMap& srcData);
+
/** Shortcut for creating a texture with no initial data to upload. */
GrTexture* createTexture(const GrSurfaceDesc& desc, bool budgeted) {
return this->createTexture(desc, budgeted, NULL, 0);
« no previous file with comments | « include/core/SkMipMap.h ('k') | include/gpu/SkGr.h » ('j') | src/gpu/GrGpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698