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

Issue 567743003: Fix bad scaling in TiledLayer (Closed)

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

Description

Fix bad scaling in TiledLayer On the windows side (and likely chromeos for some devices) we can end up in a situation where the pixel bounds is not an even multiple of the scale factor. This means when TiledLayer calculates the scale it ends up off. BUG=416655, 416775 TEST=added test coverage R=danakj@chromium.org Committed: https://chromium.googlesource.com/chromium/src/+/37c078080a860d121443e657eb4089b784469162

Patch Set 1 #

Total comments: 1

Patch Set 2 : handle edge #

Patch Set 3 : comments #

Patch Set 4 : merge to trunk #

Total comments: 28

Patch Set 5 : merge 2 trunk #

Patch Set 6 : integrate review feedback #

Total comments: 6

Patch Set 7 : test fixs #

Total comments: 4

Patch Set 8 : better comment #

Patch Set 9 : merge to trunk #

Unified diffs Side-by-side diffs Delta from patch set Stats (+163 lines, -63 lines) Patch
M cc/layers/content_layer.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M cc/layers/tiled_layer.cc View 1 2 3 4 2 chunks +7 lines, -8 lines 0 comments Download
M cc/layers/tiled_layer_unittest.cc View 1 2 3 4 5 6 6 chunks +38 lines, -5 lines 0 comments Download
M cc/resources/bitmap_content_layer_updater.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M cc/resources/bitmap_content_layer_updater.cc View 1 2 chunks +14 lines, -14 lines 0 comments Download
M cc/resources/bitmap_skpicture_content_layer_updater.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M cc/resources/content_layer_updater.h View 1 2 3 4 5 3 chunks +11 lines, -3 lines 0 comments Download
M cc/resources/content_layer_updater.cc View 1 2 3 4 5 6 7 5 chunks +54 lines, -12 lines 0 comments Download
M cc/resources/layer_updater.h View 1 3 chunks +4 lines, -1 line 0 comments Download
M cc/resources/skpicture_content_layer_updater.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M cc/resources/skpicture_content_layer_updater.cc View 1 1 chunk +13 lines, -9 lines 0 comments Download
M cc/test/fake_content_layer.cc View 1 2 3 4 5 2 chunks +2 lines, -3 lines 0 comments Download
M cc/test/tiled_layer_test_common.h View 1 2 3 4 5 3 chunks +6 lines, -1 line 0 comments Download
M cc/test/tiled_layer_test_common.cc View 1 2 3 4 5 1 chunk +7 lines, -3 lines 0 comments Download

Messages

