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

Unified Diff: src/gpu/SkGr.cpp

Issue 2031273002: Plumbing mipmaps to the point of creation. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: MakeTextureFromMipMap is now private. Created 4 years, 6 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/SkImage.h ('k') | src/gpu/SkGrPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGr.cpp
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 2127c367444cf86e7e58584556187d6e4368a3d9..60736da5723e430237c6d8b18b60d2831deaf759 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -394,6 +394,14 @@ GrTexture* GrGenerateMipMapsAndUploadToTexture(GrContext* ctx, const SkBitmap& b
mipLevelCount);
}
+GrTexture* GrUploadMipMapToTexture(GrContext* ctx, const SkImageInfo& info,
+ const GrMipLevel* texels, int mipLevelCount) {
+ const GrCaps* caps = ctx->caps();
+ return ctx->textureProvider()->createMipMappedTexture(GrImageInfoToSurfaceDesc(info, *caps),
+ SkBudgeted::kYes, texels,
+ mipLevelCount);
+}
+
GrTexture* GrRefCachedBitmapTexture(GrContext* ctx, const SkBitmap& bitmap,
const GrTextureParams& params) {
if (bitmap.getTexture()) {
« no previous file with comments | « include/core/SkImage.h ('k') | src/gpu/SkGrPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698