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

Issue 14230007: cc: Do GatherPixelRefs from skia at record time (Closed)

Created:
7 years, 8 months ago by vmpstr
Modified:
7 years, 8 months ago
Reviewers:
nduca, reveman, enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

cc: Do GatherPixelRefs from skia at record time This change gather lazy pixel refs from skia at record time and stores them in a 512x512 grid. When GatherPixelRefs is invoked, the refs are looked up in this grid (cells that intersect our required rect contribute their pixel refs to the final result) BUG=231977 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=196451

Patch Set 1 #

Total comments: 6

Patch Set 2 : update to hash_map #

Total comments: 2

Patch Set 3 : changed kRegionSize to width/height #

Patch Set 4 : changed gather to iterators #

Total comments: 3

Patch Set 5 : unittests + enne's review #

Total comments: 31

Patch Set 6 : reviews #

Patch Set 7 : reviews #

Patch Set 8 : updated unittests #

Total comments: 31

Patch Set 9 : more reviews #

Total comments: 21

Patch Set 10 : reviews #

Total comments: 4

Patch Set 11 : review #

Total comments: 6

Patch Set 12 : nits #

Patch Set 13 : compile fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1399 lines, -59 lines) Patch
M cc/base/util.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +7 lines, -1 line 0 comments Download
M cc/resources/picture.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +53 lines, -6 lines 0 comments Download
M cc/resources/picture.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +173 lines, -16 lines 0 comments Download
M cc/resources/picture_pile_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +25 lines, -5 lines 0 comments Download
M cc/resources/picture_pile_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +61 lines, -25 lines 0 comments Download
M cc/resources/picture_pile_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +729 lines, -0 lines 0 comments Download
M cc/resources/picture_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +309 lines, -0 lines 0 comments Download
M cc/resources/tile_manager.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +10 lines, -4 lines 0 comments Download
M cc/test/fake_content_layer_client.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -0 lines 0 comments Download
M cc/test/fake_content_layer_client.cc View 1 2 3 4 3 chunks +9 lines, -2 lines 0 comments Download
M cc/test/fake_picture_pile_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download
M cc/test/fake_picture_pile_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (0 generated)
vmpstr
I'm working on adding unit tests for this, but please take a look.
7 years, 8 months ago (2013-04-16 18:08:22 UTC) #1
reveman
https://codereview.chromium.org/14230007/diff/1/cc/resources/picture.h File cc/resources/picture.h (right): https://codereview.chromium.org/14230007/diff/1/cc/resources/picture.h#newcode67 cc/resources/picture.h:67: typedef std::vector<PositionPixelRefs> PositionPixelRefsVector; how about using: base::hash_map<std::pair<int, int>, std::list<skia::LazyPixelRef*> ...
7 years, 8 months ago (2013-04-16 18:38:35 UTC) #2
vmpstr
> https://codereview.chromium.org/14230007/diff/1/cc/resources/picture.h#newcode67 > cc/resources/picture.h:67: typedef std::vector<PositionPixelRefs> > PositionPixelRefsVector; > how about using: > base::hash_map<std::pair<int, int>, ...
7 years, 8 months ago (2013-04-16 18:53:07 UTC) #3
reveman
On 2013/04/16 18:53:07, vmpstr wrote: > > > https://codereview.chromium.org/14230007/diff/1/cc/resources/picture.h#newcode67 > > cc/resources/picture.h:67: typedef std::vector<PositionPixelRefs> > ...
7 years, 8 months ago (2013-04-16 19:14:21 UTC) #4
enne (OOO)
https://codereview.chromium.org/14230007/diff/1/cc/resources/picture.cc File cc/resources/picture.cc (right): https://codereview.chromium.org/14230007/diff/1/cc/resources/picture.cc#newcode223 cc/resources/picture.cc:223: gfx::Rect rect(x, y, extent.width(), extent.height()); Can we get this ...
7 years, 8 months ago (2013-04-16 22:03:36 UTC) #5
vmpstr
On 2013/04/16 22:03:36, enne wrote: > https://codereview.chromium.org/14230007/diff/1/cc/resources/picture.cc > File cc/resources/picture.cc (right): > > https://codereview.chromium.org/14230007/diff/1/cc/resources/picture.cc#newcode223 > ...
7 years, 8 months ago (2013-04-16 22:40:43 UTC) #6
enne (OOO)
On 2013/04/16 22:40:43, vmpstr wrote: > https://codereview.chromium.org/14230007/diff/1/cc/resources/picture.cc#newcode223 > > cc/resources/picture.cc:223: gfx::Rect rect(x, y, extent.width(), > ...
7 years, 8 months ago (2013-04-16 23:03:50 UTC) #7
vmpstr
On 2013/04/16 23:03:50, enne wrote: > Yeah, I understand that. It's just seems a bit ...
7 years, 8 months ago (2013-04-16 23:41:33 UTC) #8
reveman
On 2013/04/16 23:03:50, enne wrote: > On 2013/04/16 22:40:43, vmpstr wrote: > > > > ...
7 years, 8 months ago (2013-04-16 23:54:57 UTC) #9
reveman
https://codereview.chromium.org/14230007/diff/1/cc/resources/picture.cc File cc/resources/picture.cc (right): https://codereview.chromium.org/14230007/diff/1/cc/resources/picture.cc#newcode223 cc/resources/picture.cc:223: gfx::Rect rect(x, y, extent.width(), extent.height()); On 2013/04/16 22:03:36, enne ...
7 years, 8 months ago (2013-04-17 00:25:28 UTC) #10
vmpstr
The updated CL is up. PTAL.
7 years, 8 months ago (2013-04-17 00:26:20 UTC) #11
reveman
https://codereview.chromium.org/14230007/diff/12001/cc/resources/picture.cc File cc/resources/picture.cc (right): https://codereview.chromium.org/14230007/diff/12001/cc/resources/picture.cc#newcode26 cc/resources/picture.cc:26: const gfx::Size kRegionSize(512, 512); only POD is allowed for ...
7 years, 8 months ago (2013-04-17 00:42:56 UTC) #12
vmpstr
On 2013/04/17 00:42:56, David Reveman wrote: > https://codereview.chromium.org/14230007/diff/12001/cc/resources/picture.cc > File cc/resources/picture.cc (right): > > https://codereview.chromium.org/14230007/diff/12001/cc/resources/picture.cc#newcode26 ...
7 years, 8 months ago (2013-04-17 16:20:28 UTC) #13
reveman
On 2013/04/17 16:20:28, vmpstr wrote: > On 2013/04/17 00:42:56, David Reveman wrote: > > https://codereview.chromium.org/14230007/diff/12001/cc/resources/picture.cc ...
7 years, 8 months ago (2013-04-17 18:58:28 UTC) #14
vmpstr
I changed the implementation to use the iterator style. As soon as a couple of ...
7 years, 8 months ago (2013-04-19 00:34:31 UTC) #15
enne (OOO)
I like the direction of this patch. As you say, unit tests for the iterator ...
7 years, 8 months ago (2013-04-22 16:47:26 UTC) #16
vmpstr
I added unittests, please take a look. On 2013/04/22 16:47:26, enne wrote: > I like ...
7 years, 8 months ago (2013-04-22 18:10:06 UTC) #17
enne (OOO)
Thanks! I have three more test requests for you: (1) Can you add a test ...
7 years, 8 months ago (2013-04-22 19:10:56 UTC) #18
reveman
https://codereview.chromium.org/14230007/diff/29001/cc/resources/picture.cc File cc/resources/picture.cc (right): https://codereview.chromium.org/14230007/diff/29001/cc/resources/picture.cc#newcode38 cc/resources/picture.cc:38: const int kRegionHeight = 512; Can we avoid these ...
7 years, 8 months ago (2013-04-22 19:56:06 UTC) #19
vmpstr
For this test: "(2) Can you add some tests where pictures are drawn exactly on ...
7 years, 8 months ago (2013-04-22 22:38:16 UTC) #20
enne (OOO)
The complication of test #2 makes sense. Maybe I'm just lost in the number of ...
7 years, 8 months ago (2013-04-23 01:59:39 UTC) #21
reveman
https://codereview.chromium.org/14230007/diff/29001/cc/resources/tile_manager.cc File cc/resources/tile_manager.cc (right): https://codereview.chromium.org/14230007/diff/29001/cc/resources/tile_manager.cc#newcode656 cc/resources/tile_manager.cc:656: rendering_stats_instrumentation_->AddImageGathering(duration); a trace event is enough to check that ...
7 years, 8 months ago (2013-04-23 14:33:23 UTC) #22
vmpstr
Addressed most comments. PTAL. @enne: the tests you asked for are found in the following: ...
7 years, 8 months ago (2013-04-23 20:02:23 UTC) #23
reveman
https://codereview.chromium.org/14230007/diff/54001/cc/base/util.h File cc/base/util.h (right): https://codereview.chromium.org/14230007/diff/54001/cc/base/util.h#newcode14 cc/base/util.h:14: template <typename T> T RoundDown(T value, T multiple) { ...
7 years, 8 months ago (2013-04-24 14:10:52 UTC) #24
enne (OOO)
On 2013/04/23 20:02:23, vmpstr wrote: > Test 3 is PicturePileImplTest::PixelRefIteratorLazyRefsBaseNonLazy (one large > bitmap that ...
7 years, 8 months ago (2013-04-24 14:25:42 UTC) #25
vmpstr
PTAL. @enne: I completely misunderstood what you meant by the test. That was my bad. ...
7 years, 8 months ago (2013-04-24 21:11:10 UTC) #26
enne (OOO)
Thanks for the extra test. lgtm if it also looks good to reveman.
7 years, 8 months ago (2013-04-24 21:17:48 UTC) #27
reveman
https://codereview.chromium.org/14230007/diff/54001/cc/resources/picture.cc File cc/resources/picture.cc (right): https://codereview.chromium.org/14230007/diff/54001/cc/resources/picture.cc#newcode331 cc/resources/picture.cc:331: Picture::PixelRefIterator::PixelRefIterator(const PixelRefIterator& other) { If you use an index ...
7 years, 8 months ago (2013-04-24 23:01:27 UTC) #28
vmpstr
On 2013/04/24 23:01:27, David Reveman wrote: > https://codereview.chromium.org/14230007/diff/54001/cc/resources/picture.cc > File cc/resources/picture.cc (right): > > https://codereview.chromium.org/14230007/diff/54001/cc/resources/picture.cc#newcode331 ...
7 years, 8 months ago (2013-04-24 23:58:11 UTC) #29
vmpstr
https://codereview.chromium.org/14230007/diff/62001/cc/resources/picture_pile_impl.cc File cc/resources/picture_pile_impl.cc (right): https://codereview.chromium.org/14230007/diff/62001/cc/resources/picture_pile_impl.cc#newcode301 cc/resources/picture_pile_impl.cc:301: if (!tile_iterator_) On 2013/04/24 23:01:27, David Reveman wrote: > ...
7 years, 8 months ago (2013-04-24 23:58:19 UTC) #30
vmpstr
https://codereview.chromium.org/14230007/diff/67001/cc/resources/picture.cc File cc/resources/picture.cc (right): https://codereview.chromium.org/14230007/diff/67001/cc/resources/picture.cc#newcode322 cc/resources/picture.cc:322: Picture::PixelRefIterator::empty_pixel_refs_; I'm not sure if this is the right ...
7 years, 8 months ago (2013-04-25 00:01:10 UTC) #31
reveman
lgtm with nits https://codereview.chromium.org/14230007/diff/67001/cc/resources/picture.cc File cc/resources/picture.cc (right): https://codereview.chromium.org/14230007/diff/67001/cc/resources/picture.cc#newcode322 cc/resources/picture.cc:322: Picture::PixelRefIterator::empty_pixel_refs_; On 2013/04/25 00:01:10, vmpstr wrote: ...
7 years, 8 months ago (2013-04-25 00:36:28 UTC) #32
vmpstr
Thanks for the review! On 2013/04/25 00:36:28, David Reveman wrote: > lgtm with nits > ...
7 years, 8 months ago (2013-04-25 00:51:00 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vmpstr@chromium.org/14230007/73002
7 years, 8 months ago (2013-04-25 00:51:37 UTC) #34
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 8 months ago (2013-04-25 01:11:12 UTC) #35
reveman
On 2013/04/25 00:51:00, vmpstr wrote: > Thanks for the review! > > On 2013/04/25 00:36:28, ...
7 years, 8 months ago (2013-04-25 01:21:31 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vmpstr@chromium.org/14230007/87001
7 years, 8 months ago (2013-04-25 16:43:15 UTC) #37
commit-bot: I haz the power
7 years, 8 months ago (2013-04-25 19:11:58 UTC) #38
Message was sent while issue was closed.
Change committed as 196451

Powered by Google App Engine
This is Rietveld 408576698