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

Issue 2175553002: Raster PictureLayerTiling with fractional translation (Closed)

Created:
4 years, 5 months ago by trchen
Modified:
3 years, 7 months ago
CC:
cc-bugs_chromium.org, chromium-reviews, vmpstr
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Raster PictureLayerTiling with fractional translation Normally layers are rastered in scaled local coordinate, this is not ideal because the drawing will be blurred by resampling when the layer origin is not aligned with pixel boundaries either due to layer position or transform. This CL detect the case when a layer is static and has 1:1 pixel ratio to the screen, shift the raster space to align with screen pixels. BUG=521364 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_blink_rel;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Patch Set 1 : Raster PictureLayerTiling with fractional translation #

Total comments: 15

Patch Set 2 : alternative: change raster translation if and only if raster scale mutates #

Total comments: 8

Patch Set 3 : use draw transform instead? #

Total comments: 18

Patch Set 4 : clean up #

Total comments: 8

Patch Set 5 : updated #

Patch Set 6 : combined #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1192 lines, -467 lines) Patch
M cc/base/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A cc/base/scale_translate2d.h View 1 2 3 4 5 1 chunk +106 lines, -0 lines 0 comments Download
A cc/base/scale_translate2d.cc View 1 2 3 4 1 chunk +16 lines, -0 lines 0 comments Download
M cc/benchmarks/rasterize_and_record_benchmark_impl.cc View 1 2 3 4 5 4 chunks +7 lines, -5 lines 0 comments Download
M cc/blink/web_content_layer_impl.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M cc/blink/web_content_layer_impl.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M cc/layers/picture_layer.h View 1 2 3 4 5 3 chunks +5 lines, -0 lines 0 comments Download
M cc/layers/picture_layer.cc View 1 2 3 4 5 5 chunks +44 lines, -1 line 0 comments Download
M cc/layers/picture_layer_impl.h View 1 2 3 4 5 5 chunks +9 lines, -2 lines 0 comments Download
M cc/layers/picture_layer_impl.cc View 1 2 3 4 5 10 chunks +73 lines, -16 lines 0 comments Download
M cc/layers/picture_layer_impl_unittest.cc View 1 2 3 4 5 98 chunks +378 lines, -213 lines 0 comments Download
M cc/output/software_renderer.cc View 1 2 3 4 5 2 chunks +7 lines, -2 lines 0 comments Download
M cc/raster/bitmap_raster_buffer_provider.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M cc/raster/gpu_raster_buffer_provider.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M cc/raster/gpu_raster_buffer_provider.cc View 1 2 3 4 5 5 chunks +6 lines, -6 lines 0 comments Download
M cc/raster/one_copy_raster_buffer_provider.h View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M cc/raster/one_copy_raster_buffer_provider.cc View 1 2 3 4 5 5 chunks +6 lines, -6 lines 0 comments Download
M cc/raster/raster_buffer.h View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M cc/raster/raster_buffer_provider.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M cc/raster/raster_buffer_provider.cc View 1 2 3 4 5 4 chunks +4 lines, -3 lines 0 comments Download
M cc/raster/raster_buffer_provider_unittest.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M cc/raster/raster_source.h View 1 2 3 4 5 2 chunks +11 lines, -2 lines 0 comments Download
M cc/raster/raster_source.cc View 1 2 3 4 5 3 chunks +3 lines, -2 lines 0 comments Download
M cc/raster/raster_source_unittest.cc View 1 2 3 4 5 8 chunks +17 lines, -10 lines 0 comments Download
M cc/raster/zero_copy_raster_buffer_provider.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M cc/test/fake_picture_layer_impl.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M cc/test/fake_picture_layer_tiling_client.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M cc/tiles/picture_layer_tiling.h View 1 2 3 4 5 7 chunks +13 lines, -6 lines 0 comments Download
M cc/tiles/picture_layer_tiling.cc View 1 2 3 4 5 19 chunks +65 lines, -44 lines 0 comments Download
M cc/tiles/picture_layer_tiling_set.h View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M cc/tiles/picture_layer_tiling_set.cc View 1 2 3 4 5 11 chunks +20 lines, -15 lines 0 comments Download
M cc/tiles/picture_layer_tiling_set_unittest.cc View 1 2 3 4 5 20 chunks +106 lines, -33 lines 0 comments Download
M cc/tiles/picture_layer_tiling_unittest.cc View 1 2 3 4 5 18 chunks +151 lines, -31 lines 0 comments Download
M cc/tiles/tile.h View 1 2 3 4 5 4 chunks +7 lines, -5 lines 0 comments Download
M cc/tiles/tile.cc View 1 2 3 4 5 2 chunks +8 lines, -2 lines 0 comments Download
M cc/tiles/tile_manager.cc View 1 2 3 4 5 7 chunks +11 lines, -6 lines 0 comments Download
M cc/tiles/tile_manager_unittest.cc View 1 2 3 4 5 16 chunks +39 lines, -23 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_picture.cc View 1 2 3 4 5 6 chunks +25 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp View 1 2 3 4 5 2 chunks +11 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebContentLayer.h View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 60 (9 generated)
trchen
WIP
4 years, 5 months ago (2016-07-22 03:31:30 UTC) #3
enne (OOO)
https://codereview.chromium.org/2175553002/diff/20001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/2175553002/diff/20001/cc/layers/picture_layer_impl.cc#newcode866 cc/layers/picture_layer_impl.cc:866: static constexpr float kErrorThreshold = 0.001; Where does this ...
4 years, 5 months ago (2016-07-26 00:22:16 UTC) #6
danakj
https://codereview.chromium.org/2175553002/diff/20001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/2175553002/diff/20001/cc/layers/picture_layer_impl.cc#newcode984 cc/layers/picture_layer_impl.cc:984: if (draw_properties().screen_space_transform_is_animating) On 2016/07/26 00:22:16, enne wrote: > This ...
4 years, 4 months ago (2016-07-27 22:52:17 UTC) #7
trchen
Sorry I didn't update latest status with you. On Monday I chatted with chrishtr@ offline, ...
4 years, 4 months ago (2016-07-27 23:05:08 UTC) #8
ajuma
On 2016/07/27 23:05:08, trchen wrote: > Sorry I didn't update latest status with you. > ...
4 years, 4 months ago (2016-07-28 13:35:53 UTC) #10
Lof
Hello! I have tested this CL. It looks like text still blurry: https://drive.google.com/open?id=0Bw59Ysn8bedgVXNPTVpQel8tZFU
4 years, 4 months ago (2016-08-02 12:46:19 UTC) #11
chrishtr
On 2016/08/02 at 12:46:19, lof84 wrote: > Hello! > > I have tested this CL. ...
4 years, 4 months ago (2016-08-02 15:28:40 UTC) #12
Lof
On 2016/08/02 15:28:40, chrishtr wrote: > On 2016/08/02 at 12:46:19, lof84 wrote: > > Hello! ...
4 years, 4 months ago (2016-08-02 21:13:55 UTC) #13
chrishtr
On 2016/08/02 at 21:13:55, lof84 wrote: > On 2016/08/02 15:28:40, chrishtr wrote: > > On ...
4 years, 4 months ago (2016-08-02 21:29:12 UTC) #14
trchen
https://codereview.chromium.org/2175553002/diff/20001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/2175553002/diff/20001/cc/layers/picture_layer_impl.cc#newcode866 cc/layers/picture_layer_impl.cc:866: static constexpr float kErrorThreshold = 0.001; On 2016/07/26 00:22:16, ...
4 years, 4 months ago (2016-08-03 06:06:07 UTC) #15
trchen
https://codereview.chromium.org/2175553002/diff/20001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/2175553002/diff/20001/cc/layers/picture_layer_impl.cc#newcode866 cc/layers/picture_layer_impl.cc:866: static constexpr float kErrorThreshold = 0.001; Note: This code ...
4 years, 4 months ago (2016-08-03 22:41:20 UTC) #16
Lof
On 2016/08/02 21:29:12, chrishtr wrote: > On 2016/08/02 at 21:13:55, lof84 wrote: > > On ...
4 years, 4 months ago (2016-08-04 16:48:25 UTC) #17
enne (OOO)
https://codereview.chromium.org/2175553002/diff/40001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/2175553002/diff/40001/cc/layers/picture_layer_impl.cc#newcode967 cc/layers/picture_layer_impl.cc:967: gfx::Vector2dF PictureLayerImpl::CalculateRasterTranslation() { I think this function should use ...
4 years, 4 months ago (2016-08-09 21:02:36 UTC) #18
trchen
https://codereview.chromium.org/2175553002/diff/40001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/2175553002/diff/40001/cc/layers/picture_layer_impl.cc#newcode967 cc/layers/picture_layer_impl.cc:967: gfx::Vector2dF PictureLayerImpl::CalculateRasterTranslation() { On 2016/08/09 21:02:36, enne wrote: > ...
4 years, 4 months ago (2016-08-10 01:44:14 UTC) #19
ajuma
https://codereview.chromium.org/2175553002/diff/40001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/2175553002/diff/40001/cc/layers/picture_layer_impl.cc#newcode967 cc/layers/picture_layer_impl.cc:967: gfx::Vector2dF PictureLayerImpl::CalculateRasterTranslation() { On 2016/08/10 01:44:14, trchen wrote: > ...
4 years, 4 months ago (2016-08-10 13:32:04 UTC) #21
enne (OOO)
https://codereview.chromium.org/2175553002/diff/40001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/2175553002/diff/40001/cc/layers/picture_layer_impl.cc#newcode967 cc/layers/picture_layer_impl.cc:967: gfx::Vector2dF PictureLayerImpl::CalculateRasterTranslation() { On 2016/08/10 at 01:44:14, trchen wrote: ...
4 years, 4 months ago (2016-08-10 18:35:05 UTC) #22
trchen
On 2016/08/10 18:35:05, enne wrote: > https://codereview.chromium.org/2175553002/diff/40001/cc/layers/picture_layer_impl.cc > File cc/layers/picture_layer_impl.cc (right): > > https://codereview.chromium.org/2175553002/diff/40001/cc/layers/picture_layer_impl.cc#newcode967 > ...
4 years, 4 months ago (2016-08-12 21:56:10 UTC) #23
trchen
https://codereview.chromium.org/2175553002/diff/60001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/2175553002/diff/60001/cc/layers/picture_layer_impl.cc#newcode992 cc/layers/picture_layer_impl.cc:992: gfx::Transform draw_transform = DrawTransform(); We can certainly use draw ...
4 years, 4 months ago (2016-08-12 22:11:30 UTC) #24
enne (OOO)
It is still a lot of work to wrap my head around all of the ...
4 years, 4 months ago (2016-08-16 23:02:53 UTC) #25
trchen
On 2016/08/16 23:02:53, enne wrote: > It is still a lot of work to wrap ...
4 years, 4 months ago (2016-08-17 00:05:13 UTC) #26
enne (OOO)
On 2016/08/17 at 00:05:13, trchen wrote: > On 2016/08/16 23:02:53, enne wrote: > > It ...
4 years, 4 months ago (2016-08-17 22:17:56 UTC) #27
trchen
On 2016/08/17 22:17:56, enne wrote: > On 2016/08/17 at 00:05:13, trchen wrote: > > On ...
4 years, 4 months ago (2016-08-18 00:23:52 UTC) #28
enne (OOO)
> > Yes, but I am still not convinced me that this is correct. What ...
4 years, 4 months ago (2016-08-18 17:31:24 UTC) #29
trchen
On 2016/08/18 17:31:24, enne wrote: > > > Yes, but I am still not convinced ...
4 years, 4 months ago (2016-08-18 21:54:13 UTC) #30
enne (OOO)
On 2016/08/18 at 21:54:13, trchen wrote: > On 2016/08/18 17:31:24, enne wrote: > > > ...
4 years, 4 months ago (2016-08-18 21:58:00 UTC) #31
trchen
On 2016/08/18 21:58:00, enne wrote: > On 2016/08/18 at 21:54:13, trchen wrote: > > On ...
4 years, 4 months ago (2016-08-18 21:58:57 UTC) #32
enne (OOO)
> > > To go from layer space to contents space, we have to > ...
4 years, 4 months ago (2016-08-18 22:16:51 UTC) #33
enne (OOO)
"A vector in layer space will not be the same as a vector in layer ...
4 years, 4 months ago (2016-08-18 22:17:45 UTC) #34
trchen
On 2016/08/18 22:16:51, enne wrote: > > > > To go from layer space to ...
4 years, 4 months ago (2016-08-18 22:26:55 UTC) #35
enne (OOO)
On 2016/08/18 at 22:26:55, trchen wrote: > On 2016/08/18 22:16:51, enne wrote: > > > ...
4 years, 4 months ago (2016-08-18 22:31:34 UTC) #36
trchen
On 2016/08/18 22:31:34, enne wrote: > On 2016/08/18 at 22:26:55, trchen wrote: > > On ...
4 years, 4 months ago (2016-08-18 23:26:35 UTC) #37
enne (OOO)
After staring at this for a long time, I think I understand what this patch ...
4 years, 4 months ago (2016-08-22 22:57:39 UTC) #38
trchen
Uploaded a new patchset to combine raster scale and translation to an opaque class. Fixed ...
4 years, 3 months ago (2016-08-29 10:14:48 UTC) #39
enne (OOO)
> > Correctness. See: http://imgur.com/a/Pqv7E. I took The Verge (as an example of > > ...
4 years, 3 months ago (2016-08-29 20:21:19 UTC) #40
trchen
On 2016/08/29 20:21:19, enne wrote: https://codereview.chromium.org/2175553002/diff/60001/cc/tiles/picture_layer_tiling.cc#newcode468 > > cc/tiles/picture_layer_tiling.cc:468: > tile_bounds_in_dest_space.Offset(-tiling_->contents_translation()); > > On 2016/08/22 ...
4 years, 3 months ago (2016-08-31 00:24:05 UTC) #41
enne (OOO)
On 2016/08/31 at 00:24:05, trchen wrote: > In other words, the texture sampling extent for ...
4 years, 3 months ago (2016-08-31 00:27:45 UTC) #42
trchen
On 2016/08/31 00:27:45, enne wrote: > On 2016/08/31 at 00:24:05, trchen wrote: > > > ...
4 years, 3 months ago (2016-08-31 00:44:39 UTC) #43
trchen
On 2016/08/31 00:44:39, trchen wrote: > On 2016/08/31 00:27:45, enne wrote: > > On 2016/08/31 ...
4 years, 3 months ago (2016-08-31 04:51:54 UTC) #44
trchen
On 2016/08/31 04:51:54, trchen wrote: > On 2016/08/31 00:44:39, trchen wrote: > > On 2016/08/31 ...
4 years, 3 months ago (2016-08-31 23:32:01 UTC) #45
enne (OOO)
On 2016/08/31 at 00:24:05, trchen wrote: > Now as we draw the quad, the quad ...
4 years, 3 months ago (2016-09-02 00:40:59 UTC) #46
trchen
On 2016/09/02 00:40:59, enne wrote: > On 2016/08/31 at 00:24:05, trchen wrote: > > The ...
4 years, 3 months ago (2016-09-02 01:56:10 UTC) #47
trchen
Had a discussion with chrishtr@ & danakj@ today. Taking note here in case I forget. ...
4 years ago (2016-12-07 02:17:24 UTC) #48
chrishtr
On 2016/12/07 at 02:17:24, trchen wrote: > Had a discussion with chrishtr@ & danakj@ today. ...
4 years ago (2016-12-07 02:20:33 UTC) #49
chrishtr
Is this patch ready for further review? Unfortunately Enne is out the rest of the ...
4 years ago (2016-12-07 02:20:58 UTC) #50
trchen
On 2016/12/07 02:20:33, chrishtr wrote: > On 2016/12/07 at 02:17:24, trchen wrote: > > 2. ...
4 years ago (2016-12-07 02:23:14 UTC) #51
chrishtr
On 2016/12/07 at 02:23:14, trchen wrote: > On 2016/12/07 02:20:33, chrishtr wrote: > > On ...
4 years ago (2016-12-07 02:29:10 UTC) #52
trchen
New CL uploaded. It will be a pain to review as a whole. Split out ...
4 years ago (2016-12-09 03:02:10 UTC) #53
chrishtr
Are these ready for review? On Thu, Dec 8, 2016 at 7:02 PM, <trchen@chromium.org> wrote: ...
4 years ago (2016-12-09 03:23:54 UTC) #54
danakj
On Tue, Dec 6, 2016 at 6:20 PM, <chrishtr@chromium.org> wrote: > Is this patch ready ...
4 years ago (2016-12-09 04:02:04 UTC) #55
enne (OOO)
I reviewed all the smaller patches. Seems mostly fine, but needs a bunch more testing. ...
3 years, 11 months ago (2017-01-03 22:55:01 UTC) #56
trchen
3 years, 8 months ago (2017-03-28 21:51:43 UTC) #59
On 2017/01/03 22:55:01, enne wrote:
> I reviewed all the smaller patches.  Seems mostly fine, but needs a bunch more
> testing.
> 
> If it's possible to land these in smaller patches, please feel free to do so. 
> It wasn't clear whether you were thinking about landing those patches
> individually or if they were just split out for review purposes.

Sorry for taking so long! I uploaded another update just now.
https://codereview.chromium.org/2559413002/
https://codereview.chromium.org/2560723006/
https://codereview.chromium.org/2563743004/
https://codereview.chromium.org/2566613002/
https://codereview.chromium.org/2565643002/
The 6th CL is gone because it was git cl format. I just meld it into the 5 CLs.
I think it is possible to land in smaller patches. In each of the step all tests
passed and should be no-op until the last step. I'll write CL description for
each of them now.

Powered by Google App Engine
This is Rietveld 408576698