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

Issue 219963005: cc: Add support for partial swaps when using impl-side painting. (Closed)

Created:
6 years, 8 months ago by sohanjg
Modified:
5 years, 1 month ago
Reviewers:
danakj, reveman, enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

cc: Add support for partial swaps when using impl-side painting by only damaging viewport area covered by newly initialized tiles. In the current implementation, during frame draw and visible tile update, LTHI was setting damage to the entire viewport area, irrespective of the initialized tiled content rect. As part of the patch we are trying to ascertain newly initialized tile rect from TileManager, notify LTHI about it, and save it as damage rect in LayerImpl. During frame draw, when the damage for surfaces and layers are tracked, we query for these damaged layer rects and unify with the DamageTracker's damage rect. BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266852

Patch Set 1 #

Total comments: 1

Patch Set 2 : WIP - optimize damage rect in LTHI #

Total comments: 1

Patch Set 3 : WIP-transform tiled rect to screen space #

Patch Set 4 : WIP - move damage tracking to DamageTracker #

Total comments: 17

Patch Set 5 : WIP - avoid std::map in TileManager + comments #

Total comments: 20

Patch Set 6 : WIP - comments + nits #

Total comments: 12

Patch Set 7 : WIP - renaming + comments #

Total comments: 6

Patch Set 8 : unit tests added + other comments #

Total comments: 3

Patch Set 9 : unit test comments updated #

Patch Set 10 : use Contains() api instead of custom code #

Total comments: 2

Patch Set 11 : Unit tests updated #

Patch Set 12 : resolve cc_unittests build error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -10 lines) Patch
M cc/layers/layer_impl.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M cc/layers/layer_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M cc/resources/tile_manager.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M cc/resources/tile_manager.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M cc/resources/tile_manager_perftest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M cc/resources/tile_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M cc/test/fake_tile_manager_client.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/damage_tracker.cc View 1 2 3 4 5 6 7 2 chunks +9 lines, -7 lines 0 comments Download
M cc/trees/damage_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +94 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +16 lines, -3 lines 0 comments Download

Messages

