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

Issue 388953002: Improving GestureNav screenshotting performance - Part 1 - gl_helper (Closed)

Created:
6 years, 5 months ago by mfomitchev
Modified:
6 years, 3 months ago
Reviewers:
danakj, hubbe, no sievers
CC:
chromium-reviews, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Improving GestureNav screenshotting performance - Part 1 - gl_helper Pixel readback in GL_RGBA format can be a very expensive operation on some hardware configurations. Adding support for kAlpha_8_SkColorType to CropScaleReadbackAndCleanTexture(). For this color type, the texture is converted to grayscale on the GPU and then read back using GL_BGRA_EXT format. This improves the readback performance because we read four times less data and we don't have to do any format conversions as we are reading. Original review: https://codereview.chromium.org/384453002/ Part 2: https://codereview.chromium.org/389683002/ BUG=379983, 380779 Committed: https://crrev.com/a73ebd2e88a5a0e310d9741d56129827195afa27 Cr-Commit-Position: refs/heads/master@{#291768}

Patch Set 1 #

Patch Set 2 : Minor change #

Total comments: 13

Patch Set 3 : Addressing review feedback. #

Patch Set 4 : Removing unwanted change. #

Total comments: 4

Patch Set 5 : Rebase and cleanup. #

Patch Set 6 : Unit Test for CropScaleReadbackAndCleanTexture #

Total comments: 40

Patch Set 7 : Addressing review feedback + git cl format #

Patch Set 8 : Addressing review feedback - pt. 2 #

Patch Set 9 : git cl format #

Total comments: 2

Patch Set 10 : Zero error tolerance for no-scale/no-transform scenarios. #

Patch Set 11 : Adding consts for YUV test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+488 lines, -116 lines) Patch
M content/common/gpu/client/gl_helper.h View 3 chunks +6 lines, -6 lines 0 comments Download
M content/common/gpu/client/gl_helper.cc View 1 2 3 4 5 6 7 9 chunks +151 lines, -32 lines 0 comments Download
M content/common/gpu/client/gl_helper_unittest.cc View 1 2 3 4 5 6 7 8 9 10 14 chunks +331 lines, -78 lines 0 comments Download

Messages

