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

Issue 1161933007: ui: Introduce CanvasPainter, remove PaintContext(gfx::Canvas*). (Closed)

Created:
5 years, 6 months ago by danakj
Modified:
5 years, 6 months ago
Reviewers:
sky
CC:
chromium-reviews, tdanderson+views_chromium.org, yusukes+watch_chromium.org, Ian Vollick, tfarina, shuchen+watch_chromium.org, penghuang+watch_chromium.org, dcheng, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, James Su, cc-bugs_chromium.org, enne (OOO), piman, sadrul, sky
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ui: Introduce CanvasPainter, remove PaintContext(gfx::Canvas*). This adds a helper class called CanvasPainter for painting a View into a bitmap-backed gfx::Canvas, for non-composited (off-screen) painting. This class uses a DisplayItemList-backed PaintContext, removing the need for a PaintContext(gfx:Canvas*) constructor. Also changes views_unittests to use DisplayItemList-backed PaintContexts, so that the tests are explicitly testing View paint cacheing. R=sky BUG=466426 Committed: https://crrev.com/b03846d6b0f0bfaa40fb0c3145f06f486549b474 Cr-Commit-Position: refs/heads/master@{#332963}

Patch Set 1 #

Total comments: 1

Patch Set 2 : canvaspainter: . #

Patch Set 3 : canvaspainter: . #

Patch Set 4 : canvaspainter: . #

Total comments: 4

Patch Set 5 : canvaspainter: . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+259 lines, -67 lines) Patch
M ui/compositor/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
A ui/compositor/canvas_painter.h View 1 2 3 4 1 chunk +48 lines, -0 lines 0 comments Download
A ui/compositor/canvas_painter.cc View 1 1 chunk +29 lines, -0 lines 0 comments Download
M ui/compositor/compositor.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/compositor/paint_context.h View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M ui/compositor/paint_context.cc View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M ui/views/DEPS View 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/button_drag_utils.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ui/views/cocoa/bridged_content_view.mm View 2 chunks +3 lines, -2 lines 0 comments Download
M ui/views/controls/label_unittest.cc View 6 chunks +8 lines, -8 lines 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M ui/views/view_unittest.cc View 16 chunks +160 lines, -38 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_win.h View 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M ui/views/win/hwnd_message_handler_delegate.h View 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
danakj
https://codereview.chromium.org/1161933007/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h File ui/views/widget/desktop_aura/desktop_window_tree_host_win.h (left): https://codereview.chromium.org/1161933007/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h#oldcode150 ui/views/widget/desktop_aura/desktop_window_tree_host_win.h:150: void PaintLayeredWindow(gfx::Canvas* canvas) override; This was just dead code, ...
5 years, 6 months ago (2015-06-04 21:36:53 UTC) #1
sky
LGTM https://codereview.chromium.org/1161933007/diff/60001/ui/compositor/canvas_painter.h File ui/compositor/canvas_painter.h (right): https://codereview.chromium.org/1161933007/diff/60001/ui/compositor/canvas_painter.h#newcode38 ui/compositor/canvas_painter.h:38: float raster_scale_factor_; const https://codereview.chromium.org/1161933007/diff/60001/ui/compositor/canvas_painter.h#newcode39 ui/compositor/canvas_painter.h:39: gfx::Rect rect_; const
5 years, 6 months ago (2015-06-04 22:51:29 UTC) #2
danakj
Thanks! https://codereview.chromium.org/1161933007/diff/60001/ui/compositor/canvas_painter.h File ui/compositor/canvas_painter.h (right): https://codereview.chromium.org/1161933007/diff/60001/ui/compositor/canvas_painter.h#newcode38 ui/compositor/canvas_painter.h:38: float raster_scale_factor_; On 2015/06/04 22:51:29, sky wrote: > ...
5 years, 6 months ago (2015-06-04 22:56:19 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1161933007/80001
5 years, 6 months ago (2015-06-04 23:00:53 UTC) #6
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 6 months ago (2015-06-04 23:45:01 UTC) #7
commit-bot: I haz the power
5 years, 6 months ago (2015-06-04 23:46:00 UTC) #8
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/b03846d6b0f0bfaa40fb0c3145f06f486549b474
Cr-Commit-Position: refs/heads/master@{#332963}

Powered by Google App Engine
This is Rietveld 408576698