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

Issue 196343005: cc: Replace recorded region with direct map lookup (Closed)

Created:
6 years, 9 months ago by enne (OOO)
Modified:
6 years, 9 months ago
Reviewers:
danakj, Nico, vmpstr
CC:
chromium-reviews, cc-bugs_chromium.org, Tom Hudson, reveman, benm (inactive), reed2
Visibility:
Public.

Description

cc: Replace recorded region with direct map lookup If the viewport is extremely large, then keeping track of the recorded region in PicturePile with an actual Region becomes extremely slow due to a large number of rects being inserted into it. The recorded region behaves as a cache to the picture map; it's a simpler way to know the state of all of the recordings contained within. In practice, the recorded region is only used for two things: a "should this pile bother to create tilings" optimization and a "can a tile be rastered in this content rect" check aka CanRaster. The optimization for "should create tilings" is replaced by a has_any_recordings_ boolean, which could have a false positive in theory (resizing to a smaller but non-empty size), but which shouldn't happen in practice. Even if it did, this would only be a performance penalty for creating no-op tilings that can't create tiles (due to CanRaster). The CanRaster check is replaced by a viewport hint, as most tiles that the tiling creates will be inside of the very large expanded viewport during recording, turning an expensive Region.Contains check to a Rect.Contains one. In the edge cases where tiles are being created outside of that expanded viewport, it will check the picture map directly. This should only happen when the user has scrolled thousands of pixels without a commit. BUG=353346 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256953 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257852

Patch Set 1 #

Total comments: 13

Patch Set 2 : vmpstr review #

Patch Set 3 : danakj irc comments #

Patch Set 4 : Rebase #

Patch Set 5 : Bugfixes #

Total comments: 12

Patch Set 6 : Remove dependent changes from patch #

Patch Set 7 : vmpstr bugfix #

Total comments: 3

Patch Set 8 : tests for recorded viewport #

Total comments: 7

Patch Set 9 : Partial invalidation test case #

