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

Unified Diff: src/gpu/SkGr.cpp

Issue 1809663002: Propogate SkBudgeted for NewFromDeferredTextureImageData (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | 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 1463336c498d3fde9eb03adcd3e5a2108037684c..9ab8843386cd385a6e34ce724d6250866ef8a6fc 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -230,10 +230,10 @@ GrTexture* GrUploadBitmapToTexture(GrContext* ctx, const SkBitmap& bitmap) {
if (!bitmap.peekPixels(&pixmap)) {
return nullptr;
}
- return GrUploadPixmapToTexture(ctx, pixmap);
+ return GrUploadPixmapToTexture(ctx, pixmap, SkBudgeted::kYes);
}
-GrTexture* GrUploadPixmapToTexture(GrContext* ctx, const SkPixmap& pixmap) {
+GrTexture* GrUploadPixmapToTexture(GrContext* ctx, const SkPixmap& pixmap, SkBudgeted budgeted) {
const SkPixmap* pmap = &pixmap;
SkPixmap tmpPixmap;
SkBitmap tmpBitmap;
@@ -250,7 +250,7 @@ GrTexture* GrUploadPixmapToTexture(GrContext* ctx, const SkPixmap& pixmap) {
// our compressed data will be trimmed, so pass width() for its
// "rowBytes", since they are the same now.
- return ctx->textureProvider()->createTexture(desc, SkBudgeted::kYes, storage.get(),
+ return ctx->textureProvider()->createTexture(desc, budgeted, storage.get(),
pixmap.width());
} else {
SkImageInfo info = SkImageInfo::MakeN32Premul(pixmap.width(), pixmap.height());
@@ -267,7 +267,7 @@ GrTexture* GrUploadPixmapToTexture(GrContext* ctx, const SkPixmap& pixmap) {
}
}
- return ctx->textureProvider()->createTexture(desc, SkBudgeted::kYes, pmap->addr(),
+ return ctx->textureProvider()->createTexture(desc, budgeted, pmap->addr(),
pmap->rowBytes());
}
« no previous file with comments | « no previous file | src/gpu/SkGrPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698