Total messages: 46 (1 generated)
sohanjg
This is just a rough draft to check whether the direction is correct. PTAL. Thanks. ...
6 years, 8 months ago (2014-04-01 12:03:10 UTC) #1
danakj
https://codereview.chromium.org/219963005/diff/20001/cc/resources/tile_manager.cc File cc/resources/tile_manager.cc (right): https://codereview.chromium.org/219963005/diff/20001/cc/resources/tile_manager.cc#newcode1241 cc/resources/tile_manager.cc:1241: damage_rect_ = gfx::UnionRects(damage_rect_, tile->content_rect()); What space is the damage_rect_ ...
6 years, 8 months ago (2014-04-01 14:22:50 UTC) #2
sohanjg
PTAL. Thanks.
6 years, 8 months ago (2014-04-04 11:18:09 UTC) #3
sohanjg
Is this approach correct danakj@, reveman@ ?
6 years, 8 months ago (2014-04-08 02:51:24 UTC) #4
reveman
On 2014/04/08 02:51:24, sohanjg wrote: > Is this approach correct danakj@, reveman@ ? I don't ...
6 years, 8 months ago (2014-04-08 05:37:49 UTC) #5
danakj
On 2014/04/08 05:37:49, reveman wrote: > On 2014/04/08 02:51:24, sohanjg wrote: > > Is this ...
6 years, 8 months ago (2014-04-08 14:31:59 UTC) #6
reveman
On 2014/04/08 14:31:59, danakj wrote: > On 2014/04/08 05:37:49, reveman wrote: > > On 2014/04/08 ...
6 years, 8 months ago (2014-04-08 15:40:10 UTC) #7
enne (OOO)
Do you have an existing use case where this causes problems, or is this just ...
6 years, 8 months ago (2014-04-08 16:01:45 UTC) #8
sohanjg
On 2014/04/08 16:01:45, enne wrote: > Do you have an existing use case where this ...
6 years, 8 months ago (2014-04-09 10:11:31 UTC) #9
danakj
On Wed, Apr 9, 2014 at 6:11 AM, <sohan.jyoti@samsung.com> wrote: > On 2014/04/08 16:01:45, enne ...
6 years, 8 months ago (2014-04-09 15:45:48 UTC) #10
danakj
On Wed, Apr 9, 2014 at 11:45 AM, Dana Jansens <danakj@chromium.org> wrote: > On Wed, ...
6 years, 8 months ago (2014-04-09 15:47:49 UTC) #11
reveman
On 2014/04/09 15:47:49, danakj wrote: > On Wed, Apr 9, 2014 at 11:45 AM, Dana ...
6 years, 8 months ago (2014-04-09 16:11:51 UTC) #12
reveman
https://codereview.chromium.org/219963005/diff/120001/cc/layers/layer_impl.cc File cc/layers/layer_impl.cc (right): https://codereview.chromium.org/219963005/diff/120001/cc/layers/layer_impl.cc#newcode75 cc/layers/layer_impl.cc:75: initialized_tile_rect_(gfx::Rect()) { no need for this. default ctor does ...
6 years, 8 months ago (2014-04-11 18:11:34 UTC) #13
sohanjg
Can you please take a look. Thanks. https://codereview.chromium.org/219963005/diff/120001/cc/layers/layer_impl.cc File cc/layers/layer_impl.cc (right): https://codereview.chromium.org/219963005/diff/120001/cc/layers/layer_impl.cc#newcode75 cc/layers/layer_impl.cc:75: initialized_tile_rect_(gfx::Rect()) { ...
6 years, 8 months ago (2014-04-14 10:16:10 UTC) #14
enne (OOO)
https://codereview.chromium.org/219963005/diff/180001/cc/layers/layer_impl.h File cc/layers/layer_impl.h (right): https://codereview.chromium.org/219963005/diff/180001/cc/layers/layer_impl.h#newcode456 cc/layers/layer_impl.h:456: void UnionDamageRect(gfx::Rect damage_rect); Can you name this function to ...
6 years, 8 months ago (2014-04-14 17:08:29 UTC) #15
danakj
https://codereview.chromium.org/219963005/diff/180001/cc/trees/damage_tracker.cc File cc/trees/damage_tracker.cc (right): https://codereview.chromium.org/219963005/diff/180001/cc/trees/damage_tracker.cc#newcode298 cc/trees/damage_tracker.cc:298: layer->SetUpdateRect(gfx::UnionRects(rect, layer_rect)); instead of setting the UpdateRect on the ...
6 years, 8 months ago (2014-04-14 17:17:07 UTC) #16
danakj
> So something like tile->content_rect() * / tiling_content_scale_{x,y} Should say: So something like tile->content_rect() / ...
6 years, 8 months ago (2014-04-14 17:17:52 UTC) #17
reveman
https://codereview.chromium.org/219963005/diff/180001/cc/layers/layer_impl.h File cc/layers/layer_impl.h (right): https://codereview.chromium.org/219963005/diff/180001/cc/layers/layer_impl.h#newcode456 cc/layers/layer_impl.h:456: void UnionDamageRect(gfx::Rect damage_rect); Also, maybe more consistent to have ...
6 years, 8 months ago (2014-04-14 20:03:06 UTC) #18
sohanjg
PTAL. Thanks. https://codereview.chromium.org/219963005/diff/180001/cc/layers/layer_impl.h File cc/layers/layer_impl.h (right): https://codereview.chromium.org/219963005/diff/180001/cc/layers/layer_impl.h#newcode456 cc/layers/layer_impl.h:456: void UnionDamageRect(gfx::Rect damage_rect); On 2014/04/14 17:08:29, enne ...
6 years, 8 months ago (2014-04-15 10:03:48 UTC) #19
reveman
I think this change will need to include some tests. https://codereview.chromium.org/219963005/diff/220001/cc/layers/layer_impl.h File cc/layers/layer_impl.h (right): https://codereview.chromium.org/219963005/diff/220001/cc/layers/layer_impl.h#newcode457 ...
6 years, 8 months ago (2014-04-15 16:25:59 UTC) #20
enne (OOO)
https://codereview.chromium.org/219963005/diff/220001/cc/layers/layer_impl.h File cc/layers/layer_impl.h (right): https://codereview.chromium.org/219963005/diff/220001/cc/layers/layer_impl.h#newcode457 cc/layers/layer_impl.h:457: void UnionDamageContentRect(gfx::RectF damage_content_rect); On 2014/04/15 16:25:59, reveman wrote: > ...
6 years, 8 months ago (2014-04-15 17:27:27 UTC) #21
reveman
https://codereview.chromium.org/219963005/diff/220001/cc/layers/layer_impl.h File cc/layers/layer_impl.h (right): https://codereview.chromium.org/219963005/diff/220001/cc/layers/layer_impl.h#newcode457 cc/layers/layer_impl.h:457: void UnionDamageContentRect(gfx::RectF damage_content_rect); On 2014/04/15 17:27:27, enne wrote: > ...
6 years, 8 months ago (2014-04-15 17:50:47 UTC) #22
enne (OOO)
https://codereview.chromium.org/219963005/diff/220001/cc/layers/layer_impl.h File cc/layers/layer_impl.h (right): https://codereview.chromium.org/219963005/diff/220001/cc/layers/layer_impl.h#newcode457 cc/layers/layer_impl.h:457: void UnionDamageContentRect(gfx::RectF damage_content_rect); On 2014/04/15 17:50:48, reveman wrote: > ...
6 years, 8 months ago (2014-04-15 17:55:41 UTC) #23
reveman
On 2014/04/15 17:55:41, enne wrote: > https://codereview.chromium.org/219963005/diff/220001/cc/layers/layer_impl.h > File cc/layers/layer_impl.h (right): > > https://codereview.chromium.org/219963005/diff/220001/cc/layers/layer_impl.h#newcode457 > ...
6 years, 8 months ago (2014-04-15 18:13:20 UTC) #24
sohanjg
PTAL. Thanks.
6 years, 8 months ago (2014-04-16 09:12:39 UTC) #25
danakj
LGTM when the others are happy with it. Would like some tests for it please. ...
6 years, 8 months ago (2014-04-17 00:00:55 UTC) #26
reveman
https://codereview.chromium.org/219963005/diff/280001/cc/layers/layer_impl.cc File cc/layers/layer_impl.cc (right): https://codereview.chromium.org/219963005/diff/280001/cc/layers/layer_impl.cc#newcode1021 cc/layers/layer_impl.cc:1021: void LayerImpl::AddLayerDamageRect(const gfx::RectF& damage_rect) { should this be AddDamageRect ...
6 years, 8 months ago (2014-04-17 05:18:34 UTC) #27
danakj
https://codereview.chromium.org/219963005/diff/280001/cc/layers/layer_impl.cc File cc/layers/layer_impl.cc (right): https://codereview.chromium.org/219963005/diff/280001/cc/layers/layer_impl.cc#newcode1021 cc/layers/layer_impl.cc:1021: void LayerImpl::AddLayerDamageRect(const gfx::RectF& damage_rect) { On 2014/04/17 05:18:34, reveman ...
6 years, 8 months ago (2014-04-17 14:14:33 UTC) #28
reveman
lgtm after addressing existing comments https://codereview.chromium.org/219963005/diff/280001/cc/layers/layer_impl.cc File cc/layers/layer_impl.cc (right): https://codereview.chromium.org/219963005/diff/280001/cc/layers/layer_impl.cc#newcode1021 cc/layers/layer_impl.cc:1021: void LayerImpl::AddLayerDamageRect(const gfx::RectF& damage_rect) ...
6 years, 8 months ago (2014-04-18 14:30:55 UTC) #29
sohanjg
Can you please take a look. Thanks.
6 years, 8 months ago (2014-04-19 10:55:06 UTC) #30
reveman
https://codereview.chromium.org/219963005/diff/320001/cc/trees/damage_tracker_unittest.cc File cc/trees/damage_tracker_unittest.cc (right): https://codereview.chromium.org/219963005/diff/320001/cc/trees/damage_tracker_unittest.cc#newcode275 cc/trees/damage_tracker_unittest.cc:275: // CASE 1: Setting the layer damage rect should ...
6 years, 8 months ago (2014-04-21 18:48:25 UTC) #31
enne (OOO)
lgtm % reveman's comments
6 years, 8 months ago (2014-04-21 22:08:47 UTC) #32
reveman
https://chromiumcodereview.appspot.com/219963005/diff/360001/cc/trees/damage_tracker_unittest.cc File cc/trees/damage_tracker_unittest.cc (right): https://chromiumcodereview.appspot.com/219963005/diff/360001/cc/trees/damage_tracker_unittest.cc#newcode319 cc/trees/damage_tracker_unittest.cc:319: EXPECT_EQ(true, root_damage_rect.Contains(gfx::Rect(120, 125, 3, 4))); EXPECT_EQ(true, root_damage_rect.Contains(gfx::Rect(120, 125, 1, ...
6 years, 7 months ago (2014-04-28 16:33:46 UTC) #33
reveman
https://chromiumcodereview.appspot.com/219963005/diff/360001/cc/trees/damage_tracker_unittest.cc File cc/trees/damage_tracker_unittest.cc (right): https://chromiumcodereview.appspot.com/219963005/diff/360001/cc/trees/damage_tracker_unittest.cc#newcode319 cc/trees/damage_tracker_unittest.cc:319: EXPECT_EQ(true, root_damage_rect.Contains(gfx::Rect(120, 125, 3, 4))); On 2014/04/28 16:33:46, reveman ...
6 years, 7 months ago (2014-04-28 19:16:29 UTC) #34
sohanjg
The CQ bit was checked by sohan.jyoti@samsung.com
6 years, 7 months ago (2014-04-29 05:55:56 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sohan.jyoti@samsung.com/219963005/380001
6 years, 7 months ago (2014-04-29 05:56:43 UTC) #36
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-29 06:50:45 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_chromeos_rel
6 years, 7 months ago (2014-04-29 06:50:46 UTC) #38
sohanjg
The CQ bit was checked by sohan.jyoti@samsung.com
6 years, 7 months ago (2014-04-29 09:17:18 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sohan.jyoti@samsung.com/219963005/400001
6 years, 7 months ago (2014-04-29 09:17:38 UTC) #40
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-29 09:53:12 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium
6 years, 7 months ago (2014-04-29 09:53:13 UTC) #42
sohanjg
The CQ bit was checked by sohan.jyoti@samsung.com
6 years, 7 months ago (2014-04-29 10:07:55 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sohan.jyoti@samsung.com/219963005/400001
6 years, 7 months ago (2014-04-29 10:08:18 UTC) #44
commit-bot: I haz the power
6 years, 7 months ago (2014-04-29 11:50:04 UTC) #45
Message was sent while issue was closed.
Change committed as 266852

Powered by Google App Engine
This is Rietveld 408576698