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

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: Storing the max mipmap level in the texture. Created 4 years, 11 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 338dddbaca87f0a87c89c29129afad0ae3fadac4..6debf9b7da1ae93136599dd7e962633c9759b046 100644
--- a/include/gpu/GrTextureProvider.h
+++ b/include/gpu/GrTextureProvider.h
@@ -10,6 +10,8 @@
#include "GrTexture.h"
#include "SkImageFilter.h"
+#include "SkMipMapLevel.h"
+#include "SkTArray.h"
class GrSingleOwner;
@@ -22,8 +24,17 @@ public:
* 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 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);
+
+ /**
+ * This function is a shim which creates a SkTArray<SkMipMapLevel> of size 1.
+ * It then calls createTexture with that SkTArray.
+ *
* @param srcData Pointer to the pixel values (optional).
* @param rowBytes The number of bytes between rows of the texture. Zero
* implies tightly packed rows. For compressed pixel configs, this

Powered by Google App Engine
This is Rietveld 408576698