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

Issue 519583003: Use the solid color detection to create solid layers (Closed)

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

Description

This is an optimization that uses solid color detection to prevent PictureLayerImpl from creating tiles if the entire layer is solid. If the entire layer is solid, PictureLayerImpl will now draw solid quads using a method provided in SolidColorLayerImpl. The is_solid_color_ and solid_color members have been moved from PicturePile To BasePicturePile so that the properties are copied between PicturePile and PicturePileImpl. BUG=396908 Committed: https://crrev.com/c78b11fa0057ae197b03ac9de5a150482efe6faf Cr-Commit-Position: refs/heads/master@{#295860}

Patch Set 1 #

Total comments: 29

Patch Set 2 : Address review comments #

Patch Set 3 : Passed the right color to the quad #

Total comments: 1

Patch Set 4 : move solid color dawing to static function in solidlayerimpl #

Patch Set 5 : Added a unit test for solid color on picturelayerimpl #

Total comments: 17

Patch Set 6 : Review comment fixes #

Patch Set 7 : Address review comments and add more unit tests #

Patch Set 8 : remove unused variable #

Total comments: 26

Patch Set 9 : Another round of addressing review comments #

Patch Set 10 : Clear the tilings if we are solid #

Patch Set 11 : Fixed my DCHECKS #

Patch Set 12 : Added another test to make sure the tilings are cleared correctly #

Total comments: 19

Patch Set 13 : Address more review comments #

Total comments: 2

Patch Set 14 : final merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+271 lines, -70 lines) Patch
M cc/layers/picture_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +30 lines, -2 lines 0 comments Download
M cc/layers/picture_layer_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +148 lines, -0 lines 0 comments Download
M cc/layers/solid_color_layer_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +9 lines, -2 lines 0 comments Download
M cc/layers/solid_color_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +40 lines, -24 lines 0 comments Download
M cc/resources/picture_pile.h View 1 2 3 4 5 6 2 chunks +0 lines, -5 lines 0 comments Download
M cc/resources/picture_pile.cc View 1 2 3 4 5 6 1 chunk +1 line, -4 lines 0 comments Download
M cc/resources/picture_pile_base.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download
M cc/resources/picture_pile_base.cc View 1 2 3 4 5 6 2 chunks +6 lines, -2 lines 0 comments Download
M cc/resources/picture_pile_unittest.cc View 1 2 3 4 5 6 7 8 4 chunks +8 lines, -8 lines 0 comments Download
M cc/test/fake_content_layer_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -0 lines 0 comments Download
M cc/test/fake_content_layer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +15 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_pixeltest_readback.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -15 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_scroll.cc View 1 2 3 4 5 6 1 chunk +2 lines, -7 lines 0 comments Download

Messages

