aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkImageGenerator.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-10-09 09:57:35 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-11 17:11:07 +0000
commitf88c12ea2047c5ccb13613534b1794944bb233e8 (patch)
tree47e6ddc042c84d39a4578c0889ae8df41e0e53be /src/core/SkImageGenerator.cpp
parent1fc0909065d7c1d629d4c177c5cbfc0f8d9d9d88 (diff)
Add api for passing mipped hint into ImageGenerator onGenerateTexture
This does not actually add any additional functionality to the generators. Once this lands I will enable the generators one at a time to more easily monitor the effects of each one. Bug: skia: Change-Id: I382a1acfaebcbf9ad44c9873b87cdbbe02a13602 Reviewed-on: https://skia-review.googlesource.com/57083 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/core/SkImageGenerator.cpp')
-rw-r--r--src/core/SkImageGenerator.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/SkImageGenerator.cpp b/src/core/SkImageGenerator.cpp
index a3e825302b..865a718e44 100644
--- a/src/core/SkImageGenerator.cpp
+++ b/src/core/SkImageGenerator.cpp
@@ -66,17 +66,19 @@ bool SkImageGenerator::getYUV8Planes(const SkYUVSizeInfo& sizeInfo, void* planes
sk_sp<GrTextureProxy> SkImageGenerator::generateTexture(GrContext* ctx, const SkImageInfo& info,
const SkIPoint& origin,
- SkTransferFunctionBehavior behavior) {
+ SkTransferFunctionBehavior behavior,
+ bool willNeedMipMaps) {
SkIRect srcRect = SkIRect::MakeXYWH(origin.x(), origin.y(), info.width(), info.height());
if (!SkIRect::MakeWH(fInfo.width(), fInfo.height()).contains(srcRect)) {
return nullptr;
}
- return this->onGenerateTexture(ctx, info, origin, behavior);
+ return this->onGenerateTexture(ctx, info, origin, behavior, willNeedMipMaps);
}
sk_sp<GrTextureProxy> SkImageGenerator::onGenerateTexture(GrContext*, const SkImageInfo&,
const SkIPoint&,
- SkTransferFunctionBehavior) {
+ SkTransferFunctionBehavior,
+ bool willNeedMipMaps) {
return nullptr;
}
#endif