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

Issue 6879013: skia::PlatformCanvas is being deprecated. Going forward we will use gfx::Canvas wherever we need ... (Closed)

Created:
9 years, 8 months ago by alokp
Modified:
9 years, 4 months ago
CC:
chromium-reviews, Erik does not do reviews, brettw-cc_chromium.org, jam, Aaron Boodman, pam+watch_chromium.org, rdsmith+dwatch_chromium.org, Paweł Hajdan Jr., darin-cc_chromium.org
Visibility:
Public.

Description

skia::PlatformCanvas is being deprecated. Going forward we will use gfx::Canvas wherever we need to render using both skia and native context. This patch also refactores gfx::Canvas by not deriving from SkCanvas. It rather wraps an SkCanvas. This will allow us to use other types of skia canvas (such as gpu accelerated) on the fly.

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+781 lines, -390 lines) Patch
M chrome/browser/autocomplete/autocomplete_edit_view_win.cc View 1 2 2 chunks +18 lines, -13 lines 0 comments Download
M chrome/browser/download/download_util.cc View 1 2 3 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/extensions/extension_icon_manager.cc View 1 2 3 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_win.cc View 1 2 4 chunks +12 lines, -10 lines 0 comments Download
M chrome/browser/tab_contents/thumbnail_generator_unittest.cc View 1 2 6 chunks +22 lines, -12 lines 0 comments Download
M chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/gtk/browser_toolbar_gtk.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/gtk/download/download_item_gtk.cc View 1 2 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/gtk/gtk_theme_service.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/infobars/infobar_arrow_model.cc View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/gtk/location_bar_view_gtk.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc View 1 2 7 chunks +25 lines, -18 lines 0 comments Download
M chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc View 1 2 5 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/browser_actions_container.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/bubble/bubble_border.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/create_application_shortcut_view.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/detachable_toolbar_view.cc View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/download/download_item_view.cc View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/fullscreen_exit_bubble.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/infobars/extension_infobar.cc View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/infobars/infobar_background.cc View 1 2 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/infobars/translate_infobar_base.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/content_setting_image_view.cc View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/location_bar/location_bar_view.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/notifications/balloon_view.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/sad_tab_view.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/status_bubble_views.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/tabs/dragged_tab_controller.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/tabs/dragged_tab_view.cc View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/tabs/native_view_photobooth_win.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/tabs/side_tab.cc View 1 2 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab.cc View 1 2 4 chunks +10 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/theme_helpers.cc View 1 2 3 chunks +11 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/theme_install_bubble_view.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/toolbar_view.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/common/badge_util.cc View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/common/extensions/extension_action.cc View 1 2 3 3 chunks +12 lines, -10 lines 0 comments Download
M content/browser/renderer_host/backing_store_skia.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M ui/base/clipboard/clipboard_win.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M ui/gfx/canvas_skia.h View 1 2 7 chunks +24 lines, -11 lines 0 comments Download
M ui/gfx/canvas_skia.cc View 1 2 12 chunks +45 lines, -46 lines 0 comments Download
M ui/gfx/canvas_skia_linux.cc View 1 2 7 chunks +19 lines, -16 lines 0 comments Download
M ui/gfx/canvas_skia_mac.mm View 1 2 3 2 chunks +1 line, -11 lines 0 comments Download
M ui/gfx/canvas_skia_paint.h View 1 2 3 2 chunks +8 lines, -12 lines 0 comments Download
A ui/gfx/canvas_skia_paint_linux.h View 1 2 1 chunk +38 lines, -0 lines 0 comments Download
A ui/gfx/canvas_skia_paint_linux.cc View 1 2 1 chunk +69 lines, -0 lines 0 comments Download
A ui/gfx/canvas_skia_paint_mac.h View 1 2 1 chunk +34 lines, -0 lines 0 comments Download
A ui/gfx/canvas_skia_paint_mac.cc View 1 2 1 chunk +37 lines, -0 lines 0 comments Download
A ui/gfx/canvas_skia_paint_win.h View 1 2 3 1 chunk +37 lines, -0 lines 0 comments Download
A ui/gfx/canvas_skia_paint_win.cc View 1 2 1 chunk +62 lines, -0 lines 0 comments Download
M ui/gfx/canvas_skia_win.cc View 1 2 9 chunks +26 lines, -24 lines 0 comments Download
M ui/gfx/image.cc View 1 2 1 chunk +4 lines, -3 lines 0 comments Download
M ui/ui_gfx.gypi View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M views/background.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M views/controls/button/text_button.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M views/controls/menu/menu_controller.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M views/controls/menu/menu_item_view_win.cc View 1 2 4 chunks +5 lines, -5 lines 0 comments Download
M views/controls/menu/menu_scroll_view_container.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M views/controls/menu/menu_separator_win.cc View 1 2 1 chunk +6 lines, -4 lines 0 comments Download
M views/controls/menu/menu_win.cc View 1 2 3 2 chunks +10 lines, -7 lines 0 comments Download
M views/controls/menu/native_menu_win.cc View 1 2 2 chunks +12 lines, -7 lines 0 comments Download
M views/controls/progress_bar.cc View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M views/controls/table/native_table_win.cc View 1 2 4 chunks +12 lines, -9 lines 0 comments Download
M views/controls/table/table_view.cc View 1 2 5 chunks +15 lines, -11 lines 0 comments Download
M views/controls/textfield/native_textfield_views.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M views/controls/tree/tree_view.cc View 1 2 4 chunks +35 lines, -14 lines 0 comments Download
M views/drag_utils.cc View 1 2 3 3 chunks +5 lines, -3 lines 0 comments Download
M views/native_theme_painter.cc View 1 2 2 chunks +7 lines, -6 lines 0 comments Download
M views/painter.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M views/view_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M views/widget/root_view.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M views/widget/widget_win.cc View 1 2 2 chunks +6 lines, -6 lines 0 comments Download
M webkit/plugins/sad_plugin.cc View 1 2 2 chunks +12 lines, -8 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
alokp
Scott: I am trying to deprecate skia::PlatformCanvas in favor of gfx::Canvas. But before I do ...
9 years, 8 months ago (2011-04-19 21:51:01 UTC) #1
sky
The other day Ben mentioned we might want to nuke Canvas entirely and go back ...
9 years, 8 months ago (2011-04-19 22:18:57 UTC) #2
Ben Goodger (Google)
Yes please can we not add that?
9 years, 8 months ago (2011-04-19 22:24:37 UTC) #3
alokp
On 2011/04/19 22:18:57, sky wrote: > The other day Ben mentioned we might want to ...
9 years, 8 months ago (2011-04-19 22:28:56 UTC) #4
alokp
> Note, the following chain makes me ill: > > canvas->AsCanvasSkia()->skia_canvas()->DoStuff > Mike suggested adding ...
9 years, 8 months ago (2011-04-21 16:30:06 UTC) #5
Ben Goodger (Google)
Since you guys are adding hardware accelerated 2D rendering to skia, I no longer think ...
9 years, 8 months ago (2011-04-21 16:31:57 UTC) #6
reed1
Totally agree. To support displaylists as well (and future extensions) we should also retool the ...
9 years, 8 months ago (2011-04-21 16:47:47 UTC) #7
Jeff Timanus
9 years, 7 months ago (2011-05-04 22:22:29 UTC) #8
How soon is it planned for this change to land?

