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

Issue 675903002: cc: SolidColorLayerImpl::AppendSolidQuads takes the visible content rect (Closed)

Created:
6 years, 2 months ago by hendrikw
Modified:
6 years, 2 months ago
Reviewers:
danakj, vmpstr
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

cc: SolidColorLayerImpl::AppendSolidQuads uses visible content rect Huge solid layers can cause a lot of memory to be allocated because append quads function would use the content_bounds, not the visible_content_rect. PLI now uses visible rect, but SCLI is still using the content bounds, this should probably be addressed in a follow up, but I'm not too worried about this since it always worked this way and this is mostly used by unit tests. We can't simply pass the visible rect because none of the unit tests set the visible rect, and the visible rect is not passed from SCL to SCLI for tests that don't directly interact with the SCLI. BUG=423950 Committed: https://crrev.com/1610bcc9cf8f30c55d81d3d9aa2391f993667ee5 Cr-Commit-Position: refs/heads/master@{#301134}

Patch Set 1 #

Patch Set 2 : Fix the unit test name #

Patch Set 3 : Removed the code that set the visible rect #

Total comments: 8

Patch Set 4 : make unittest not spam 1 trillion failures if failures occur #

Patch Set 5 : Address review comments #

Patch Set 6 : Removed the correct visiblerect thing this time :) #

Total comments: 2

Patch Set 7 : Add full coverage to test #

Patch Set 8 : Fixed PictureLayerImplTest.DrawSolidQuads issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -10 lines) Patch
M cc/layers/picture_layer_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/picture_layer_impl_unittest.cc View 1 2 3 4 5 6 7 2 chunks +36 lines, -2 lines 0 comments Download
M cc/layers/solid_color_layer_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/solid_color_layer_impl.cc View 1 2 3 4 2 chunks +10 lines, -6 lines 0 comments Download
M cc/test/fake_picture_pile_impl.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (2 generated)
hendrikw
PTAL
6 years, 2 months ago (2014-10-23 23:25:09 UTC) #2
danakj
https://codereview.chromium.org/675903002/diff/40001/cc/layers/solid_color_layer_impl.cc File cc/layers/solid_color_layer_impl.cc (right): https://codereview.chromium.org/675903002/diff/40001/cc/layers/solid_color_layer_impl.cc#newcode79 cc/layers/solid_color_layer_impl.cc:79: gfx::Rect(content_bounds()), why isn't this the visible rect too? same ...
6 years, 2 months ago (2014-10-23 23:27:28 UTC) #3
danakj
https://codereview.chromium.org/675903002/diff/40001/cc/layers/picture_layer_impl_unittest.cc File cc/layers/picture_layer_impl_unittest.cc (right): https://codereview.chromium.org/675903002/diff/40001/cc/layers/picture_layer_impl_unittest.cc#newcode1457 cc/layers/picture_layer_impl_unittest.cc:1457: EXPECT_TRUE(visible_rect.Contains(quad.rect)); the visible_rect is not used at all except ...
6 years, 2 months ago (2014-10-23 23:38:21 UTC) #4
hendrikw
Good catches, thanks! PTAL https://codereview.chromium.org/675903002/diff/40001/cc/layers/picture_layer_impl_unittest.cc File cc/layers/picture_layer_impl_unittest.cc (right): https://codereview.chromium.org/675903002/diff/40001/cc/layers/picture_layer_impl_unittest.cc#newcode1457 cc/layers/picture_layer_impl_unittest.cc:1457: EXPECT_TRUE(visible_rect.Contains(quad.rect)); On 2014/10/23 23:38:21, danakj ...
6 years, 2 months ago (2014-10-23 23:53:49 UTC) #5
hendrikw
On 2014/10/23 23:53:49, Hendrik wrote: > Good catches, thanks! > > PTAL > > https://codereview.chromium.org/675903002/diff/40001/cc/layers/picture_layer_impl_unittest.cc ...
6 years, 2 months ago (2014-10-23 23:55:04 UTC) #6
hendrikw
PTAL for real! :)
6 years, 2 months ago (2014-10-23 23:57:24 UTC) #7
danakj
https://codereview.chromium.org/675903002/diff/100001/cc/layers/picture_layer_impl_unittest.cc File cc/layers/picture_layer_impl_unittest.cc (right): https://codereview.chromium.org/675903002/diff/100001/cc/layers/picture_layer_impl_unittest.cc#newcode1459 cc/layers/picture_layer_impl_unittest.cc:1459: EXPECT_TRUE(visible_rect.Contains(quad.rect)); I think you mean Intersects here. How did ...
6 years, 2 months ago (2014-10-24 14:58:39 UTC) #8
hendrikw
https://codereview.chromium.org/675903002/diff/100001/cc/layers/picture_layer_impl_unittest.cc File cc/layers/picture_layer_impl_unittest.cc (right): https://codereview.chromium.org/675903002/diff/100001/cc/layers/picture_layer_impl_unittest.cc#newcode1459 cc/layers/picture_layer_impl_unittest.cc:1459: EXPECT_TRUE(visible_rect.Contains(quad.rect)); On 2014/10/24 14:58:39, danakj wrote: > I think ...
6 years, 2 months ago (2014-10-24 15:32:15 UTC) #9
danakj
On Fri, Oct 24, 2014 at 11:32 AM, <hendrikw@chromium.org> wrote: > > https://codereview.chromium.org/675903002/diff/100001/cc/ > layers/picture_layer_impl_unittest.cc ...
6 years, 2 months ago (2014-10-24 15:35:03 UTC) #10
hendrikw
On 2014/10/24 15:35:03, danakj wrote: > On Fri, Oct 24, 2014 at 11:32 AM, <mailto:hendrikw@chromium.org> ...
6 years, 2 months ago (2014-10-24 15:41:14 UTC) #11
danakj
On Fri, Oct 24, 2014 at 11:41 AM, <hendrikw@chromium.org> wrote: > On 2014/10/24 15:35:03, danakj ...
6 years, 2 months ago (2014-10-24 15:43:20 UTC) #12
hendrikw
Added tests for full coverage. PTAL
6 years, 2 months ago (2014-10-24 15:50:27 UTC) #13
danakj
LGTM
6 years, 2 months ago (2014-10-24 15:58:24 UTC) #14
hendrikw
I had an issue in an older test, PictureLayerImplTest.DrawSolidQuads, I wasn't calling UpdateDrawProperties, so the ...
6 years, 2 months ago (2014-10-24 16:32:51 UTC) #15
danakj
LGTNM
6 years, 2 months ago (2014-10-24 16:34:05 UTC) #16
danakj
On 2014/10/24 16:34:05, danakj wrote: > LGTNM er... -N :D
6 years, 2 months ago (2014-10-24 16:34:18 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/675903002/130001
6 years, 2 months ago (2014-10-24 16:38:11 UTC) #19
commit-bot: I haz the power
Committed patchset #8 (id:130001)
6 years, 2 months ago (2014-10-24 17:28:52 UTC) #20
commit-bot: I haz the power
6 years, 2 months ago (2014-10-24 17:29:35 UTC) #21
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/1610bcc9cf8f30c55d81d3d9aa2391f993667ee5
Cr-Commit-Position: refs/heads/master@{#301134}

Powered by Google App Engine
This is Rietveld 408576698