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

Issue 2337803002: Don't copy image buffer when calculating size.

Created:
4 years, 3 months ago by cblume
Modified:
3 years, 10 months ago
CC:
reviews_skia.org
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Don't copy image buffer when calculating size. When we call ->refEncoded() we trigger a buffer copy, when all we really needed was to see if the data existed. BUG=646089 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2337803002

Patch Set 1 #

Total comments: 4

Patch Set 2 : Removing old comment, making code smaller. #

Patch Set 3 : Finding out which test is failing. #

Patch Set 4 : I think the cacherator test should be passing now? #

Patch Set 5 : Removing debug info. #

Total comments: 2

Patch Set 6 : Add isEncoded to SkCacherator #

Patch Set 7 : Using canGenerateTexture #

Patch Set 8 : Adding 'override' #

Total comments: 2

Patch Set 9 : Inverting comparison. Updating tests to fail iff mipped. #

Patch Set 10 : Updating tests. #

Total comments: 2

Patch Set 11 : Uploading what was sitting around. #

Patch Set 12 : Cleaning debug comments and testing. #

Patch Set 13 : Adding canGenerateTexture() override to SkImage_Gpu. #

Patch Set 14 : When no CPU work is needed, returning 0 means test expectation is false (0 == false). #

Total comments: 4

