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

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: Removing the concept of a dirty mipmap. It is expected that the texture upload provides the mipmaps. Created 5 years, 3 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 44c8cbc6578424aaed6a0e3422d9e4915597ee6e..7e3403cff653e2b31b00b8faf05a78aa4f3c92d9 100644
--- a/include/gpu/GrTextureProvider.h
+++ b/include/gpu/GrTextureProvider.h
@@ -9,6 +9,8 @@
#define GrTextureProvider_DEFINED
#include "GrTexture.h"
+#include "SkMipMapLevel.h"
+#include "SkTArray.h"
class SK_API GrTextureProvider {
public:
@@ -34,6 +36,17 @@ public:
return this->createTexture(desc, budgeted, NULL, 0);
}
+ /**
+ * Creates a new 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 texels An array of mipmap levels
+ */
+ GrTexture* createTexture(const GrSurfaceDesc& desc, bool budgeted,
+ const SkTArray<SkMipMapLevel>& texels);
+
/** Assigns a unique key to the texture. The texture will be findable via this key using
findTextureByUniqueKey(). If an existing texture has this key, it's key will be removed. */
void assignUniqueKeyToTexture(const GrUniqueKey& key, GrTexture* texture) {

Powered by Google App Engine
This is Rietveld 408576698