Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1238)

Issue 2034933003: Store mipmap levels in deferred texture image (Closed)

Created:
4 years, 6 months ago by cblume
Modified:
4 years, 6 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@pipe-mipmap-levels-to-creation
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

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 Committed: https://skia.googlesource.com/skia/+/b3105190a6e02d37f1d7f07a3a8bdd368ec7f157

Patch Set 1 #

Patch Set 2 : Keeping support for non-mipmapped images the same. #

Total comments: 6

Patch Set 3 : Code review comments & fixing build on VC. #

Total comments: 10

Patch Set 4 : Addressing CR comments. #

Total comments: 8

Patch Set 5 : Fixing comments. #

Patch Set 6 : Adding gm test. #

Patch Set 7 : Adding the ability to respect gamma. #

Patch Set 8 : Making the new parameter a default so the roll into Chrome won't break. #

Patch Set 9 : Fixing Windows build. #

Total comments: 9

Patch Set 10 : Code review comments -- style #

Patch Set 11 : Rebasing and refactoring. #

Total comments: 2

Patch Set 12 : Storing the gamma treatment in the deferred texture image. #

Total comments: 5

Patch Set 13 : Using scaled size. #

Patch Set 14 : Another scaled image. #

Patch Set 15 : Using scaled size. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -14 lines) Patch
A gm/deferredtextureimage.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +117 lines, -0 lines 0 comments Download
M include/core/SkImage.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -2 lines 0 comments Download
M src/image/SkImage.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +7 lines, -1 line 0 comments Download
M src/image/SkImage_Gpu.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 chunks +99 lines, -7 lines 0 comments Download
M tests/ImageTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -4 lines 0 comments Download

Messages

