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

Issue 1028393003: [Thumbnails] Specify copy size in Pixels, not DIPs (Closed)

Created:
5 years, 9 months ago by Mathieu
Modified:
5 years, 8 months ago
Reviewers:
Lei Zhang, mazda, motek., jbauman
CC:
chromium-reviews, pkotwicz
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CopyFromCompositingSurface expects a size in pixels, not DIPs. This caused an issue where HiDPI devices would request 212x142pixels no matter what. This changes the code to get the proper scaled dimension for the device (in case of HiDPI, this would be 424x284 if user is on a 2x device, or more accordingly). BUG=470875 TEST=ContentBased*, SimpleThumb* unit_tests TBR=jbauman Committed: https://crrev.com/7898d8d28e5d02efcf161cc68ad8ce9b3d970ee2 Cr-Commit-Position: refs/heads/master@{#322705}

Patch Set 1 : Initial #

Patch Set 2 : Specific scale to device #

Total comments: 4

Patch Set 3 : Added 1x -> 2x conversion #

Patch Set 4 : comment nit #

Patch Set 5 : added comment #

Patch Set 6 : rebase #

Patch Set 7 : correct rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -66 lines) Patch
M chrome/browser/thumbnails/content_based_thumbnailing_algorithm.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/thumbnails/content_based_thumbnailing_algorithm.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/thumbnails/simple_thumbnail_crop.h View 1 3 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/thumbnails/simple_thumbnail_crop.cc View 1 2 3 3 chunks +18 lines, -50 lines 0 comments Download
M chrome/browser/thumbnails/simple_thumbnail_crop_unittest.cc View 1 2 6 chunks +36 lines, -4 lines 0 comments Download
M chrome/browser/thumbnails/thumbnailing_algorithm.h View 1 2 2 chunks +7 lines, -6 lines 0 comments Download
M content/browser/compositor/delegated_frame_host.h View 1 2 3 4 6 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (17 generated)
Mathieu
Hi Lei, Can you have a look?
5 years, 8 months ago (2015-03-26 16:09:07 UTC) #5
Lei Zhang
motek@ worked on this code before, so he might be a better reviewer.
5 years, 8 months ago (2015-03-26 18:30:34 UTC) #7
Lei Zhang
+mazda as well. https://codereview.chromium.org/1028393003/diff/80001/chrome/browser/thumbnails/thumbnailing_algorithm.h File chrome/browser/thumbnails/thumbnailing_algorithm.h (right): https://codereview.chromium.org/1028393003/diff/80001/chrome/browser/thumbnails/thumbnailing_algorithm.h#newcode27 chrome/browser/thumbnails/thumbnailing_algorithm.h:27: // canvas of |source_size|. Auxiliary |scale_factor| ...
5 years, 8 months ago (2015-03-26 18:34:56 UTC) #9
motek.
Generally seems OK, modulo a comment nit. https://codereview.chromium.org/1028393003/diff/80001/chrome/browser/thumbnails/simple_thumbnail_crop.cc File chrome/browser/thumbnails/simple_thumbnail_crop.cc (left): https://codereview.chromium.org/1028393003/diff/80001/chrome/browser/thumbnails/simple_thumbnail_crop.cc#oldcode95 chrome/browser/thumbnails/simple_thumbnail_crop.cc:95: // the ...
5 years, 8 months ago (2015-03-26 21:06:03 UTC) #10
Mathieu
Thanks all. Have another look. According to discussion on the bug I also added a ...
5 years, 8 months ago (2015-03-26 21:19:48 UTC) #11
motek.
lgtm
5 years, 8 months ago (2015-03-27 16:47:43 UTC) #12
Lei Zhang
rs lgtm
5 years, 8 months ago (2015-03-27 19:09:17 UTC) #13
Mathieu
Adding a comment to CopyFromCompositingSurface to avoid confusion in the future. +TBR jbauman for that ...
5 years, 8 months ago (2015-03-27 20:33:10 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1028393003/140001
5 years, 8 months ago (2015-03-27 20:33:48 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/9408) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 8 months ago (2015-03-27 20:37:50 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1028393003/160001
5 years, 8 months ago (2015-03-27 20:42:53 UTC) #23
commit-bot: I haz the power
Failed to apply patch for content/browser/compositor/delegated_frame_host.h: While running git apply --index -3 -p1; error: patch ...
5 years, 8 months ago (2015-03-27 21:57:34 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1028393003/200001
5 years, 8 months ago (2015-03-28 12:59:34 UTC) #30
commit-bot: I haz the power
Committed patchset #7 (id:200001)
5 years, 8 months ago (2015-03-28 13:53:12 UTC) #31
commit-bot: I haz the power
5 years, 8 months ago (2015-03-28 13:53:50 UTC) #32
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/7898d8d28e5d02efcf161cc68ad8ce9b3d970ee2
Cr-Commit-Position: refs/heads/master@{#322705}

Powered by Google App Engine
This is Rietveld 408576698