Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend
commit9d611ca0375cf3594423fa8571a30ed356e568f6
authorreed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 14 Nov 2012 13:46:56 +0000 (14 13:46 +0000)
committerreed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 14 Nov 2012 13:46:56 +0000 (14 13:46 +0000)
tree6e04e592faf658dd786ea2cb1115af7ac7247124
parentbd3db410a3334cbcbd50247306d286326003eb2c
Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend
SkCanvas in any way, other than provide a host of constructors (and delayed constructors
in the form of 'initialize' methods).

These late initializers are a problem, as SkCanvas is deprecating its setDevice() call,
moving to model where the backingstore/device for the canvas must be created before the
canvas is created. This is necessary to allow skia to continue to extend SkCanvas for
its backends (e.g. GPU, PDF, Picture, Pipe, etc.).

The practical change in this CL is to make PlatformCanvas just a typedef for SkCanvas,
and change the call-sites that want to call initialize() to instead create the canvas
using one of the provided Factory functions (e.g. CreatePlatformCanvas). The modifier
Platform is maintained, to document that this canvas may be backed by platform-specific
pixels (e.g. allocated by GDI or cairo).
Review URL: https://codereview.chromium.org/11138024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167669 0039d316-1c4b-4281-b951-d872f2087c98
52 files changed:
chrome/renderer/automation/automation_renderer_helper.cc
chrome/renderer/chrome_render_view_observer.cc
chrome/renderer/safe_browsing/phishing_thumbnailer.cc
content/plugin/webplugin_proxy.cc
content/plugin/webplugin_proxy.h
content/renderer/browser_plugin/browser_plugin.cc
content/renderer/pepper/pepper_platform_image_2d_impl.cc
content/renderer/pepper/pepper_platform_image_2d_impl.h
content/renderer/render_process.h
content/renderer/render_process_impl.cc
content/renderer/render_process_impl.h
content/renderer/render_widget.h
content/renderer/webplugin_delegate_proxy.cc
content/renderer/webplugin_delegate_proxy.h
content/shell/webkit_test_runner.cc
content/test/mock_render_process.cc
ppapi/proxy/ppb_image_data_proxy.cc
ppapi/proxy/ppb_image_data_proxy.h
ppapi/shared_impl/private/ppb_browser_font_trusted_shared.cc
ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h
ppapi/thunk/ppb_image_data_api.h
skia/ext/bitmap_platform_device_android.cc
skia/ext/bitmap_platform_device_linux.cc
skia/ext/bitmap_platform_device_mac.cc
skia/ext/bitmap_platform_device_win.cc
skia/ext/platform_canvas.cc
skia/ext/platform_canvas.h
skia/ext/platform_canvas_linux.cc [deleted file]
skia/ext/platform_canvas_mac.cc [deleted file]
skia/ext/platform_canvas_skia.cc [deleted file]
skia/ext/platform_canvas_unittest.cc
skia/ext/platform_canvas_win.cc [deleted file]
skia/ext/vector_canvas_unittest.cc
skia/skia.gyp
ui/gfx/blit_unittest.cc
ui/gfx/canvas.cc
ui/gfx/canvas_paint_gtk.cc
ui/gfx/canvas_paint_win.h
ui/gfx/image/image_skia_operations.cc
ui/surface/transport_dib.h
ui/surface/transport_dib_android.cc
ui/surface/transport_dib_linux.cc
ui/surface/transport_dib_mac.cc
ui/surface/transport_dib_win.cc
webkit/glue/webkit_glue.h
webkit/plugins/ppapi/mock_platform_image_2d.cc
webkit/plugins/ppapi/mock_platform_image_2d.h
webkit/plugins/ppapi/plugin_delegate.h
webkit/plugins/ppapi/ppb_image_data_impl.h
webkit/tools/test_shell/webwidget_host_gtk.cc
webkit/tools/test_shell/webwidget_host_mac.mm
webkit/tools/test_shell/webwidget_host_win.cc