Total messages: 92 (34 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2034933003/1
4 years, 6 months ago (2016-06-03 08:59:54 UTC) #3
cblume
PTAL
4 years, 6 months ago (2016-06-03 09:00:07 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Win-MSVC-x86-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86-Debug-Trybot/builds/8926)
4 years, 6 months ago (2016-06-03 09:08:22 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2034933003/20001
4 years, 6 months ago (2016-06-03 09:12:41 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_64-Debug-Trybot/builds/8958)
4 years, 6 months ago (2016-06-03 09:20:11 UTC) #10
bsalomon
https://codereview.chromium.org/2034933003/diff/20001/src/image/SkImage.cpp File src/image/SkImage.cpp (right): https://codereview.chromium.org/2034933003/diff/20001/src/image/SkImage.cpp#newcode398 src/image/SkImage.cpp:398: sk_sp<SkImage> MakeTextureFromMipMap(GrContext*, const SkImageInfo&, const GrMipLevel* texels, This is ...
4 years, 6 months ago (2016-06-03 14:43:33 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/40001
4 years, 6 months ago (2016-06-03 17:03:33 UTC) #13
cblume
https://codereview.chromium.org/2034933003/diff/20001/src/image/SkImage.cpp File src/image/SkImage.cpp (right): https://codereview.chromium.org/2034933003/diff/20001/src/image/SkImage.cpp#newcode398 src/image/SkImage.cpp:398: sk_sp<SkImage> MakeTextureFromMipMap(GrContext*, const SkImageInfo&, const GrMipLevel* texels, On 2016/06/03 ...
4 years, 6 months ago (2016-06-03 17:03:41 UTC) #14
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-03 17:25:05 UTC) #16
ericrk
https://codereview.chromium.org/2034933003/diff/40001/src/image/SkImage_Gpu.cpp File src/image/SkImage_Gpu.cpp (right): https://codereview.chromium.org/2034933003/diff/40001/src/image/SkImage_Gpu.cpp#newcode396 src/image/SkImage_Gpu.cpp:396: int mipMapLevelCount = 1; This is a bit misleading ...
4 years, 6 months ago (2016-06-03 18:05:45 UTC) #18
bsalomon
Seems like we should have a GM test that creates a SkImage using this API ...
4 years, 6 months ago (2016-06-03 18:49:37 UTC) #19
cblume
On 2016/06/03 18:49:37, bsalomon wrote: > Seems like we should have a GM test that ...
4 years, 6 months ago (2016-06-03 18:57:31 UTC) #20
bsalomon
On 2016/06/03 18:57:31, cblume wrote: > On 2016/06/03 18:49:37, bsalomon wrote: > > Seems like ...
4 years, 6 months ago (2016-06-03 19:04:00 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/60001
4 years, 6 months ago (2016-06-06 22:42:44 UTC) #23
cblume
I believe I have addressed the comments. I will add a GM test in a ...
4 years, 6 months ago (2016-06-06 22:44:00 UTC) #24
ericrk
On 2016/06/06 22:44:00, cblume wrote: > I believe I have addressed the comments. > > ...
4 years, 6 months ago (2016-06-06 22:57:15 UTC) #25
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-06 22:57:35 UTC) #27
ericrk
Thanks for fixing things up. Looks really close! https://codereview.chromium.org/2034933003/diff/60001/src/image/SkImage_Gpu.cpp File src/image/SkImage_Gpu.cpp (right): https://codereview.chromium.org/2034933003/diff/60001/src/image/SkImage_Gpu.cpp#newcode368 src/image/SkImage_Gpu.cpp:368: if ...
4 years, 6 months ago (2016-06-06 22:57:40 UTC) #28
cblume
bsalomon - I looked through a handful of the tests in gm/ . Do you ...
4 years, 6 months ago (2016-06-08 17:50:33 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/80001
4 years, 6 months ago (2016-06-08 17:50:55 UTC) #31
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot/builds/8948)
4 years, 6 months ago (2016-06-08 17:57:26 UTC) #33
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/120001
4 years, 6 months ago (2016-06-12 13:35:10 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/140001
4 years, 6 months ago (2016-06-12 13:42:20 UTC) #37
cblume
GM test added. I will merge it with Eric's patch once that lands, since I ...
4 years, 6 months ago (2016-06-12 13:43:47 UTC) #38
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_64-Debug-Trybot/builds/9149)
4 years, 6 months ago (2016-06-12 13:52:31 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/160001
4 years, 6 months ago (2016-06-12 18:40:21 UTC) #42
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-12 18:53:33 UTC) #44
bsalomon
https://codereview.chromium.org/2034933003/diff/160001/gm/deferredtextureimage.cpp File gm/deferredtextureimage.cpp (right): https://codereview.chromium.org/2034933003/diff/160001/gm/deferredtextureimage.cpp#newcode2 gm/deferredtextureimage.cpp:2: * Copyright 2015 Google Inc. 2016 https://codereview.chromium.org/2034933003/diff/160001/gm/deferredtextureimage.cpp#newcode42 gm/deferredtextureimage.cpp:42: params[0].fQuality ...
4 years, 6 months ago (2016-06-13 14:11:39 UTC) #46
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/180001
4 years, 6 months ago (2016-06-13 18:16:02 UTC) #48
cblume
https://codereview.chromium.org/2034933003/diff/160001/gm/deferredtextureimage.cpp File gm/deferredtextureimage.cpp (right): https://codereview.chromium.org/2034933003/diff/160001/gm/deferredtextureimage.cpp#newcode2 gm/deferredtextureimage.cpp:2: * Copyright 2015 Google Inc. On 2016/06/13 14:11:39, bsalomon ...
4 years, 6 months ago (2016-06-13 18:17:16 UTC) #49
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot/builds/9050) Build-Win-MSVC-x86-Debug-Trybot on ...
4 years, 6 months ago (2016-06-13 18:19:52 UTC) #51
Brian Osman
https://codereview.chromium.org/2034933003/diff/160001/include/core/SkImage.h File include/core/SkImage.h (right): https://codereview.chromium.org/2034933003/diff/160001/include/core/SkImage.h#newcode383 include/core/SkImage.h:383: SkSourceGammaTreatment treatment = On 2016/06/13 14:11:39, bsalomon wrote: > ...
4 years, 6 months ago (2016-06-13 18:22:09 UTC) #52
cblume
On 2016/06/13 18:22:09, Brian Osman wrote: > https://codereview.chromium.org/2034933003/diff/160001/include/core/SkImage.h > File include/core/SkImage.h (right): > > https://codereview.chromium.org/2034933003/diff/160001/include/core/SkImage.h#newcode383 ...
4 years, 6 months ago (2016-06-13 20:39:48 UTC) #53
cblume
On 2016/06/13 20:39:48, cblume wrote: > On 2016/06/13 18:22:09, Brian Osman wrote: > > https://codereview.chromium.org/2034933003/diff/160001/include/core/SkImage.h ...
4 years, 6 months ago (2016-06-13 20:44:38 UTC) #54
bsalomon
On 2016/06/13 20:39:48, cblume wrote: > On 2016/06/13 18:22:09, Brian Osman wrote: > > https://codereview.chromium.org/2034933003/diff/160001/include/core/SkImage.h ...
4 years, 6 months ago (2016-06-13 20:47:16 UTC) #55
cblume
On 2016/06/13 20:47:16, bsalomon wrote: > On 2016/06/13 20:39:48, cblume wrote: > > On 2016/06/13 ...
4 years, 6 months ago (2016-06-13 20:54:27 UTC) #56
Brian Osman
On 2016/06/13 20:54:27, cblume wrote: > On 2016/06/13 20:47:16, bsalomon wrote: > > On 2016/06/13 ...
4 years, 6 months ago (2016-06-13 21:13:08 UTC) #57
cblume
> Yes. The big piece that may not be obvious here: Skia handles this by ...
4 years, 6 months ago (2016-06-13 21:42:39 UTC) #58
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/200001
4 years, 6 months ago (2016-06-14 01:40:00 UTC) #60
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Ubuntu-Clang-x86_64-Debug-Trybot on client.skia.compile (JOB_TIMED_OUT, no build URL) ...
4 years, 6 months ago (2016-06-14 03:40:26 UTC) #62
Brian Osman
https://codereview.chromium.org/2034933003/diff/200001/src/image/SkImage_Gpu.cpp File src/image/SkImage_Gpu.cpp (right): https://codereview.chromium.org/2034933003/diff/200001/src/image/SkImage_Gpu.cpp#newcode629 src/image/SkImage_Gpu.cpp:629: return sk_make_sp<SkImage_Gpu>(texture->width(), texture->height(), kNeedNewImageUniqueID, FYI: Ganesh needs to know ...
4 years, 6 months ago (2016-06-14 12:10:51 UTC) #63
cblume
https://codereview.chromium.org/2034933003/diff/200001/src/image/SkImage_Gpu.cpp File src/image/SkImage_Gpu.cpp (right): https://codereview.chromium.org/2034933003/diff/200001/src/image/SkImage_Gpu.cpp#newcode629 src/image/SkImage_Gpu.cpp:629: return sk_make_sp<SkImage_Gpu>(texture->width(), texture->height(), kNeedNewImageUniqueID, On 2016/06/14 12:10:51, Brian Osman ...
4 years, 6 months ago (2016-06-14 20:44:29 UTC) #64
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/220001
4 years, 6 months ago (2016-06-14 20:44:47 UTC) #66
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-14 21:37:04 UTC) #68
cblume
ping
4 years, 6 months ago (2016-06-16 05:59:48 UTC) #69
ericrk
One comment, otherwise LGTM. You'll need LGTM from Skia team as well. https://codereview.chromium.org/2034933003/diff/220001/src/image/SkImage_Gpu.cpp File src/image/SkImage_Gpu.cpp ...
4 years, 6 months ago (2016-06-17 22:41:54 UTC) #70
bsalomon
On 2016/06/17 22:41:54, ericrk wrote: > One comment, otherwise LGTM. > > You'll need LGTM ...
4 years, 6 months ago (2016-06-20 14:03:41 UTC) #71
cblume
https://codereview.chromium.org/2034933003/diff/220001/src/image/SkImage_Gpu.cpp File src/image/SkImage_Gpu.cpp (right): https://codereview.chromium.org/2034933003/diff/220001/src/image/SkImage_Gpu.cpp#newcode493 src/image/SkImage_Gpu.cpp:493: mipMapLevelCount = SkMipMap::ComputeLevelCount(width(), height()) + 1; On 2016/06/17 22:41:54, ...
4 years, 6 months ago (2016-06-20 18:51:02 UTC) #72
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/240001
4 years, 6 months ago (2016-06-20 18:51:26 UTC) #74
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-20 19:06:34 UTC) #76
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/260001
4 years, 6 months ago (2016-06-21 00:13:57 UTC) #79
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release-Trybot/builds/4258)
4 years, 6 months ago (2016-06-21 00:25:13 UTC) #81
cblume
https://codereview.chromium.org/2034933003/diff/220001/src/image/SkImage_Gpu.cpp File src/image/SkImage_Gpu.cpp (right): https://codereview.chromium.org/2034933003/diff/220001/src/image/SkImage_Gpu.cpp#newcode493 src/image/SkImage_Gpu.cpp:493: mipMapLevelCount = SkMipMap::ComputeLevelCount(width(), height()) + 1; On 2016/06/20 18:51:02, ...
4 years, 6 months ago (2016-06-21 10:37:53 UTC) #82
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/280001
4 years, 6 months ago (2016-06-21 19:19:43 UTC) #85
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot/builds/9208) Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on client.skia (JOB_FAILED, ...
4 years, 6 months ago (2016-06-21 19:26:55 UTC) #87
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2034933003/280001
4 years, 6 months ago (2016-06-21 20:27:36 UTC) #89
commit-bot: I haz the power
Committed patchset #15 (id:280001) as https://skia.googlesource.com/skia/+/b3105190a6e02d37f1d7f07a3a8bdd368ec7f157
4 years, 6 months ago (2016-06-21 20:43:19 UTC) #91
Brian Osman
4 years, 6 months ago (2016-06-22 14:09:54 UTC) #92
Message was sent while issue was closed.
A revert of this CL (patchset #15 id:280001) has been created in
https://codereview.chromium.org/2083393002/ by brianosman@google.com.

The reason for reverting is: Crashes on a few different bots (including ASAN).
Examples:

https://build.chromium.org/p/client.skia.android/builders/Test-Android-GCC-Ne...
https://build.chromium.org/p/client.skia/builders/Test-iOS-Clang-iPad4-GPU-SG...
https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-Golo-GPU-GT....

Powered by Google App Engine
This is Rietveld 408576698