Total messages: 21 (1 generated)
sky
I'm not sure this is the right fix. It fixes the bug I was seeing, ...
6 years, 3 months ago (2014-09-11 21:01:07 UTC) #1
danakj
https://codereview.chromium.org/567743003/diff/1/cc/layers/tiled_layer.cc File cc/layers/tiled_layer.cc (right): https://codereview.chromium.org/567743003/diff/1/cc/layers/tiled_layer.cc#newcode466 cc/layers/tiled_layer.cc:466: float width_scale = 1 / draw_properties().contents_scale_x; Ok ya, this ...
6 years, 3 months ago (2014-09-13 13:04:50 UTC) #2
sky
Hopefully I'm on the right track here. I haven't updated tests yet, I'm waiting to ...
6 years, 3 months ago (2014-09-16 21:00:46 UTC) #3
danakj
Yep this is the right track. A bunch of naming changes to help make this ...
6 years, 3 months ago (2014-09-19 22:02:58 UTC) #4
sky
https://codereview.chromium.org/567743003/diff/60001/cc/resources/content_layer_updater.cc File cc/resources/content_layer_updater.cc (right): https://codereview.chromium.org/567743003/diff/60001/cc/resources/content_layer_updater.cc#newcode41 cc/resources/content_layer_updater.cc:41: const gfx::Size& content_size, On 2014/09/19 22:02:58, danakj wrote: > ...
6 years, 3 months ago (2014-09-22 18:00:00 UTC) #5
danakj
https://codereview.chromium.org/567743003/diff/100001/cc/layers/tiled_layer_unittest.cc File cc/layers/tiled_layer_unittest.cc (left): https://codereview.chromium.org/567743003/diff/100001/cc/layers/tiled_layer_unittest.cc#oldcode866 cc/layers/tiled_layer_unittest.cc:866: TEST_F(TiledLayerTest, VerifyUpdateRectWhenContentBoundsAreScaled) { On 2014/09/22 18:00:00, sky wrote: > ...
6 years, 3 months ago (2014-09-22 19:21:19 UTC) #6
sky
Updated. https://codereview.chromium.org/567743003/diff/100001/cc/layers/tiled_layer_unittest.cc File cc/layers/tiled_layer_unittest.cc (left): https://codereview.chromium.org/567743003/diff/100001/cc/layers/tiled_layer_unittest.cc#oldcode866 cc/layers/tiled_layer_unittest.cc:866: TEST_F(TiledLayerTest, VerifyUpdateRectWhenContentBoundsAreScaled) { On 2014/09/22 19:21:18, danakj wrote: ...
6 years, 3 months ago (2014-09-22 21:23:55 UTC) #7
danakj
https://codereview.chromium.org/567743003/diff/120001/cc/resources/content_layer_updater.cc File cc/resources/content_layer_updater.cc (right): https://codereview.chromium.org/567743003/diff/120001/cc/resources/content_layer_updater.cc#newcode91 cc/resources/content_layer_updater.cc:91: layer_rect = gfx::ScaleToEnclosingRect( Oh I see, this layer_rect can ...
6 years, 3 months ago (2014-09-22 21:55:05 UTC) #8
sky
https://codereview.chromium.org/567743003/diff/120001/cc/resources/content_layer_updater.cc File cc/resources/content_layer_updater.cc (right): https://codereview.chromium.org/567743003/diff/120001/cc/resources/content_layer_updater.cc#newcode91 cc/resources/content_layer_updater.cc:91: layer_rect = gfx::ScaleToEnclosingRect( On 2014/09/22 21:55:05, danakj wrote: > ...
6 years, 3 months ago (2014-09-22 21:56:31 UTC) #9
danakj
LGTM https://codereview.chromium.org/567743003/diff/120001/cc/resources/content_layer_updater.cc File cc/resources/content_layer_updater.cc (right): https://codereview.chromium.org/567743003/diff/120001/cc/resources/content_layer_updater.cc#newcode91 cc/resources/content_layer_updater.cc:91: layer_rect = gfx::ScaleToEnclosingRect( On 2014/09/22 21:56:30, sky wrote: ...
6 years, 3 months ago (2014-09-22 22:00:09 UTC) #10
danakj
Mind filing a BUG and attaching it to this CL so we can track it?
6 years, 3 months ago (2014-09-22 22:00:34 UTC) #11
sky
And I created a bug. https://codereview.chromium.org/567743003/diff/120001/cc/resources/content_layer_updater.cc File cc/resources/content_layer_updater.cc (right): https://codereview.chromium.org/567743003/diff/120001/cc/resources/content_layer_updater.cc#newcode91 cc/resources/content_layer_updater.cc:91: layer_rect = gfx::ScaleToEnclosingRect( On ...
6 years, 3 months ago (2014-09-22 22:15:28 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/567743003/140001
6 years, 3 months ago (2014-09-22 22:16:55 UTC) #14
commit-bot: I haz the power
Committed patchset #8 (id:140001) as 26611dacdeafd1d4f1845e50d76e13b3cc2c26ce
6 years, 3 months ago (2014-09-23 00:38:43 UTC) #15
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/c01746b4f7d811a5fdc75ce6570a9667b9877913 Cr-Commit-Position: refs/heads/master@{#296108}
6 years, 3 months ago (2014-09-23 00:39:26 UTC) #16
Mads Ager (chromium)
A revert of this CL (patchset #8 id:140001) has been created in https://codereview.chromium.org/590313004/ by ager@chromium.org. ...
6 years, 3 months ago (2014-09-23 08:28:57 UTC) #17
sky
I'm going to reland this. The reason this was reverted was because a couple of ...
6 years, 3 months ago (2014-09-23 21:24:33 UTC) #18
danakj
On 2014/09/23 21:24:33, sky wrote: > I'm going to reland this. The reason this was ...
6 years, 3 months ago (2014-09-23 21:25:34 UTC) #19
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/37c078080a860d121443e657eb4089b784469162 Cr-Commit-Position: refs/heads/master@{#296252}
6 years, 3 months ago (2014-09-23 21:26:05 UTC) #20
sky
6 years, 3 months ago (2014-09-23 21:26:06 UTC) #21
Message was sent while issue was closed.
Committed patchset #9 (id:160001) manually as 37c0780 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698