Unified diffs Side-by-side diffs Delta from patch set Stats (+204 lines, -97 lines) Patch
M cc/layers/picture_layer.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M cc/layers/picture_layer_impl.cc View 1 2 3 3 chunks +2 lines, -8 lines 0 comments Download
M cc/layers/picture_layer_impl_unittest.cc View 1 2 3 4 chunks +12 lines, -15 lines 0 comments Download
M cc/layers/picture_layer_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/picture_pile.cc View 1 2 3 4 5 6 4 chunks +15 lines, -5 lines 0 comments Download
M cc/resources/picture_pile_base.h View 1 3 chunks +12 lines, -8 lines 0 comments Download
M cc/resources/picture_pile_base.cc View 1 2 3 4 5 8 chunks +43 lines, -22 lines 0 comments Download
M cc/resources/picture_pile_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +91 lines, -0 lines 0 comments Download
M cc/resources/prioritized_tile_set_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/tile_manager_perftest.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/tile_manager_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/test/fake_picture_layer_tiling_client.cc View 2 chunks +3 lines, -15 lines 0 comments Download
M cc/test/fake_picture_pile_impl.h View 1 2 1 chunk +4 lines, -8 lines 0 comments Download
M cc/test/fake_picture_pile_impl.cc View 1 2 4 chunks +18 lines, -11 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
enne (OOO)
6 years, 9 months ago (2014-03-12 19:54:45 UTC) #1
vmpstr
Just some nit-like comments below. Do we have any CanRaster unittests? If not, could you ...
6 years, 9 months ago (2014-03-12 23:57:35 UTC) #2
enne (OOO)
On 2014/03/12 23:57:35, vmpstr wrote: > Just some nit-like comments below. Do we have any ...
6 years, 9 months ago (2014-03-13 01:35:42 UTC) #3
vmpstr
lgtm https://codereview.chromium.org/196343005/diff/1/cc/resources/picture_pile_base.cc File cc/resources/picture_pile_base.cc (right): https://codereview.chromium.org/196343005/diff/1/cc/resources/picture_pile_base.cc#newcode201 cc/resources/picture_pile_base.cc:201: bool PicturePileBase::CanRasterSlowTileCheck( On 2014/03/13 01:35:43, enne wrote: > ...
6 years, 9 months ago (2014-03-13 16:30:35 UTC) #4
danakj
LGTM!
6 years, 9 months ago (2014-03-13 18:10:40 UTC) #5
enne (OOO)
The CQ bit was checked by enne@chromium.org
6 years, 9 months ago (2014-03-13 18:23:42 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enne@chromium.org/196343005/40001
6 years, 9 months ago (2014-03-13 18:25:35 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-13 18:35:34 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_compile_dbg
6 years, 9 months ago (2014-03-13 18:35:35 UTC) #9
enne (OOO)
The CQ bit was checked by enne@chromium.org
6 years, 9 months ago (2014-03-13 22:40:56 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enne@chromium.org/196343005/40001
6 years, 9 months ago (2014-03-13 22:41:36 UTC) #11
commit-bot: I haz the power
Change committed as 256953
6 years, 9 months ago (2014-03-13 23:58:11 UTC) #12
Nico
No references to internal bugs on BUG= lines please. File a public bug that contains ...
6 years, 9 months ago (2014-03-14 05:42:10 UTC) #13
Nico
A revert of this CL has been created in https://codereview.chromium.org/196023015/ by thakis@chromium.org. The reason for ...
6 years, 9 months ago (2014-03-14 05:43:13 UTC) #14
enne (OOO)
On 2014/03/14 05:42:10, Nico wrote: > No references to internal bugs on BUG= lines please. ...
6 years, 9 months ago (2014-03-14 20:39:18 UTC) #15
enne (OOO)
New version up. PTAL. Depends on https://codereview.chromium.org/202753002/ and https://codereview.chromium.org/198833004/ https://codereview.chromium.org/196343005/diff/80001/cc/resources/picture_pile.cc File cc/resources/picture_pile.cc (right): https://codereview.chromium.org/196343005/diff/80001/cc/resources/picture_pile.cc#newcode211 cc/resources/picture_pile.cc:211: ...
6 years, 9 months ago (2014-03-18 00:55:19 UTC) #16
Nico
I'm not familiar with the code, but thanks for filing a public bug :-)
6 years, 9 months ago (2014-03-18 00:56:48 UTC) #17
vmpstr
https://codereview.chromium.org/196343005/diff/80001/cc/base/tiling_data_unittest.cc File cc/base/tiling_data_unittest.cc (right): https://codereview.chromium.org/196343005/diff/80001/cc/base/tiling_data_unittest.cc#newcode1061 cc/base/tiling_data_unittest.cc:1061: TEST(TilingDataTest, NoBordersIteratorOneBorderTexel) { Maybe it's already here, but can ...
6 years, 9 months ago (2014-03-18 17:24:54 UTC) #18
enne (OOO)
https://codereview.chromium.org/196343005/diff/80001/cc/base/tiling_data_unittest.cc File cc/base/tiling_data_unittest.cc (right): https://codereview.chromium.org/196343005/diff/80001/cc/base/tiling_data_unittest.cc#newcode1061 cc/base/tiling_data_unittest.cc:1061: TEST(TilingDataTest, NoBordersIteratorOneBorderTexel) { On 2014/03/18 17:24:54, vmpstr wrote: > ...
6 years, 9 months ago (2014-03-18 17:52:16 UTC) #19
vmpstr
lgtm, thanks!
6 years, 9 months ago (2014-03-18 18:05:45 UTC) #20
danakj
LGTM
6 years, 9 months ago (2014-03-18 20:10:08 UTC) #21
danakj
https://codereview.chromium.org/196343005/diff/120001/cc/resources/picture_pile.cc File cc/resources/picture_pile.cc (right): https://codereview.chromium.org/196343005/diff/120001/cc/resources/picture_pile.cc#newcode206 cc/resources/picture_pile.cc:206: } else if (!info.GetPicture() && recorded_viewport_.Intersects(rect)) { Or, one ...
6 years, 9 months ago (2014-03-18 20:11:23 UTC) #22
enne (OOO)
https://codereview.chromium.org/196343005/diff/120001/cc/resources/picture_pile.cc File cc/resources/picture_pile.cc (right): https://codereview.chromium.org/196343005/diff/120001/cc/resources/picture_pile.cc#newcode206 cc/resources/picture_pile.cc:206: } else if (!info.GetPicture() && recorded_viewport_.Intersects(rect)) { On 2014/03/18 ...
6 years, 9 months ago (2014-03-18 20:13:22 UTC) #23
danakj
https://codereview.chromium.org/196343005/diff/120001/cc/resources/picture_pile.cc File cc/resources/picture_pile.cc (right): https://codereview.chromium.org/196343005/diff/120001/cc/resources/picture_pile.cc#newcode206 cc/resources/picture_pile.cc:206: } else if (!info.GetPicture() && recorded_viewport_.Intersects(rect)) { On 2014/03/18 ...
6 years, 9 months ago (2014-03-18 20:27:49 UTC) #24
enne (OOO)
PTAL
6 years, 9 months ago (2014-03-18 20:59:59 UTC) #25
danakj
Thanks for the test! LGTM https://codereview.chromium.org/196343005/diff/140001/cc/resources/picture_pile_unittest.cc File cc/resources/picture_pile_unittest.cc (right): https://codereview.chromium.org/196343005/diff/140001/cc/resources/picture_pile_unittest.cc#newcode314 cc/resources/picture_pile_unittest.cc:314: // No invalidation, changing ...
6 years, 9 months ago (2014-03-18 21:01:37 UTC) #26
enne (OOO)
https://codereview.chromium.org/196343005/diff/140001/cc/resources/picture_pile_unittest.cc File cc/resources/picture_pile_unittest.cc (right): https://codereview.chromium.org/196343005/diff/140001/cc/resources/picture_pile_unittest.cc#newcode314 cc/resources/picture_pile_unittest.cc:314: // No invalidation, changing viewport. On 2014/03/18 21:01:37, danakj ...
6 years, 9 months ago (2014-03-18 21:04:04 UTC) #27
danakj
https://codereview.chromium.org/196343005/diff/140001/cc/resources/picture_pile_unittest.cc File cc/resources/picture_pile_unittest.cc (right): https://codereview.chromium.org/196343005/diff/140001/cc/resources/picture_pile_unittest.cc#newcode314 cc/resources/picture_pile_unittest.cc:314: // No invalidation, changing viewport. On 2014/03/18 21:04:05, enne ...
6 years, 9 months ago (2014-03-18 21:05:13 UTC) #28
enne (OOO)
https://codereview.chromium.org/196343005/diff/140001/cc/resources/picture_pile_unittest.cc File cc/resources/picture_pile_unittest.cc (right): https://codereview.chromium.org/196343005/diff/140001/cc/resources/picture_pile_unittest.cc#newcode314 cc/resources/picture_pile_unittest.cc:314: // No invalidation, changing viewport. On 2014/03/18 21:05:14, danakj ...
6 years, 9 months ago (2014-03-18 21:09:45 UTC) #29
danakj
https://codereview.chromium.org/196343005/diff/140001/cc/resources/picture_pile_unittest.cc File cc/resources/picture_pile_unittest.cc (right): https://codereview.chromium.org/196343005/diff/140001/cc/resources/picture_pile_unittest.cc#newcode314 cc/resources/picture_pile_unittest.cc:314: // No invalidation, changing viewport. On 2014/03/18 21:09:46, enne ...
6 years, 9 months ago (2014-03-18 21:44:19 UTC) #30
enne (OOO)
https://codereview.chromium.org/196343005/diff/140001/cc/resources/picture_pile_unittest.cc File cc/resources/picture_pile_unittest.cc (right): https://codereview.chromium.org/196343005/diff/140001/cc/resources/picture_pile_unittest.cc#newcode314 cc/resources/picture_pile_unittest.cc:314: // No invalidation, changing viewport. On 2014/03/18 21:44:19, danakj ...
6 years, 9 months ago (2014-03-18 22:02:02 UTC) #31
danakj
https://codereview.chromium.org/196343005/diff/140001/cc/resources/picture_pile_unittest.cc File cc/resources/picture_pile_unittest.cc (right): https://codereview.chromium.org/196343005/diff/140001/cc/resources/picture_pile_unittest.cc#newcode314 cc/resources/picture_pile_unittest.cc:314: // No invalidation, changing viewport. On 2014/03/18 22:02:03, enne ...
6 years, 9 months ago (2014-03-18 22:04:55 UTC) #32
enne (OOO)
Here's some partial invalidation. Is that what you're looking for?
6 years, 9 months ago (2014-03-18 22:32:31 UTC) #33
danakj
Yup! Thanks :)
6 years, 9 months ago (2014-03-18 22:33:25 UTC) #34
enne (OOO)
The CQ bit was checked by enne@chromium.org
6 years, 9 months ago (2014-03-19 00:19:54 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enne@chromium.org/196343005/160001
6 years, 9 months ago (2014-03-19 00:21:26 UTC) #36
commit-bot: I haz the power
6 years, 9 months ago (2014-03-19 05:46:35 UTC) #37
Message was sent while issue was closed.
Change committed as 257852

Powered by Google App Engine
This is Rietveld 408576698