Jeff

On 2011/04/21 16:47:47, reed1 wrote:
> Totally agree.
> 
> To support displaylists as well (and future extensions) we should also
> retool the helper methods (e.g. FillRectInt) to just be static
> functions. That way there need be zero indirection. e.g.
> 
> canvas->FillRectInt(color, x, y, w, h)
> 
>   becomes
> 
> FillRectInt(canvas, color, x, y, w, h)
> 
> I imagine, if structure this way, Skia itself could later roll some of
> these into its corpus, if they are seen to be useful convenience
> functions.
> 
> mike
> 
> On Thu, Apr 21, 2011 at 12:31 PM, Ben Goodger (Google)
<mailto:ben@chromium.org> wrote:
> > Since you guys are adding hardware accelerated 2D rendering to skia, I no
> > longer think the gfx::Canvas interface is necessary... I added it so I could
> > experiment with a Direct2D backend which I never completed as Skia usage is
> > entrenched in Chrome code.
> > With that in mind, gfx::CanvasSkia could be renamed gfx::Canvas, the old
> > interface removed along with gfx::CanvasDirect2D. I'd prefer to do that than
> > introduce all this extra indirection throughout the code.
> > -Ben
> >
> > On Thu, Apr 21, 2011 at 9:30 AM, <mailto:alokp@chromium.org> wrote:
> >>
> >>> Note, the following chain makes me ill:
> >>
> >>> &nbsp; canvas->AsCanvasSkia()->skia_canvas()->DoStuff
> >>
> >>
> >> Mike suggested adding AsSkiaCanvas() to gfx::Canvas to get rid of an extra
> >> link
> >> in the chain. It is confusing to have both - AsCanvasSkia() and
> >> AsSkiaCanvas()
> >> but it is temporary. If you are planning to get rid of Canvas/CanvasSkia,
> >> it
> >> will go away.
> >>
> >>
> >>
> >> http://codereview.chromium.org/6879013/
> >
> >

Powered by Google App Engine
This is Rietveld 408576698