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

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: Style changes based on CL feedback. 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..d96b2c516aa1db36ae38b2e9f064b1edede15f18 100644
--- a/include/gpu/GrTextureProvider.h
+++ b/include/gpu/GrTextureProvider.h
@@ -9,6 +9,7 @@
#define GrTextureProvider_DEFINED
#include "GrTexture.h"
+#include "SkMipMap.h"
class SK_API GrTextureProvider {
public:
@@ -29,6 +30,18 @@ public:
GrTexture* createTexture(const GrSurfaceDesc& desc, bool budgeted, const void* srcData,
size_t rowBytes);
+ /**
bsalomon 2015/07/22 17:21:10 What do you think about combining createTexture an
cblume 2015/07/22 18:32:40 I like that idea. In general, I am in favor of ha
cblume 2015/07/24 23:49:03 Thinking a bit more about this...ideally mipmapped
+ * 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 mipmap 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/gl/GrGLGpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698