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

Issue 1424983005: ui: Fix NinePatchPainter to work in physical pixels. (Closed)

Created:
5 years, 1 month ago by danakj
Modified:
5 years, 1 month ago
Reviewers:
oshima, Peter Kasting, sky
CC:
chromium-reviews, piman, Use pkasting(at)chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ui: Fix NinePatchPainter to work in physical pixels. This fixes NinePatchPainter to do layout in physical pixels after the change to use slimming-paint in the ui compositor. Instead of using the matrix on the canvas (which won't be meaningful for scale), it uses the gfx::Canvas::SaveAndUnscale() method to move into a physical space and do layout there. R=oshima, sky BUG=539496 Committed: https://crrev.com/4bfbb34d989ec59f138b3589e956a3947c139ec3 Cr-Commit-Position: refs/heads/master@{#356983}

Patch Set 1 : ninepatchscale: . #

Patch Set 2 : ninepatchscale: . #

Total comments: 2

Patch Set 3 : ninepatchscale: noearlyout #

Patch Set 4 : ninepatchscale: tests #

Total comments: 4

Patch Set 5 : ninepatchscale: testreview #

Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -182 lines) Patch
M ui/gfx/canvas.h View 3 chunks +6 lines, -10 lines 0 comments Download
M ui/gfx/canvas.cc View 1 5 chunks +15 lines, -58 lines 0 comments Download
M ui/gfx/nine_image_painter.cc View 1 2 3 chunks +59 lines, -82 lines 0 comments Download
M ui/gfx/nine_image_painter_unittest.cc View 1 2 3 4 5 chunks +95 lines, -32 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 24 (7 generated)
danakj
Hello, this seems to work for me for 1.25, 2.25, etc. PTAL and let me ...
5 years, 1 month ago (2015-10-28 23:13:00 UTC) #1
danakj
Oh, +pkasting FYI as another SaveAndUnscale situation.
5 years, 1 month ago (2015-10-28 23:13:25 UTC) #3
danakj
https://codereview.chromium.org/1424983005/diff/40001/ui/gfx/nine_image_painter.cc File ui/gfx/nine_image_painter.cc (right): https://codereview.chromium.org/1424983005/diff/40001/ui/gfx/nine_image_painter.cc#newcode106 ui/gfx/nine_image_painter.cc:106: canvas->Translate(gfx::Vector2d(left_in_pixels, top_in_pixels)); I couldn't find a place that actually ...
5 years, 1 month ago (2015-10-28 23:17:11 UTC) #5
Peter Kasting
https://codereview.chromium.org/1424983005/diff/40001/ui/gfx/nine_image_painter.cc File ui/gfx/nine_image_painter.cc (right): https://codereview.chromium.org/1424983005/diff/40001/ui/gfx/nine_image_painter.cc#newcode151 ui/gfx/nine_image_painter.cc:151: if (!has_room_for_border) { Nit: I think it would be ...
5 years, 1 month ago (2015-10-28 23:22:53 UTC) #7
danakj
On Wed, Oct 28, 2015 at 4:22 PM, <pkasting@chromium.org> wrote: > > > https://codereview.chromium.org/1424983005/diff/40001/ui/gfx/nine_image_painter.cc > ...
5 years, 1 month ago (2015-10-28 23:23:58 UTC) #8
danakj
On Wed, Oct 28, 2015 at 4:23 PM, Dana Jansens <danakj@chromium.org> wrote: > On Wed, ...
5 years, 1 month ago (2015-10-28 23:25:05 UTC) #9
sky
On Wed, Oct 28, 2015 at 4:23 PM, Dana Jansens <danakj@chromium.org> wrote: > On Wed, ...
5 years, 1 month ago (2015-10-28 23:33:47 UTC) #10
sky
LGTM - make sure you test rtl as well.
5 years, 1 month ago (2015-10-28 23:34:31 UTC) #11
danakj
On Wed, Oct 28, 2015 at 4:34 PM, <sky@chromium.org> wrote: > LGTM - make sure ...
5 years, 1 month ago (2015-10-28 23:42:45 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424983005/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424983005/60001
5 years, 1 month ago (2015-10-28 23:44:37 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/121738)
5 years, 1 month ago (2015-10-29 00:04:54 UTC) #16
danakj
There are tests for this! Cool, I updated the tests a bit. They were making ...
5 years, 1 month ago (2015-10-29 21:19:10 UTC) #17
Peter Kasting
LGTM https://codereview.chromium.org/1424983005/diff/80001/ui/gfx/nine_image_painter_unittest.cc File ui/gfx/nine_image_painter_unittest.cc (right): https://codereview.chromium.org/1424983005/diff/80001/ui/gfx/nine_image_painter_unittest.cc#newcode71 ui/gfx/nine_image_painter_unittest.cc:71: gfx::Vector2d paint_offset(40, 20); // Translated 20,10 with 2x ...
5 years, 1 month ago (2015-10-29 21:26:15 UTC) #18
danakj
https://codereview.chromium.org/1424983005/diff/80001/ui/gfx/nine_image_painter_unittest.cc File ui/gfx/nine_image_painter_unittest.cc (right): https://codereview.chromium.org/1424983005/diff/80001/ui/gfx/nine_image_painter_unittest.cc#newcode71 ui/gfx/nine_image_painter_unittest.cc:71: gfx::Vector2d paint_offset(40, 20); // Translated 20,10 with 2x dpi. ...
5 years, 1 month ago (2015-10-29 22:15:12 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424983005/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424983005/100001
5 years, 1 month ago (2015-10-29 22:16:05 UTC) #22
commit-bot: I haz the power
Committed patchset #5 (id:100001)
5 years, 1 month ago (2015-10-29 23:38:32 UTC) #23
commit-bot: I haz the power
5 years, 1 month ago (2015-10-29 23:39:14 UTC) #24
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/4bfbb34d989ec59f138b3589e956a3947c139ec3
Cr-Commit-Position: refs/heads/master@{#356983}

Powered by Google App Engine
This is Rietveld 408576698