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

Issue 11275089: SkRect to gfx::Rect type conversions. (Closed)

Created:
8 years, 1 month ago by aelias_OOO_until_Jul13
Modified:
8 years, 1 month ago
Reviewers:
danakj, jamesr, sky
CC:
chromium-reviews, sadrul, yusukes+watch_chromium.org, ben+watch_chromium.org, Ian Vollick, tfarina, jonathan.backer, jam, penghuang+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, cc-bugs_chromium.org, James Su, slavi
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

SkRect to gfx::Rect type conversions. This adds more Skia rect conversions, and removes the lossy SkRectToRect conversion (making all its users invoke ToFlooredRectDeprecated explicitly). BUG=147395

Patch Set 1 #

Total comments: 3

Patch Set 2 : Use ToFlooredRectDeprecated and revert Transform API change #

Total comments: 4

Patch Set 3 : Remove unnecessary lines #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -38 lines) Patch
M cc/software_renderer.cc View 9 chunks +11 lines, -20 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 2 chunks +3 lines, -1 line 1 comment Download
M ui/compositor/layer_unittest.cc View 1 1 chunk +2 lines, -1 line 1 comment Download
M ui/gfx/rect_unittest.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M ui/gfx/skia_util.h View 1 chunk +5 lines, -1 line 0 comments Download
M ui/gfx/skia_util.cc View 1 chunk +16 lines, -8 lines 4 comments Download
M ui/gfx/transform.cc View 1 3 chunks +3 lines, -2 lines 3 comments Download
M ui/views/controls/table/table_view_views.cc View 1 2 chunks +3 lines, -1 line 1 comment Download
M ui/views/controls/tree/tree_view_views.cc View 1 2 chunks +3 lines, -1 line 4 comments Download

Messages

