aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar cblume <cblume@chromium.org>2016-06-21 13:43:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-21 13:43:13 -0700
commitb3105190a6e02d37f1d7f07a3a8bdd368ec7f157 (patch)
tree7986b6853142307ec9e3ef8998f0aff34830c6fa /include/core
parent79b15f60f4e5893cf93d20e3f0bd6ae6560e1351 (diff)
Store mipmap levels in deferred texture image
When creating the deferred texture image, detect if using medium / high quality. If so, generate and store mipmaps in the deferred texture image. When creating a texture from that be sure to read it back out. BUG=578304 R=bsalomon@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2034933003 Review-Url: https://codereview.chromium.org/2034933003
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkImage.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index c9c5668460..b373e30fa7 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -384,7 +384,9 @@ public:
size_t getDeferredTextureImageData(const GrContextThreadSafeProxy&,
const DeferredTextureImageUsageParams[],
int paramCnt,
- void* buffer) const;
+ void* buffer,
+ SkSourceGammaTreatment treatment =
+ SkSourceGammaTreatment::kIgnore) const;
/**
* Returns a texture-backed image from data produced in SkImage::getDeferredTextureImageData.
@@ -459,7 +461,7 @@ protected:
private:
static sk_sp<SkImage> MakeTextureFromMipMap(GrContext*, const SkImageInfo&,
const GrMipLevel* texels, int mipLevelCount,
- SkBudgeted);
+ SkBudgeted, SkSourceGammaTreatment);
const int fWidth;
const int fHeight;