Patch Set 15 : Making SkImage_Gpu always return false. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -6 lines) Patch
M include/gpu/GrContext.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M src/core/SkImageCacherator.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download
M src/core/SkImageCacherator.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -0 lines 0 comments Download
M src/image/SkImage_Base.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M src/image/SkImage_Generator.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M src/image/SkImage_Gpu.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +12 lines, -0 lines 0 comments Download
M src/image/SkImage_Gpu.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -5 lines 0 comments Download
M tests/ImageTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 91 (55 generated)
cblume
PTAL
4 years, 3 months ago (2016-09-12 23:30:57 UTC) #3
vmpstr
https://codereview.chromium.org/2337803002/diff/1/src/image/SkImage_Gpu.cpp File src/image/SkImage_Gpu.cpp (right): https://codereview.chromium.org/2337803002/diff/1/src/image/SkImage_Gpu.cpp#newcode489 src/image/SkImage_Gpu.cpp:489: // In the future we will access the cacherator ...
4 years, 3 months ago (2016-09-12 23:35:27 UTC) #4
cblume
https://codereview.chromium.org/2337803002/diff/1/src/image/SkImage_Gpu.cpp File src/image/SkImage_Gpu.cpp (right): https://codereview.chromium.org/2337803002/diff/1/src/image/SkImage_Gpu.cpp#newcode489 src/image/SkImage_Gpu.cpp:489: // In the future we will access the cacherator ...
4 years, 3 months ago (2016-09-13 00:02:26 UTC) #5
vmpstr
non-owner lgtm
4 years, 3 months ago (2016-09-13 00:25:03 UTC) #6
bsalomon
lgtm
4 years, 3 months ago (2016-09-13 13:02:29 UTC) #7
cblume
https://codereview.chromium.org/2337803002/diff/80001/tests/ImageTest.cpp File tests/ImageTest.cpp (right): https://codereview.chromium.org/2337803002/diff/80001/tests/ImageTest.cpp#newcode898 tests/ImageTest.cpp:898: kNone_SkFilterQuality, 1, true }, I am not yet familiar ...
4 years, 3 months ago (2016-09-16 08:10:45 UTC) #18
bsalomon
https://codereview.chromium.org/2337803002/diff/80001/tests/ImageTest.cpp File tests/ImageTest.cpp (right): https://codereview.chromium.org/2337803002/diff/80001/tests/ImageTest.cpp#newcode898 tests/ImageTest.cpp:898: kNone_SkFilterQuality, 1, true }, On 2016/09/16 08:10:45, cblume wrote: ...
4 years, 3 months ago (2016-09-16 13:23:49 UTC) #21
cblume
On 2016/09/16 13:23:49, bsalomon wrote: > https://codereview.chromium.org/2337803002/diff/80001/tests/ImageTest.cpp > File tests/ImageTest.cpp (right): > > https://codereview.chromium.org/2337803002/diff/80001/tests/ImageTest.cpp#newcode898 > ...
4 years, 3 months ago (2016-09-16 20:59:39 UTC) #22
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/2337803002/80001
4 years, 3 months ago (2016-09-24 01:17:30 UTC) #25
cblume
On 2016/09/24 01:17:30, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
4 years, 2 months ago (2016-09-24 06:50:26 UTC) #27
vmpstr
On 2016/09/24 06:50:26, cblume wrote: > On 2016/09/24 01:17:30, commit-bot: I haz the power wrote: ...
4 years, 2 months ago (2016-10-19 18:47:42 UTC) #28
bsalomon
On 2016/10/19 18:47:42, vmpstr wrote: > On 2016/09/24 06:50:26, cblume wrote: > > On 2016/09/24 ...
4 years, 2 months ago (2016-10-19 21:36:40 UTC) #29
cblume
On 2016/10/19 21:36:40, bsalomon wrote: > On 2016/10/19 18:47:42, vmpstr wrote: > > On 2016/09/24 ...
4 years, 2 months ago (2016-10-20 09:29:49 UTC) #30
cblume
PTAL This is now the 3rd patch in a 3-patch set. The first is https://chromiumcodereview.appspot.com/2434323002/ ...
4 years, 2 months ago (2016-10-20 19:24:43 UTC) #31
cblume
Rather than create isEncoded(), it was proposed we create canGenerateTexture(). That landed here: https://skia-review.googlesource.com/c/3780/ This ...
4 years, 2 months ago (2016-10-23 09:24:29 UTC) #34
cblume
On 2016/10/23 09:24:29, cblume wrote: > Rather than create isEncoded(), it was proposed we create ...
4 years, 2 months ago (2016-10-23 10:11:17 UTC) #41
reed1
4 years, 1 month ago (2016-10-24 13:05:25 UTC) #43
reed1
https://codereview.chromium.org/2337803002/diff/140001/src/image/SkImage_Gpu.cpp File src/image/SkImage_Gpu.cpp (right): https://codereview.chromium.org/2337803002/diff/140001/src/image/SkImage_Gpu.cpp#newcode488 src/image/SkImage_Gpu.cpp:488: if (!as_IB(this)->canGenerateTexture(proxy)) { Is the predicate reversed here? If ...
4 years, 1 month ago (2016-10-24 13:42:00 UTC) #44
bsalomon
On 2016/10/24 13:42:00, reed1 wrote: > https://codereview.chromium.org/2337803002/diff/140001/src/image/SkImage_Gpu.cpp > File src/image/SkImage_Gpu.cpp (right): > > https://codereview.chromium.org/2337803002/diff/140001/src/image/SkImage_Gpu.cpp#newcode488 > ...
4 years, 1 month ago (2016-10-24 13:53:05 UTC) #45
bsalomon
On 2016/10/24 13:53:05, bsalomon wrote: > On 2016/10/24 13:42:00, reed1 wrote: > > > https://codereview.chromium.org/2337803002/diff/140001/src/image/SkImage_Gpu.cpp ...
4 years, 1 month ago (2016-10-24 13:55:35 UTC) #46
bsalomon
Mike points out that unit test for this function currently expects a cpu-memory, but not ...
4 years, 1 month ago (2016-10-24 14:07:02 UTC) #47
cblume
https://codereview.chromium.org/2337803002/diff/140001/src/image/SkImage_Gpu.cpp File src/image/SkImage_Gpu.cpp (right): https://codereview.chromium.org/2337803002/diff/140001/src/image/SkImage_Gpu.cpp#newcode488 src/image/SkImage_Gpu.cpp:488: if (!as_IB(this)->canGenerateTexture(proxy)) { On 2016/10/24 13:42:00, reed1 wrote: > ...
4 years, 1 month ago (2016-10-25 02:51:01 UTC) #56
cblume
On 2016/10/25 02:51:01, cblume wrote: > https://codereview.chromium.org/2337803002/diff/140001/src/image/SkImage_Gpu.cpp > File src/image/SkImage_Gpu.cpp (right): > > https://codereview.chromium.org/2337803002/diff/140001/src/image/SkImage_Gpu.cpp#newcode488 > ...
4 years, 1 month ago (2016-10-25 10:08:19 UTC) #57
cblume
+Eric. I'm not sure why I didn't add him from the get go.
4 years, 1 month ago (2016-10-25 17:39:46 UTC) #59
ericrk
non-owner LGTM
4 years, 1 month ago (2016-10-25 18:20:55 UTC) #60
bsalomon
https://codereview.chromium.org/2337803002/diff/180001/tests/ImageTest.cpp File tests/ImageTest.cpp (right): https://codereview.chromium.org/2337803002/diff/180001/tests/ImageTest.cpp#newcode922 tests/ImageTest.cpp:922: sk_sp<SkImage> otherContextImage = create_gpu_image(otherContextInfo.grContext()); On 2016/10/25 02:51:01, cblume wrote: ...
4 years, 1 month ago (2016-10-25 18:27:15 UTC) #61
cblume
message: On 2016/10/25 18:27:15, bsalomon wrote: > I think this one should still be false, ...
4 years, 1 month ago (2016-10-25 21:52:06 UTC) #62
bsalomon
On 2016/10/25 21:52:06, cblume wrote: > message: On 2016/10/25 18:27:15, bsalomon wrote: > > I ...
4 years, 1 month ago (2016-10-27 13:32:42 UTC) #63
cblume
On 2016/10/24 14:07:02, bsalomon wrote: > Mike points out that unit test for this function ...
4 years, 1 month ago (2016-11-14 02:31:53 UTC) #70
bsalomon
On 2016/11/14 02:31:53, cblume wrote: > On 2016/10/24 14:07:02, bsalomon wrote: > > Mike points ...
4 years, 1 month ago (2016-11-14 14:04:30 UTC) #73
cblume
This is currently erroring because two textures have different pixel values. The image obtained from ...
4 years, 1 month ago (2016-11-16 01:07:16 UTC) #82
cblume
On 2016/11/16 01:07:16, cblume wrote: > This is currently erroring because two textures have different ...
4 years, 1 month ago (2016-11-17 21:42:20 UTC) #83
ericrk
On 2016/11/17 21:42:20, cblume wrote: > On 2016/11/16 01:07:16, cblume wrote: > > This is ...
4 years, 1 month ago (2016-11-17 21:54:43 UTC) #84
bsalomon
On 2016/11/17 21:42:20, cblume wrote: > On 2016/11/16 01:07:16, cblume wrote: > > This is ...
4 years, 1 month ago (2016-11-17 21:55:23 UTC) #85
vmpstr
ping! :) What are the next steps on this CL?
3 years, 10 months ago (2017-02-01 21:02:17 UTC) #90
cblume
3 years, 10 months ago (2017-02-01 21:28:15 UTC) #91
On 2017/02/01 21:02:17, vmpstr wrote:
> ping! :) What are the next steps on this CL?

I put this on the backburner to focus on my OKRs. I had my priorities flipped.

I've lost the mental context for this bug and will have to build it up again to
answer. I'll do that once I wrap up my current task.

Powered by Google App Engine
This is Rietveld 408576698