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

Issue 375693006: Snap layers in views to physical pixel (Closed)

Created:
6 years, 5 months ago by oshima
Modified:
6 years, 5 months ago
CC:
chromium-reviews, tdanderson+views_chromium.org, Ian Vollick, tfarina, sievers+watch_chromium.org, jbauman+watch_chromium.org, ben+views_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, cc-bugs_chromium.org
Project:
chromium
Visibility:
Public.

Description

Snap layers in views to physical pixel minor changes - print offset/mask info when printing layer hierarchy. - copy the offset when cloning layer. BUG=391822 TEST=Added new tests in layer_unittests and views_unittests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283672

Patch Set 1 : #

Total comments: 17

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : cmath #

Patch Set 6 : use cc::MathUtil::Round instead #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -0 lines) Patch
M ui/compositor/debug_utils.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M ui/compositor/dip_util.h View 1 chunk +7 lines, -0 lines 0 comments Download
M ui/compositor/dip_util.cc View 1 2 3 4 5 2 chunks +43 lines, -0 lines 1 comment Download
M ui/compositor/layer.h View 1 chunk +3 lines, -0 lines 0 comments Download
M ui/compositor/layer_owner.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ui/compositor/layer_unittest.cc View 1 2 2 chunks +41 lines, -0 lines 0 comments Download
M ui/views/view.h View 1 2 chunks +7 lines, -0 lines 0 comments Download
M ui/views/view.cc View 1 5 chunks +19 lines, -0 lines 0 comments Download
M ui/views/view_unittest.cc View 1 2 chunks +49 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
oshima
danakj -> ui/compositor ben -> ui/views
6 years, 5 months ago (2014-07-08 00:57:46 UTC) #1
oshima
danakj -> ui/compositor ben -> ui/views
6 years, 5 months ago (2014-07-08 00:57:46 UTC) #2
jamesr
Snapping for arbitrary content (as opposed to only leaf nodes) has to be aware of ...
6 years, 5 months ago (2014-07-08 01:00:59 UTC) #3
jamesr
The way blink deals with issues like this is to lay everything out on an ...
6 years, 5 months ago (2014-07-08 01:15:11 UTC) #4
oshima
On 2014/07/08 01:00:59, jamesr wrote: > Snapping for arbitrary content (as opposed to only leaf ...
6 years, 5 months ago (2014-07-08 01:47:52 UTC) #5
oshima
On 2014/07/08 01:15:11, jamesr wrote: > The way blink deals with issues like this is ...
6 years, 5 months ago (2014-07-08 06:35:51 UTC) #6
Ben Goodger (Google)
https://codereview.chromium.org/375693006/diff/20001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/375693006/diff/20001/ui/views/view.cc#newcode577 ui/views/view.cc:577: void View::SnapLayerToPixelBoundary() { should this be implemented in Layer?
6 years, 5 months ago (2014-07-08 16:07:34 UTC) #7
oshima
https://codereview.chromium.org/375693006/diff/20001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/375693006/diff/20001/ui/views/view.cc#newcode577 ui/views/view.cc:577: void View::SnapLayerToPixelBoundary() { On 2014/07/08 16:07:34, Ben Goodger (Google) ...
6 years, 5 months ago (2014-07-08 17:39:19 UTC) #8
Ben Goodger (Google)
On 2014/07/08 17:39:19, oshima wrote: > https://codereview.chromium.org/375693006/diff/20001/ui/views/view.cc > File ui/views/view.cc (right): > > https://codereview.chromium.org/375693006/diff/20001/ui/views/view.cc#newcode577 > ...
6 years, 5 months ago (2014-07-11 18:22:30 UTC) #9
Ben Goodger (Google)
On 2014/07/11 18:22:30, Ben Goodger (Google) wrote: > On 2014/07/08 17:39:19, oshima wrote: > > ...
6 years, 5 months ago (2014-07-11 18:22:46 UTC) #10
oshima
6 years, 5 months ago (2014-07-11 22:22:07 UTC) #11
oshima
danakj: ping?
6 years, 5 months ago (2014-07-15 19:29:44 UTC) #12
danakj
https://codereview.chromium.org/375693006/diff/20001/ui/compositor/dip_util.cc File ui/compositor/dip_util.cc (right): https://codereview.chromium.org/375693006/diff/20001/ui/compositor/dip_util.cc#newcode76 ui/compositor/dip_util.cc:76: if (!snapped_layer || !snapped_layer->Contains(layer_to_snap)) Could these be DCHECKs instead? ...
6 years, 5 months ago (2014-07-15 21:11:03 UTC) #13
oshima
https://codereview.chromium.org/375693006/diff/20001/ui/compositor/dip_util.cc File ui/compositor/dip_util.cc (right): https://codereview.chromium.org/375693006/diff/20001/ui/compositor/dip_util.cc#newcode76 ui/compositor/dip_util.cc:76: if (!snapped_layer || !snapped_layer->Contains(layer_to_snap)) On 2014/07/15 21:11:02, danakj wrote: ...
6 years, 5 months ago (2014-07-15 22:28:42 UTC) #14
danakj
ok LGTM until we need something better
6 years, 5 months ago (2014-07-15 22:32:02 UTC) #15
oshima
The CQ bit was checked by oshima@chromium.org
6 years, 5 months ago (2014-07-15 22:56:46 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/oshima@chromium.org/375693006/80001
6 years, 5 months ago (2014-07-15 22:57:38 UTC) #17
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg on tryserver.chromium ...
6 years, 5 months ago (2014-07-16 08:55:07 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-16 09:03:16 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_clang_dbg/builds/161379) android_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/206731)
6 years, 5 months ago (2014-07-16 09:03:17 UTC) #20
oshima
The CQ bit was checked by oshima@chromium.org
6 years, 5 months ago (2014-07-16 15:57:21 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/oshima@chromium.org/375693006/100001
6 years, 5 months ago (2014-07-16 15:59:54 UTC) #22
oshima
The CQ bit was checked by oshima@chromium.org
6 years, 5 months ago (2014-07-16 18:55:45 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/oshima@chromium.org/375693006/120001
6 years, 5 months ago (2014-07-16 18:57:29 UTC) #24
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg on tryserver.chromium ...
6 years, 5 months ago (2014-07-16 22:21:54 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_clang_dbg/builds/161654)
6 years, 5 months ago (2014-07-16 22:43:54 UTC) #26
oshima
On 2014/07/16 22:21:54, I haz the power (commit-bot) wrote: > FYI, CQ is re-trying this ...
6 years, 5 months ago (2014-07-16 22:44:46 UTC) #27
oshima
The CQ bit was checked by oshima@chromium.org
6 years, 5 months ago (2014-07-16 22:44:50 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/oshima@chromium.org/375693006/140001
6 years, 5 months ago (2014-07-16 22:50:00 UTC) #29
commit-bot: I haz the power
Change committed as 283672
6 years, 5 months ago (2014-07-17 06:55:13 UTC) #30
danakj
https://codereview.chromium.org/375693006/diff/140001/ui/compositor/dip_util.cc File ui/compositor/dip_util.cc (right): https://codereview.chromium.org/375693006/diff/140001/ui/compositor/dip_util.cc#newcode100 ui/compositor/dip_util.cc:100: gfx::PointF view_offset_snapped(cc::MathUtil::Round(view_offset.x()), MathUtil is not meant to be used ...
6 years, 5 months ago (2014-07-17 15:12:14 UTC) #31
oshima
6 years, 5 months ago (2014-07-17 15:56:57 UTC) #32
Message was sent while issue was closed.
On 2014/07/17 15:12:14, danakj wrote:
>
https://codereview.chromium.org/375693006/diff/140001/ui/compositor/dip_util.cc
> File ui/compositor/dip_util.cc (right):
> 
>
https://codereview.chromium.org/375693006/diff/140001/ui/compositor/dip_util....
> ui/compositor/dip_util.cc:100: gfx::PointF
> view_offset_snapped(cc::MathUtil::Round(view_offset.x()),
> MathUtil is not meant to be used outside of cc. I think you were looking for
>
https://code.google.com/p/chromium/codesearch#chromium/src/ui/gfx/geometry/sa...

Thanks. I uploaded a fix: https://codereview.chromium.org/391343009/

Powered by Google App Engine
This is Rietveld 408576698