Total messages: 41 (2 generated)
hendrikw
Hi, here's the solid color layer stuff in action, I haven't written any tests yet, ...
6 years, 3 months ago (2014-08-29 02:35:25 UTC) #1
hendrikw
hendrikw@chromium.org changed reviewers: + danakj@chromium.org, enne@chromium.org, vmpstr@chromium.org
6 years, 3 months ago (2014-08-29 02:35:51 UTC) #2
hendrikw
vmpstr@chromium.org: Please review changes in danakj@chromium.org: Please review changes in enne@chromium.org: Please review changes in
6 years, 3 months ago (2014-08-29 02:35:51 UTC) #3
vmpstr
https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer.cc File cc/layers/picture_layer.cc (right): https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer.cc#newcode45 cc/layers/picture_layer.cc:45: SetSolidColorPropertiesTo(layer_impl); Why not just layer_impl->SetSolidColorState(...) directly? https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer.h File cc/layers/picture_layer.h ...
6 years, 3 months ago (2014-08-29 06:49:15 UTC) #4
hendrikw
https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer.cc File cc/layers/picture_layer.cc (right): https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer.cc#newcode45 cc/layers/picture_layer.cc:45: SetSolidColorPropertiesTo(layer_impl); On 2014/08/29 06:49:14, vmpstr wrote: > Why not ...
6 years, 3 months ago (2014-08-29 14:03:21 UTC) #5
vmpstr
https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer.cc File cc/layers/picture_layer.cc (right): https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer.cc#newcode45 cc/layers/picture_layer.cc:45: SetSolidColorPropertiesTo(layer_impl); On 2014/08/29 14:03:21, Hendrik wrote: > On 2014/08/29 ...
6 years, 3 months ago (2014-08-29 14:20:45 UTC) #6
hendrikw
On 2014/08/29 14:20:45, vmpstr wrote: > https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer.cc > File cc/layers/picture_layer.cc (right): > > https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer.cc#newcode45 > ...
6 years, 3 months ago (2014-08-29 14:51:15 UTC) #7
enne (OOO)
https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer.h File cc/layers/picture_layer.h (right): https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer.h#newcode55 cc/layers/picture_layer.h:55: virtual void SetSolidColorPropertiesTo(PictureLayerImpl* layer_impl) const; On 2014/08/29 at 14:20:44, ...
6 years, 3 months ago (2014-08-29 16:53:43 UTC) #8
hendrikw
I've put in DCHECKS, made sure the tilings_ is empty, found a way to remove ...
6 years, 3 months ago (2014-09-02 14:19:18 UTC) #9
danakj
On Tue, Sep 2, 2014 at 10:19 AM, <hendrikw@chromium.org> wrote: > Reviewers: enne, danakj, vmpstr, ...
6 years, 3 months ago (2014-09-02 16:04:56 UTC) #10
vmpstr
https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer_impl.cc#newcode160 cc/layers/picture_layer_impl.cc:160: if (IsSolidColor()) { On 2014/09/02 14:19:17, Hendrik wrote: > ...
6 years, 3 months ago (2014-09-02 19:02:25 UTC) #11
hendrikw
On 2014/09/02 19:02:25, vmpstr wrote: > https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer_impl.cc > File cc/layers/picture_layer_impl.cc (right): > > https://codereview.chromium.org/519583003/diff/1/cc/layers/picture_layer_impl.cc#newcode160 > ...
6 years, 3 months ago (2014-09-08 17:52:43 UTC) #12
hendrikw
Hi, I've moved the DrawSolidQuads to a static function within SolidColorLayerImpl. The parts that come ...
6 years, 3 months ago (2014-09-09 20:08:31 UTC) #14
danakj
On Tue, Sep 9, 2014 at 4:08 PM, <hendrikw@chromium.org> wrote: > Hi, I've moved the ...
6 years, 3 months ago (2014-09-09 20:16:09 UTC) #15
hendrikw
@danakj - as discussed, since I'm passing the unscaled content_bounds and scale = 1, it ...
6 years, 3 months ago (2014-09-10 17:40:38 UTC) #16
danakj
https://codereview.chromium.org/519583003/diff/80001/cc/layers/layer_impl.cc File cc/layers/layer_impl.cc (right): https://codereview.chromium.org/519583003/diff/80001/cc/layers/layer_impl.cc#newcode25 cc/layers/layer_impl.cc:25: #include "cc/quads/solid_color_draw_quad.h" not needed? https://codereview.chromium.org/519583003/diff/80001/cc/layers/layer_impl.cc#newcode29 cc/layers/layer_impl.cc:29: #include "cc/trees/occlusion_tracker.h" ditto ...
6 years, 3 months ago (2014-09-10 18:40:50 UTC) #17
danakj
https://codereview.chromium.org/519583003/diff/80001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/519583003/diff/80001/cc/layers/picture_layer_impl.cc#newcode162 cc/layers/picture_layer_impl.cc:162: render_pass->CreateAndAppendSharedQuadState(); nit: whitespace below this to show it's not ...
6 years, 3 months ago (2014-09-10 18:46:40 UTC) #18
danakj
Overall approach seems fine, mostly concerned with tests and not duplicating the pile state into ...
6 years, 3 months ago (2014-09-10 18:47:06 UTC) #19
hendrikw
Fixes for some review comments, Thanks! And a few questions https://codereview.chromium.org/519583003/diff/80001/cc/layers/layer_impl.cc File cc/layers/layer_impl.cc (right): https://codereview.chromium.org/519583003/diff/80001/cc/layers/layer_impl.cc#newcode25 ...
6 years, 3 months ago (2014-09-11 00:27:41 UTC) #20
danakj
https://codereview.chromium.org/519583003/diff/80001/cc/layers/picture_layer.cc File cc/layers/picture_layer.cc (right): https://codereview.chromium.org/519583003/diff/80001/cc/layers/picture_layer.cc#newcode39 cc/layers/picture_layer.cc:39: layer_impl->SetSolidColorState(pile_->IsSolidColor(), pile_->GetSolidColor()); On 2014/09/11 00:27:40, Hendrik wrote: > On ...
6 years, 3 months ago (2014-09-11 23:36:37 UTC) #21
danakj
Sorry missed the other 2 questions. https://codereview.chromium.org/519583003/diff/80001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/519583003/diff/80001/cc/layers/picture_layer_impl.cc#newcode164 cc/layers/picture_layer_impl.cc:164: PopulateSharedQuadState(shared_quad_state); On 2014/09/11 ...
6 years, 3 months ago (2014-09-11 23:43:50 UTC) #22
hendrikw
Hi, please take a look, I think I've addressed all of the issues.
6 years, 3 months ago (2014-09-15 14:28:31 UTC) #23
vmpstr
https://codereview.chromium.org/519583003/diff/140001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/519583003/diff/140001/cc/layers/picture_layer_impl.cc#newcode120 cc/layers/picture_layer_impl.cc:120: DCHECK(!pile_->is_solid_color() || !tilings_->num_tilings()); I like this dcheck, and I ...
6 years, 3 months ago (2014-09-15 15:45:08 UTC) #24
danakj
https://codereview.chromium.org/519583003/diff/140001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/519583003/diff/140001/cc/layers/picture_layer_impl.cc#newcode123 cc/layers/picture_layer_impl.cc:123: layer_impl->tilings_.swap(tilings_); On 2014/09/15 15:45:07, vmpstr wrote: > In the ...
6 years, 3 months ago (2014-09-15 16:26:35 UTC) #25
danakj
https://codereview.chromium.org/519583003/diff/140001/cc/resources/picture_pile_base.h File cc/resources/picture_pile_base.h (right): https://codereview.chromium.org/519583003/diff/140001/cc/resources/picture_pile_base.h#newcode53 cc/resources/picture_pile_base.h:53: bool is_solid_color() const { return is_solid_color_; } nit: whitespace ...
6 years, 3 months ago (2014-09-15 16:32:31 UTC) #26
hendrikw
Please take another look, thanks! https://codereview.chromium.org/519583003/diff/140001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/519583003/diff/140001/cc/layers/picture_layer_impl.cc#newcode120 cc/layers/picture_layer_impl.cc:120: DCHECK(!pile_->is_solid_color() || !tilings_->num_tilings()); On ...
6 years, 3 months ago (2014-09-15 16:59:41 UTC) #27
danakj
https://codereview.chromium.org/519583003/diff/140001/cc/layers/picture_layer_impl_unittest.cc File cc/layers/picture_layer_impl_unittest.cc (right): https://codereview.chromium.org/519583003/diff/140001/cc/layers/picture_layer_impl_unittest.cc#newcode319 cc/layers/picture_layer_impl_unittest.cc:319: std::vector<Tile*> tiles = On 2014/09/15 16:59:40, Hendrik wrote: > ...
6 years, 3 months ago (2014-09-15 17:01:23 UTC) #28
hendrikw
On 2014/09/15 17:01:23, danakj wrote: > https://codereview.chromium.org/519583003/diff/140001/cc/layers/picture_layer_impl_unittest.cc > File cc/layers/picture_layer_impl_unittest.cc (right): > > https://codereview.chromium.org/519583003/diff/140001/cc/layers/picture_layer_impl_unittest.cc#newcode319 > ...
6 years, 3 months ago (2014-09-15 17:26:36 UTC) #29
vmpstr
https://codereview.chromium.org/519583003/diff/140001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/519583003/diff/140001/cc/layers/picture_layer_impl.cc#newcode123 cc/layers/picture_layer_impl.cc:123: layer_impl->tilings_.swap(tilings_); On 2014/09/15 16:59:40, Hendrik wrote: > On 2014/09/15 ...
6 years, 3 months ago (2014-09-15 18:30:39 UTC) #30
hendrikw
Cleared the tiles, added DCHECKS, added tilings test PTAL
6 years, 3 months ago (2014-09-16 14:29:00 UTC) #31
vmpstr
lgtm % danakj, can you also update the description to put a bit more information ...
6 years, 3 months ago (2014-09-16 16:43:33 UTC) #32
hendrikw
On 2014/09/16 16:43:33, vmpstr wrote: > lgtm % danakj, can you also update the description ...
6 years, 3 months ago (2014-09-16 16:52:00 UTC) #33
danakj
https://codereview.chromium.org/519583003/diff/220001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/519583003/diff/220001/cc/layers/picture_layer_impl.cc#newcode126 cc/layers/picture_layer_impl.cc:126: tilings_->RemoveAllTilings(); can you do this down by RemoveTilesInRegion (ie ...
6 years, 3 months ago (2014-09-19 20:44:29 UTC) #34
hendrikw
PTAL https://codereview.chromium.org/519583003/diff/220001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/519583003/diff/220001/cc/layers/picture_layer_impl.cc#newcode126 cc/layers/picture_layer_impl.cc:126: tilings_->RemoveAllTilings(); On 2014/09/19 20:44:28, danakj wrote: > can ...
6 years, 3 months ago (2014-09-19 22:27:14 UTC) #35
danakj
LGTM https://codereview.chromium.org/519583003/diff/220001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/519583003/diff/220001/cc/layers/picture_layer_impl.cc#newcode126 cc/layers/picture_layer_impl.cc:126: tilings_->RemoveAllTilings(); On 2014/09/19 22:27:13, Hendrik wrote: > On ...
6 years, 3 months ago (2014-09-19 22:46:39 UTC) #36
hendrikw
merged. https://codereview.chromium.org/519583003/diff/240001/cc/layers/picture_layer_unittest.cc File cc/layers/picture_layer_unittest.cc (right): https://codereview.chromium.org/519583003/diff/240001/cc/layers/picture_layer_unittest.cc#newcode10 cc/layers/picture_layer_unittest.cc:10: #include "cc/test/fake_content_layer_client.h" On 2014/09/19 22:46:38, danakj wrote: > ...
6 years, 3 months ago (2014-09-20 01:26:10 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/519583003/260001
6 years, 3 months ago (2014-09-20 01:46:14 UTC) #39
commit-bot: I haz the power
Committed patchset #14 (id:260001) as cd508cf463b2851177d1f2a8f654f6e45fd5fea6
6 years, 3 months ago (2014-09-20 13:14:32 UTC) #40
commit-bot: I haz the power
6 years, 3 months ago (2014-09-20 13:15:25 UTC) #41
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/c78b11fa0057ae197b03ac9de5a150482efe6faf
Cr-Commit-Position: refs/heads/master@{#295860}

Powered by Google App Engine
This is Rietveld 408576698