aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrBitmapTextureMaker.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-10-23 16:05:23 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-23 20:25:59 +0000
commite252f08982b0c747cd4d34c00ce413ab1005e99a (patch)
tree1fde0a4ac30cf4dc1fc752ef39fc2a0b905be210 /src/gpu/GrBitmapTextureMaker.cpp
parent33397f279393a33eff8e32d47fc56be86b86c9bc (diff)
Add hint to SkSurface::MakeRenderTarget that we will use mips
Additionally this changed triggered a cascade of plumbing GrMipMapped down throughout Ganesh. Bug: skia: Change-Id: I4181f44d9046d66139bb491c7abf86703305aaeb Reviewed-on: https://skia-review.googlesource.com/63000 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrBitmapTextureMaker.cpp')
-rw-r--r--src/gpu/GrBitmapTextureMaker.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/GrBitmapTextureMaker.cpp b/src/gpu/GrBitmapTextureMaker.cpp
index b92ffdacd8..9b3ba36ae7 100644
--- a/src/gpu/GrBitmapTextureMaker.cpp
+++ b/src/gpu/GrBitmapTextureMaker.cpp
@@ -42,7 +42,7 @@ sk_sp<GrTextureProxy> GrBitmapTextureMaker::refOriginalTextureProxy(bool willBeM
if (fOriginalKey.isValid()) {
proxy = this->context()->resourceProvider()->findOrCreateProxyByUniqueKey(
fOriginalKey, kTopLeft_GrSurfaceOrigin);
- if (proxy && (!willBeMipped || proxy->isMipMapped())) {
+ if (proxy && (!willBeMipped || GrMipMapped::kYes == proxy->mipMapped())) {
return proxy;
}
}
@@ -61,7 +61,7 @@ sk_sp<GrTextureProxy> GrBitmapTextureMaker::refOriginalTextureProxy(bool willBeM
this->context()->resourceProvider()->assignUniqueKeyToProxy(fOriginalKey,
proxy.get());
}
- if (!willBeMipped || proxy->isMipMapped()) {
+ if (!willBeMipped || GrMipMapped::kYes == proxy->mipMapped()) {
SkASSERT(proxy->origin() == kTopLeft_GrSurfaceOrigin);
if (fOriginalKey.isValid()) {
GrInstallBitmapUniqueKeyInvalidator(fOriginalKey, fBitmap.pixelRef());
@@ -73,7 +73,7 @@ sk_sp<GrTextureProxy> GrBitmapTextureMaker::refOriginalTextureProxy(bool willBeM
if (proxy) {
SkASSERT(willBeMipped);
- SkASSERT(!proxy->isMipMapped());
+ SkASSERT(GrMipMapped::kNo == proxy->mipMapped());
// We need a mipped proxy, but we either found a proxy earlier that wasn't mipped or
// generated a non mipped proxy. Thus we generate a new mipped surface and copy the original
// proxy into the base layer. We will then let the gpu generate the rest of the mips.