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

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

Created:
4 years, 4 months ago by cblume
Modified:
4 years, 3 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Store mipmap levels in deferred texture image This is a follow-up to https://codereview.chromium.org/2115023002/ and https://codereview.chromium.org/2034933003/ which were reverted due to an access violation and a memory leak, respectively. 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 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2242883004 Committed: https://skia.googlesource.com/skia/+/33e0cb5e7f9926b96db209c825f1eeca7c15bb16

Patch Set 1 #

Patch Set 2 : Adding no strict aliasing and some asserts. #

Total comments: 19

Patch Set 3 : Changing pointer aliases to memcpy. #

Patch Set 4 : Fixing reinterpret_cast -> static_cast. #

Patch Set 5 : Adding printf and assert comments to help me debug. #

Patch Set 6 : A few more debug printfs. #

Patch Set 7 : Are we maybe getting different params and not using mips the second time? #

Patch Set 8 : Fixing build error. #

Patch Set 9 : Printing out params info. #

Patch Set 10 : The params are different between calls. #

Patch Set 11 : Initializing the matrix. #

Patch Set 12 : Builds. #

Patch Set 13 : Removing default constructor for DeferredTextureImageUsageParams. #

Patch Set 14 : Fixing tests/ImageTest.cpp to no longer use the default ctor. #

Patch Set 15 : Removing printfs. #

Total comments: 4

Patch Set 16 : Simplifying the buffer filling. #

Patch Set 17 : Fixing opening brace location. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+416 lines, -136 lines) Patch
A gm/deferredtextureimage.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +185 lines, -0 lines 0 comments Download
D gm/deferredtextureimagedata.cpp View 1 chunk +0 lines, -81 lines 0 comments Download
M include/core/SkImage.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +5 lines, -4 lines 0 comments Download
M src/image/SkImage.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 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 15 16 6 chunks +201 lines, -39 lines 0 comments Download
M tests/ImageTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +18 lines, -11 lines 0 comments Download

Messages

Total messages: 42 (21 generated)
cblume
Pointer aliasing. BTW, we have it in other spots as well. When testing locally I ...
4 years, 4 months ago (2016-08-12 22:25:36 UTC) #3
cblume
Oh also, adding to the pointer aliasing evidence: the compiles which failed were all GCC, ...
4 years, 4 months ago (2016-08-12 23:01:04 UTC) #4
bsalomon
+mtklein. I believe our policy is to compile without --no-strict-aliasing and use SkTCast (which AFAIK ...
4 years, 4 months ago (2016-08-13 00:12:42 UTC) #6
cblume
On 2016/08/13 00:12:42, bsalomon wrote: > +mtklein. I believe our policy is to compile without ...
4 years, 4 months ago (2016-08-13 00:14:32 UTC) #7
mtklein
https://codereview.chromium.org/2242883004/diff/20001/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/2242883004/diff/20001/BUILD.gn#newcode546 BUILD.gn:546: cflags = [ "-fno-strict-aliasing" ] On 2016/08/12 22:25:35, cblume ...
4 years, 4 months ago (2016-08-14 14:06:24 UTC) #8
mtklein
> The only other way I know to fix this is to introduce an aliased ...
4 years, 4 months ago (2016-08-14 14:10:42 UTC) #9
cblume
https://codereview.chromium.org/2242883004/diff/20001/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/2242883004/diff/20001/BUILD.gn#newcode546 BUILD.gn:546: cflags = [ "-fno-strict-aliasing" ] On 2016/08/14 14:06:24, mtklein ...
4 years, 4 months ago (2016-08-15 23:39:48 UTC) #10
mtklein
https://codereview.chromium.org/2242883004/diff/20001/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/2242883004/diff/20001/BUILD.gn#newcode546 BUILD.gn:546: cflags = [ "-fno-strict-aliasing" ] > I agree. I ...
4 years, 4 months ago (2016-08-16 02:22:23 UTC) #11
cblume
https://codereview.chromium.org/2242883004/diff/20001/BUILD.gn File BUILD.gn (right): https://codereview.chromium.org/2242883004/diff/20001/BUILD.gn#newcode546 BUILD.gn:546: cflags = [ "-fno-strict-aliasing" ] On 2016/08/16 02:22:22, mtklein ...
4 years, 4 months ago (2016-08-16 03:47:19 UTC) #12
mtklein
Ah, neat, C99 defined union punning. Thanks for pointing that out.
4 years, 4 months ago (2016-08-16 12:33:38 UTC) #13
cblume
I can't seem to make it crash anymore. But the only changes I made were ...
4 years, 4 months ago (2016-08-17 16:05:33 UTC) #14
mtklein
On 2016/08/17 16:05:33, cblume wrote: > I can't seem to make it crash anymore. > ...
4 years, 4 months ago (2016-08-17 16:16:22 UTC) #15
cblume
On 2016/08/17 16:05:33, cblume wrote: > I can't seem to make it crash anymore. > ...
4 years, 4 months ago (2016-08-17 16:18:04 UTC) #16
mtklein
On 2016/08/17 16:18:04, cblume wrote: > On 2016/08/17 16:05:33, cblume wrote: > > I can't ...
4 years, 4 months ago (2016-08-17 16:19:22 UTC) #17
cblume
ericrk: PTAL at https://codereview.chromium.org/2285013003 It remove's Chrome's usage of the default ctor for DeferredTextureImageUsageParams. That ...
4 years, 3 months ago (2016-08-28 09:31:31 UTC) #28
cblume
Oh, also, the mac chromium bot will fail because the chromium change hasn't landed which ...
4 years, 3 months ago (2016-08-28 09:32:23 UTC) #29
bsalomon
https://codereview.chromium.org/2242883004/diff/270001/src/image/SkImage_Gpu.cpp File src/image/SkImage_Gpu.cpp (right): https://codereview.chromium.org/2242883004/diff/270001/src/image/SkImage_Gpu.cpp#newcode547 src/image/SkImage_Gpu.cpp:547: SkASSERT(std::is_standard_layout<DeferredTextureImage>::value); Can this be a static assert? https://codereview.chromium.org/2242883004/diff/270001/src/image/SkImage_Gpu.cpp#newcode548 src/image/SkImage_Gpu.cpp:548: ...
4 years, 3 months ago (2016-08-29 15:49:31 UTC) #32
cblume
https://codereview.chromium.org/2242883004/diff/270001/src/image/SkImage_Gpu.cpp File src/image/SkImage_Gpu.cpp (right): https://codereview.chromium.org/2242883004/diff/270001/src/image/SkImage_Gpu.cpp#newcode547 src/image/SkImage_Gpu.cpp:547: SkASSERT(std::is_standard_layout<DeferredTextureImage>::value); On 2016/08/29 15:49:31, bsalomon wrote: > Can this ...
4 years, 3 months ago (2016-08-29 21:52:58 UTC) #33
bsalomon
lgtm, minor style nit for the new class: we don't give opening parens their own ...
4 years, 3 months ago (2016-08-30 13:15:30 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2242883004/310001
4 years, 3 months ago (2016-08-30 18:49:19 UTC) #40
commit-bot: I haz the power
4 years, 3 months ago (2016-08-30 19:09:26 UTC) #42
Message was sent while issue was closed.
Committed patchset #17 (id:310001) as
https://skia.googlesource.com/skia/+/33e0cb5e7f9926b96db209c825f1eeca7c15bb16

Powered by Google App Engine
This is Rietveld 408576698