aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-09-28 20:46:45 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-28 20:46:53 +0000
commit8b059bd946d9f14607f6d2e8b966267dd8e5a54d (patch)
tree0e88e6107bf964705c85cdead1a95f082a1d7e61 /src/image
parent4b050009067044ad9352d26013c10991bda38f91 (diff)
Revert "Update GrBitmapTextureMaker for handling mipped requests"
This reverts commit d1935c16e889b6707a522f711e79c75353caa343. Reason for revert: breaking lots of GMs, especially on gles Original change's description: > Update GrBitmapTextureMaker for handling mipped requests > > Specifically this updates the case when we are requesting to use mip > maps but there is already an unmipped version in the cache. Previously > we just grabbed the unmipped. > > Now we will create a new mipped resource. Upload the cpu data to all > the levels besides the base, copy the base level on GPU from the > original resource to the mipped one. Then the mipped resource will > take over the originals unique key. > > Bug: skia: > Change-Id: I38e9725c93280dc2460a0be8a7a229e7f20e1614 > Reviewed-on: https://skia-review.googlesource.com/43840 > Commit-Queue: Greg Daniel <egdaniel@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=egdaniel@google.com,robertphillips@google.com,brianosman@google.com Change-Id: Id82e8b6e8ab69e46ff018bb07ae5d1f6ea8d7e76 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/52901 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/image')
-rw-r--r--src/image/SkImage_Gpu.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index 356b800e83..d3a1865039 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -922,13 +922,6 @@ sk_sp<SkImage> SkImage::MakeTextureFromMipMap(GrContext* ctx, const SkImageInfo&
if (!ctx) {
return nullptr;
}
- // For images where the client is passing the mip data we require that all the mip levels have
- // valid data.
- for (int i = 0; i < mipLevelCount; ++i) {
- if (!texels[i].fPixels) {
- return nullptr;
- }
- }
sk_sp<GrTextureProxy> proxy(GrUploadMipMapToTextureProxy(ctx, info, texels, mipLevelCount,
colorMode));
if (!proxy) {