Total messages: 19 (0 generated)
aelias_OOO_until_Jul13
Hi sky@, this is another small gfx type conversion patch for CC.
8 years, 1 month ago (2012-11-01 00:28:39 UTC) #1
danakj
https://codereview.chromium.org/11275089/diff/1/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/11275089/diff/1/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode584 content/browser/renderer_host/render_widget_host_view_aura.cc:584: clip_rect = gfx::ToEnclosingRect(gfx::SkRectToRectF(sk_clip_rect)); Maybe you want to use gfx::ToFlooredRectDeprecated() ...
8 years, 1 month ago (2012-11-01 00:36:59 UTC) #2
aelias_OOO_until_Jul13
OK, switched to ToFlooredRectDeprecated so that this patch is a no-op and removed the extra ...
8 years, 1 month ago (2012-11-01 00:49:30 UTC) #3
danakj
Thanks, I like this better as a single change. https://codereview.chromium.org/11275089/diff/3002/ash/wm/image_grid.cc File ash/wm/image_grid.cc (right): https://codereview.chromium.org/11275089/diff/3002/ash/wm/image_grid.cc#newcode24 ash/wm/image_grid.cc:24: ...
8 years, 1 month ago (2012-11-01 00:59:23 UTC) #4
jamesr
lgtm for cc/ modulo one thing https://codereview.chromium.org/11275089/diff/3002/cc/software_renderer.cc File cc/software_renderer.cc (right): https://codereview.chromium.org/11275089/diff/3002/cc/software_renderer.cc#newcode221 cc/software_renderer.cc:221: gfx::RectFToSkRect(quadVertexRect()).toQuad(vertices); this line ...
8 years, 1 month ago (2012-11-01 01:15:46 UTC) #5
aelias_OOO_until_Jul13
OK, I removed those extra lines. https://codereview.chromium.org/11275089/diff/3002/cc/software_renderer.cc File cc/software_renderer.cc (right): https://codereview.chromium.org/11275089/diff/3002/cc/software_renderer.cc#newcode221 cc/software_renderer.cc:221: gfx::RectFToSkRect(quadVertexRect()).toQuad(vertices); On 2012/11/01 ...
8 years, 1 month ago (2012-11-01 05:00:18 UTC) #6
danakj
On 2012/11/01 05:00:18, aelias wrote: > OK, I removed those extra lines. Cool lgtm! > ...
8 years, 1 month ago (2012-11-01 05:12:27 UTC) #7
sky
https://codereview.chromium.org/11275089/diff/10001/ui/gfx/transform.cc File ui/gfx/transform.cc (right): https://codereview.chromium.org/11275089/diff/10001/ui/gfx/transform.cc#newcode159 ui/gfx/transform.cc:159: *rect = gfx::ToFlooredRectDeprecated(SkRectToRectF(src)); The plan was to remove ToFlooredRectDeprecated. ...
8 years, 1 month ago (2012-11-01 16:10:24 UTC) #8
danakj
https://codereview.chromium.org/11275089/diff/10001/ui/gfx/transform.cc File ui/gfx/transform.cc (right): https://codereview.chromium.org/11275089/diff/10001/ui/gfx/transform.cc#newcode159 ui/gfx/transform.cc:159: *rect = gfx::ToFlooredRectDeprecated(SkRectToRectF(src)); On 2012/11/01 16:10:24, sky wrote: > ...
8 years, 1 month ago (2012-11-01 16:38:21 UTC) #9
sky
Shouldn't this call one of enclosed/enclosing rather than the deprecated method?
8 years, 1 month ago (2012-11-01 17:28:46 UTC) #10
danakj
I just prefer CLs to not change behaviour when they are making API changes, and ...
8 years, 1 month ago (2012-11-01 17:38:27 UTC) #11
danakj
https://codereview.chromium.org/11275089/diff/10001/ui/views/controls/tree/tree_view_views.cc File ui/views/controls/tree/tree_view_views.cc (right): https://codereview.chromium.org/11275089/diff/10001/ui/views/controls/tree/tree_view_views.cc#newcode522 ui/views/controls/tree/tree_view_views.cc:522: gfx::SkRectToRectF(sk_clip_rect)); On 2012/11/01 16:10:24, sky wrote: > Why does ...
8 years, 1 month ago (2012-11-01 17:48:28 UTC) #12
danakj
https://codereview.chromium.org/11275089/diff/10001/ui/views/controls/tree/tree_view_views.cc File ui/views/controls/tree/tree_view_views.cc (right): https://codereview.chromium.org/11275089/diff/10001/ui/views/controls/tree/tree_view_views.cc#newcode522 ui/views/controls/tree/tree_view_views.cc:522: gfx::SkRectToRectF(sk_clip_rect)); On 2012/11/01 17:48:28, danakj wrote: > On 2012/11/01 ...
8 years, 1 month ago (2012-11-01 17:50:18 UTC) #13
tfarina
https://codereview.chromium.org/11275089/diff/10001/ui/gfx/skia_util.cc File ui/gfx/skia_util.cc (right): https://codereview.chromium.org/11275089/diff/10001/ui/gfx/skia_util.cc#newcode23 ui/gfx/skia_util.cc:23: return SkRect::MakeXYWH(rect.x(), rect.y(), rect.width(), rect.height()); I think you can't ...
8 years, 1 month ago (2012-11-10 20:23:07 UTC) #14
aelias_OOO_until_Jul13
Ping; sky@, could you clarify what your primary concern is with this patch preventing it ...
8 years, 1 month ago (2012-11-12 19:50:39 UTC) #15
danakj
https://codereview.chromium.org/11275089/diff/10001/ui/gfx/skia_util.cc File ui/gfx/skia_util.cc (right): https://codereview.chromium.org/11275089/diff/10001/ui/gfx/skia_util.cc#newcode23 ui/gfx/skia_util.cc:23: return SkRect::MakeXYWH(rect.x(), rect.y(), rect.width(), rect.height()); On 2012/11/10 20:23:08, tfarina ...
8 years, 1 month ago (2012-11-12 20:01:53 UTC) #16
tfarina
On Mon, Nov 12, 2012 at 6:01 PM, <danakj@chromium.org> wrote: > https://codereview.chromium.org/11275089/diff/10001/ui/gfx/skia_util.cc#newcode23 > ui/gfx/skia_util.cc:23: return ...
8 years, 1 month ago (2012-11-12 21:36:14 UTC) #17
sky
The point of deprecating a method is that it shouldn't be used and we're in ...
8 years, 1 month ago (2012-11-12 22:50:10 UTC) #18
danakj
8 years, 1 month ago (2012-11-13 00:20:10 UTC) #19

Powered by Google App Engine
This is Rietveld 408576698