Total messages: 40 (0 generated)
mfomitchev
I was thinking about declaring A8 as the "supported" color type in gl helper. I ...
6 years, 5 months ago (2014-07-11 19:53:08 UTC) #1
mfomitchev
https://codereview.chromium.org/388953002/diff/20001/content/common/gpu/client/gl_helper.cc File content/common/gpu/client/gl_helper.cc (right): https://codereview.chromium.org/388953002/diff/20001/content/common/gpu/client/gl_helper.cc#newcode427 content/common/gpu/client/gl_helper.cc:427: GLuint dst_texture = 1u; Should we set the id ...
6 years, 5 months ago (2014-07-11 20:21:33 UTC) #2
mfomitchev
sievers@chromium.org: Can you please take a look? danakj started reviewing this change, but she is ...
6 years, 5 months ago (2014-07-15 15:33:13 UTC) #3
no sievers
https://codereview.chromium.org/388953002/diff/20001/content/common/gpu/client/gl_helper.cc File content/common/gpu/client/gl_helper.cc (right): https://codereview.chromium.org/388953002/diff/20001/content/common/gpu/client/gl_helper.cc#newcode423 content/common/gpu/client/gl_helper.cc:423: const gfx::Rect& src_subrect, |src_subrect| is ignored below? https://codereview.chromium.org/388953002/diff/20001/content/common/gpu/client/gl_helper.cc#newcode427 content/common/gpu/client/gl_helper.cc:427: ...
6 years, 5 months ago (2014-07-15 19:31:49 UTC) #4
mfomitchev
@sievers: Thanks for the quick review! I'll make the changes. Can you please comment re ...
6 years, 5 months ago (2014-07-15 19:55:21 UTC) #5
hubbe
https://codereview.chromium.org/388953002/diff/20001/content/common/gpu/client/gl_helper.cc File content/common/gpu/client/gl_helper.cc (right): https://codereview.chromium.org/388953002/diff/20001/content/common/gpu/client/gl_helper.cc#newcode555 content/common/gpu/client/gl_helper.cc:555: TransformTextureToGrayscale(texture, src_size, src_subrect, swizzle); On 2014/07/15 19:31:49, sievers wrote: ...
6 years, 5 months ago (2014-07-15 21:05:57 UTC) #6
no sievers
On 2014/07/15 19:55:21, mfomitchev wrote: > @sievers: Thanks for the quick review! I'll make the ...
6 years, 5 months ago (2014-07-15 21:19:34 UTC) #7
mfomitchev
> Right now 'IsReadbackConfigSupported(fmt)' means whether glReadPixels() is > supported, given the format of the ...
6 years, 5 months ago (2014-07-15 21:37:36 UTC) #8
no sievers
On 2014/07/15 21:37:36, mfomitchev wrote: > > Right now 'IsReadbackConfigSupported(fmt)' means whether glReadPixels() is > ...
6 years, 5 months ago (2014-07-15 22:02:38 UTC) #9
mfomitchev
On 2014/07/15 22:02:38, sievers wrote: > On 2014/07/15 21:37:36, mfomitchev wrote: > > > Right ...
6 years, 5 months ago (2014-07-15 23:02:56 UTC) #10
no sievers
On 2014/07/15 23:02:56, mfomitchev wrote: > On 2014/07/15 22:02:38, sievers wrote: > > On 2014/07/15 ...
6 years, 5 months ago (2014-07-15 23:06:12 UTC) #11
mfomitchev
https://codereview.chromium.org/388953002/diff/20001/content/common/gpu/client/gl_helper.cc File content/common/gpu/client/gl_helper.cc (right): https://codereview.chromium.org/388953002/diff/20001/content/common/gpu/client/gl_helper.cc#newcode423 content/common/gpu/client/gl_helper.cc:423: const gfx::Rect& src_subrect, On 2014/07/15 19:31:49, sievers wrote: > ...
6 years, 5 months ago (2014-07-16 19:16:07 UTC) #12
no sievers
Looks good, I find it hard to wrap my head around all the swizzling involved ...
6 years, 5 months ago (2014-07-18 19:27:13 UTC) #13
mfomitchev
https://codereview.chromium.org/388953002/diff/60001/content/common/gpu/client/gl_helper.cc File content/common/gpu/client/gl_helper.cc (right): https://codereview.chromium.org/388953002/diff/60001/content/common/gpu/client/gl_helper.cc#newcode449 content/common/gpu/client/gl_helper.cc:449: GL_BGRA_EXT, I am getting the same result regardless of ...
6 years, 4 months ago (2014-08-12 21:52:04 UTC) #14
mfomitchev
6 years, 4 months ago (2014-08-12 21:52:06 UTC) #15
mfomitchev
@hubbe: You've made a point in crbug.com/379983 that readbacks should happen using GL_BGRA_EXT to ensure ...
6 years, 4 months ago (2014-08-13 18:05:26 UTC) #16
mfomitchev
@sievers: The unit test is ready - can you please take another look? Thanks!
6 years, 4 months ago (2014-08-20 15:30:56 UTC) #17
hubbe
On 2014/08/13 18:05:26, mfomitchev_OOO_Aug16-24 wrote: > @hubbe: You've made a point in crbug.com/379983 that readbacks ...
6 years, 4 months ago (2014-08-20 16:54:58 UTC) #18
no sievers
https://codereview.chromium.org/388953002/diff/100001/content/common/gpu/client/gl_helper.cc File content/common/gpu/client/gl_helper.cc (right): https://codereview.chromium.org/388953002/diff/100001/content/common/gpu/client/gl_helper.cc#newcode521 content/common/gpu/client/gl_helper.cc:521: readback_color_type = kN32_SkColorType; I don't think it makes sense ...
6 years, 4 months ago (2014-08-20 20:29:53 UTC) #19
mfomitchev
https://codereview.chromium.org/388953002/diff/100001/content/common/gpu/client/gl_helper.cc File content/common/gpu/client/gl_helper.cc (right): https://codereview.chromium.org/388953002/diff/100001/content/common/gpu/client/gl_helper.cc#newcode521 content/common/gpu/client/gl_helper.cc:521: readback_color_type = kN32_SkColorType; GetReadbackConfig() returns the readback format. hubbe@ ...
6 years, 4 months ago (2014-08-22 18:01:34 UTC) #20
no sievers
https://codereview.chromium.org/388953002/diff/100001/content/common/gpu/client/gl_helper.cc File content/common/gpu/client/gl_helper.cc (right): https://codereview.chromium.org/388953002/diff/100001/content/common/gpu/client/gl_helper.cc#newcode521 content/common/gpu/client/gl_helper.cc:521: readback_color_type = kN32_SkColorType; On 2014/08/22 18:01:33, mfomitchev_OOO_Aug16-24 wrote: > ...
6 years, 4 months ago (2014-08-22 18:44:13 UTC) #21
hubbe
https://codereview.chromium.org/388953002/diff/100001/content/common/gpu/client/gl_helper.cc File content/common/gpu/client/gl_helper.cc (right): https://codereview.chromium.org/388953002/diff/100001/content/common/gpu/client/gl_helper.cc#newcode521 content/common/gpu/client/gl_helper.cc:521: readback_color_type = kN32_SkColorType; The reason reading back as BGRA ...
6 years, 4 months ago (2014-08-22 19:19:20 UTC) #22
chromium-reviews
On Fri, Aug 22, 2014 at 12:19 PM, <hubbe@chromium.org> wrote: > > https://codereview.chromium.org/388953002/diff/100001/ > content/common/gpu/client/gl_helper.cc ...
6 years, 4 months ago (2014-08-22 20:27:04 UTC) #23
no sievers
https://codereview.chromium.org/388953002/diff/100001/content/common/gpu/client/gl_helper.cc File content/common/gpu/client/gl_helper.cc (right): https://codereview.chromium.org/388953002/diff/100001/content/common/gpu/client/gl_helper.cc#newcode521 content/common/gpu/client/gl_helper.cc:521: readback_color_type = kN32_SkColorType; On 2014/08/22 19:19:20, hubbe wrote: > ...
6 years, 4 months ago (2014-08-22 20:54:48 UTC) #24
no sievers
On 2014/08/22 20:54:48, sievers wrote: > https://codereview.chromium.org/388953002/diff/100001/content/common/gpu/client/gl_helper.cc > File content/common/gpu/client/gl_helper.cc (right): > > https://codereview.chromium.org/388953002/diff/100001/content/common/gpu/client/gl_helper.cc#newcode521 > ...
6 years, 4 months ago (2014-08-22 20:56:11 UTC) #25
chromium-reviews
On Fri, Aug 22, 2014 at 1:56 PM, <sievers@chromium.org> wrote: > On 2014/08/22 20:54:48, sievers ...
6 years, 4 months ago (2014-08-22 21:05:38 UTC) #26
mfomitchev
Ok, this makes sense for the case when out_color_type is A8. Now consider the case ...
6 years, 4 months ago (2014-08-24 21:39:31 UTC) #27
no sievers
On 2014/08/24 21:39:31, mfomitchev_OOO_Aug16-24 wrote: > Ok, this makes sense for the case when out_color_type ...
6 years, 4 months ago (2014-08-25 17:48:22 UTC) #28
mfomitchev
On 2014/08/25 17:48:22, sievers wrote: > On 2014/08/24 21:39:31, mfomitchev_OOO_Aug16-24 wrote: > > Ok, this ...
6 years, 4 months ago (2014-08-25 17:58:22 UTC) #29
no sievers
On 2014/08/25 17:58:22, mfomitchev_OOO_Aug16-24 wrote: > On 2014/08/25 17:48:22, sievers wrote: > > On 2014/08/24 ...
6 years, 4 months ago (2014-08-25 18:49:15 UTC) #30
mfomitchev
Ok, sounds good re separate bug. Just a couple points: > If you ask CropScaleAndReadbackTexture() ...
6 years, 4 months ago (2014-08-25 19:16:14 UTC) #31
mfomitchev
https://codereview.chromium.org/388953002/diff/100001/content/common/gpu/client/gl_helper_unittest.cc File content/common/gpu/client/gl_helper_unittest.cc (right): https://codereview.chromium.org/388953002/diff/100001/content/common/gpu/client/gl_helper_unittest.cc#newcode468 content/common/gpu/client/gl_helper_unittest.cc:468: const float kRGBtoGrayscaleColorWeights[3] = {0.213f, 0.715f, 0.072f}; Yes, I ...
6 years, 4 months ago (2014-08-25 19:21:54 UTC) #32
no sievers
On 2014/08/25 19:16:14, mfomitchev_OOO_Aug16-24 wrote: > Ok, sounds good re separate bug. Just a couple ...
6 years, 4 months ago (2014-08-25 19:25:44 UTC) #33
no sievers
lgtm https://codereview.chromium.org/388953002/diff/160001/content/common/gpu/client/gl_helper_unittest.cc File content/common/gpu/client/gl_helper_unittest.cc (right): https://codereview.chromium.org/388953002/diff/160001/content/common/gpu/client/gl_helper_unittest.cc#newcode770 content/common/gpu/client/gl_helper_unittest.cc:770: 2, If there was no scaling should the ...
6 years, 4 months ago (2014-08-25 19:34:52 UTC) #34
mfomitchev
https://codereview.chromium.org/388953002/diff/160001/content/common/gpu/client/gl_helper_unittest.cc File content/common/gpu/client/gl_helper_unittest.cc (right): https://codereview.chromium.org/388953002/diff/160001/content/common/gpu/client/gl_helper_unittest.cc#newcode770 content/common/gpu/client/gl_helper_unittest.cc:770: 2, On 2014/08/25 19:34:52, sievers wrote: > If there ...
6 years, 4 months ago (2014-08-25 20:05:04 UTC) #35
mfomitchev
The CQ bit was checked by mfomitchev@chromium.org
6 years, 4 months ago (2014-08-25 20:05:14 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mfomitchev@chromium.org/388953002/200001
6 years, 4 months ago (2014-08-25 20:06:21 UTC) #37
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel_swarming on tryserver.chromium.win ...
6 years, 4 months ago (2014-08-25 21:14:16 UTC) #38
commit-bot: I haz the power
Committed patchset #11 (200001) as e6f08f3ce59f93e6c0d479d7d36ec25f2c52a3d8
6 years, 4 months ago (2014-08-25 22:15:11 UTC) #39
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 02:37:51 UTC) #40
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/a73ebd2e88a5a0e310d9741d56129827195afa27
Cr-Commit-Position: refs/heads/master@{#291768}

Powered by Google App Engine
This is Rietveld 408576698