aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-03-25 11:54:32 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-25 11:54:32 -0700
commitb3c9e4faaaea99ca8c428f0cadc2945c330f1461 (patch)
treeed08910382e89937f1c4d5f43eee6828dc91d49d /src
parentd096459b2bc70c10d01f0eaffdebe6d80b83f567 (diff)
Revert of Re-enable CPU mipmap generation for Ganesh. Aniso mips were landed a while ago. However, the CPU bu… (patchset #1 id:1 of https://codereview.chromium.org/1835003002/ )
Reason for revert: Speculative - seems likely to be the results of nanobench crashes on several bots. Original issue's description: > Re-enable CPU mipmap generation for Ganesh. Aniso mips were landed a while ago. However, the CPU builder fails when it sees Index8 (among other things), so change the code to fallback to GPU in that case. Additionally, if we're going to be mipping an sRGB image, don't use the CPU code (which is not yet gamma correct). Unfortunately, this means that we will often be using the GPU path, still - with recent codec changes, most images are coming in tagged as sRGB. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1835003002 > > Committed: https://skia.googlesource.com/skia/+/b0ac1af7fab467aacbc27d20d14a09bcb960472f TBR=reed@google.com,bsalomon@google.com,cblume@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1836563002
Diffstat (limited to 'src')
-rw-r--r--src/core/SkImageCacherator.cpp5
-rw-r--r--src/gpu/GrImageIDTextureAdjuster.cpp5
-rw-r--r--src/gpu/SkGr.cpp6
3 files changed, 6 insertions, 10 deletions
diff --git a/src/core/SkImageCacherator.cpp b/src/core/SkImageCacherator.cpp
index 7b5ff22677..bb389e986b 100644
--- a/src/core/SkImageCacherator.cpp
+++ b/src/core/SkImageCacherator.cpp
@@ -303,10 +303,11 @@ GrTexture* SkImageCacherator::lockTexture(GrContext* ctx, const GrUniqueKey& key
SkBitmap bitmap;
if (this->tryLockAsBitmap(&bitmap, client, chint)) {
GrTexture* tex = nullptr;
+ // disable mipmapping until we generate anisotropic mipmap levels
+ willBeMipped = false;
if (willBeMipped) {
tex = GrGenerateMipMapsAndUploadToTexture(ctx, bitmap);
- }
- if (!tex) {
+ } else {
tex = GrUploadBitmapToTexture(ctx, bitmap);
}
if (tex) {
diff --git a/src/gpu/GrImageIDTextureAdjuster.cpp b/src/gpu/GrImageIDTextureAdjuster.cpp
index 6cfee90c14..5ba99d20de 100644
--- a/src/gpu/GrImageIDTextureAdjuster.cpp
+++ b/src/gpu/GrImageIDTextureAdjuster.cpp
@@ -90,10 +90,11 @@ GrTexture* GrBitmapTextureMaker::refOriginalTexture(bool willBeMipped) {
return tex;
}
}
+ // disable mipmapping until we generate anisotropic mipmap levels
+ willBeMipped = false;
if (willBeMipped) {
tex = GrGenerateMipMapsAndUploadToTexture(this->context(), fBitmap);
- }
- if (!tex) {
+ } else {
tex = GrUploadBitmapToTexture(this->context(), fBitmap);
}
if (tex && fOriginalKey.isValid()) {
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 71d9e620e3..701e763b1e 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -344,12 +344,6 @@ GrTexture* GrGenerateMipMapsAndUploadToTexture(GrContext* ctx, const SkBitmap& b
return texture;
}
- // SkMipMap::Build doesn't handle sRGB data correctly (yet).
- // Failover to the GL code-path for now.
- if (kLinear_SkColorProfileType != bitmap.profileType()) {
- return nullptr;
- }
-
SkASSERT(sizeof(int) <= sizeof(uint32_t));
if (bitmap.width() < 0 || bitmap.height() < 0) {
return nullptr;