aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGr.cpp
diff options
context:
space:
mode:
authorGravatar ericrk <ericrk@chromium.org>2016-03-18 11:52:20 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-18 11:52:20 -0700
commit8bea8905e406fc1d15ef5a8294a735f3d33fb2d0 (patch)
tree697609f0fdeb14a8d9ba7a0dd5d8844b2e35e947 /src/gpu/SkGr.cpp
parent98ed14ea0524bd878afcb84e0b7d49998e723255 (diff)
Propogate SkBudgeted for NewFromDeferredTextureImageData
The budgeted flag was not propogated from NewFromDeferredTextureImageData to MakeTextureFromPixmap, resulting in the created textures always being budgeted, even when SkBudgeted::kNo was passed in. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1809663002 Review URL: https://codereview.chromium.org/1809663002
Diffstat (limited to 'src/gpu/SkGr.cpp')
-rw-r--r--src/gpu/SkGr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 1463336c49..9ab8843386 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());
}