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

Issue 11138024: Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend (Closed)

Created:
8 years, 2 months ago by reed1
Modified:
8 years, 1 month ago
Reviewers:
brettw, sky
CC:
chromium-reviews, joi+watch-content_chromium.org, jam, rsesek+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

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). Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=167669

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : #

Patch Set 19 : #

Patch Set 20 : #

Patch Set 21 : #

Patch Set 22 : #

Patch Set 23 : #

Patch Set 24 : #

Patch Set 25 : #

Patch Set 26 : #

Patch Set 27 : #

Patch Set 28 : #

Total comments: 12

Patch Set 29 : #

Patch Set 30 : #

Patch Set 31 : #

Total comments: 6

Patch Set 32 : #

Patch Set 33 : #

Patch Set 34 : #

Total comments: 2

Patch Set 35 : #

Patch Set 36 : #

Patch Set 37 : #

Patch Set 38 : #

Patch Set 39 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+383 lines, -644 lines) Patch
M chrome/renderer/automation/automation_renderer_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/renderer/chrome_render_view_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +13 lines, -19 lines 0 comments Download
M chrome/renderer/safe_browsing/phishing_thumbnailer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +7 lines, -5 lines 0 comments Download
M content/plugin/webplugin_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 5 chunks +6 lines, -7 lines 0 comments Download
M content/plugin/webplugin_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +5 lines, -8 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/pepper_platform_image_2d_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/pepper_platform_image_2d_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_process.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +2 lines, -6 lines 0 comments Download
M content/renderer/render_process_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +2 lines, -4 lines 0 comments Download
M content/renderer/render_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_widget.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +2 lines, -6 lines 0 comments Download
M content/renderer/webplugin_delegate_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 4 chunks +5 lines, -9 lines 0 comments Download
M content/renderer/webplugin_delegate_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 3 chunks +5 lines, -4 lines 0 comments Download
M content/shell/webkit_test_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +11 lines, -10 lines 0 comments Download
M content/test/mock_render_process.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -1 line 0 comments Download
M ppapi/proxy/ppb_image_data_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +2 lines, -2 lines 0 comments Download
M ppapi/proxy/ppb_image_data_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -1 line 0 comments Download
M ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +2 lines, -4 lines 0 comments Download
M ppapi/shared_impl/private/ppb_browser_font_trusted_shared.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +2 lines, -2 lines 0 comments Download
M ppapi/thunk/ppb_image_data_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +1 line, -5 lines 0 comments Download
M skia/ext/bitmap_platform_device_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +8 lines, -0 lines 0 comments Download
M skia/ext/bitmap_platform_device_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +8 lines, -0 lines 0 comments Download
M skia/ext/bitmap_platform_device_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +21 lines, -0 lines 0 comments Download
M skia/ext/bitmap_platform_device_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +16 lines, -5 lines 0 comments Download
M skia/ext/platform_canvas.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 3 chunks +71 lines, -63 lines 0 comments Download
M skia/ext/platform_canvas.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +14 lines, -29 lines 0 comments Download
M skia/ext/platform_canvas_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +0 lines, -38 lines 0 comments Download
M skia/ext/platform_canvas_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +0 lines, -56 lines 0 comments Download
M skia/ext/platform_canvas_skia.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +0 lines, -113 lines 0 comments Download
M skia/ext/platform_canvas_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 4 chunks +91 lines, -91 lines 0 comments Download
M skia/ext/platform_canvas_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +0 lines, -40 lines 0 comments Download
M skia/ext/vector_canvas_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -1 line 0 comments Download
M skia/skia.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 4 chunks +0 lines, -15 lines 0 comments Download
M ui/gfx/blit_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 3 chunks +25 lines, -23 lines 0 comments Download
M ui/gfx/canvas.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 4 chunks +8 lines, -8 lines 0 comments Download
M ui/gfx/canvas_paint_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +3 lines, -6 lines 0 comments Download
M ui/gfx/canvas_paint_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +6 lines, -6 lines 0 comments Download
M ui/gfx/image/image_skia_operations.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +7 lines, -3 lines 0 comments Download
M ui/surface/transport_dib.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +2 lines, -4 lines 0 comments Download
M ui/surface/transport_dib_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +3 lines, -7 lines 0 comments Download
M ui/surface/transport_dib_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +3 lines, -4 lines 0 comments Download
M ui/surface/transport_dib_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +3 lines, -4 lines 0 comments Download
M ui/surface/transport_dib_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +2 lines, -4 lines 0 comments Download
M webkit/glue/webkit_glue.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +2 lines, -5 lines 0 comments Download
M webkit/plugins/ppapi/mock_platform_image_2d.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -0 lines 0 comments Download
M webkit/plugins/ppapi/mock_platform_image_2d.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -1 line 0 comments Download
M webkit/plugins/ppapi/plugin_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 3 chunks +2 lines, -5 lines 0 comments Download
M webkit/plugins/ppapi/ppb_image_data_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 6 chunks +6 lines, -9 lines 0 comments Download
M webkit/tools/test_shell/webwidget_host_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +2 lines, -1 line 0 comments Download
M webkit/tools/test_shell/webwidget_host_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -1 line 0 comments Download
M webkit/tools/test_shell/webwidget_host_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 13 (0 generated)
reed1
control https://chromiumcodereview.appspot.com/10823204
8 years, 1 month ago (2012-10-30 17:48:08 UTC) #1
reed1
Its a biggie, but the organizing principles were: 1. PlatformCanvas was not functionally a subclass, ...
8 years, 1 month ago (2012-11-01 15:28:26 UTC) #2
sky
I didn't look at the whole thing, just a couple of higher level things. https://codereview.chromium.org/11138024/diff/77125/chrome/renderer/automation/automation_renderer_helper.cc ...
8 years, 1 month ago (2012-11-01 17:41:39 UTC) #3
reed1
https://codereview.chromium.org/11138024/diff/77125/chrome/renderer/automation/automation_renderer_helper.cc File chrome/renderer/automation/automation_renderer_helper.cc (right): https://codereview.chromium.org/11138024/diff/77125/chrome/renderer/automation/automation_renderer_helper.cc#newcode70 chrome/renderer/automation/automation_renderer_helper.cc:70: SkCanvas* canvas = skia::CreatePlatformCanvas(new_size.width, new_size.height, On 2012/11/01 17:41:39, sky ...
8 years, 1 month ago (2012-11-01 21:07:21 UTC) #4
sky
https://codereview.chromium.org/11138024/diff/77125/skia/ext/bitmap_platform_device_win.cc File skia/ext/bitmap_platform_device_win.cc (right): https://codereview.chromium.org/11138024/diff/77125/skia/ext/bitmap_platform_device_win.cc#newcode273 skia/ext/bitmap_platform_device_win.cc:273: SkCanvas* CreatePlatformCanvas(int width, int height, bool is_opaque, On 2012/11/01 ...
8 years, 1 month ago (2012-11-01 21:44:57 UTC) #5
reed1
https://codereview.chromium.org/11138024/diff/77125/chrome/renderer/automation/automation_renderer_helper.cc File chrome/renderer/automation/automation_renderer_helper.cc (right): https://codereview.chromium.org/11138024/diff/77125/chrome/renderer/automation/automation_renderer_helper.cc#newcode70 chrome/renderer/automation/automation_renderer_helper.cc:70: SkCanvas* canvas = skia::CreatePlatformCanvas(new_size.width, new_size.height, On 2012/11/01 21:07:21, reed1 ...
8 years, 1 month ago (2012-11-02 15:49:39 UTC) #6
reed1
All comments addressed, modulo I need to study more to understand the repercussions for aura. ...
8 years, 1 month ago (2012-11-02 20:17:16 UTC) #7
sky
I only have nits. https://codereview.chromium.org/11138024/diff/93090/skia/ext/bitmap_platform_device_win.cc File skia/ext/bitmap_platform_device_win.cc (right): https://codereview.chromium.org/11138024/diff/93090/skia/ext/bitmap_platform_device_win.cc#newcode274 skia/ext/bitmap_platform_device_win.cc:274: HANDLE shared_section, OnFailureType failureType) { ...
8 years, 1 month ago (2012-11-05 14:43:10 UTC) #8
reed1
https://codereview.chromium.org/11138024/diff/93090/skia/ext/bitmap_platform_device_win.cc File skia/ext/bitmap_platform_device_win.cc (right): https://codereview.chromium.org/11138024/diff/93090/skia/ext/bitmap_platform_device_win.cc#newcode274 skia/ext/bitmap_platform_device_win.cc:274: HANDLE shared_section, OnFailureType failureType) { On 2012/11/05 14:43:10, sky ...
8 years, 1 month ago (2012-11-05 19:14:13 UTC) #9
reed1
nits addressed. are we good?
8 years, 1 month ago (2012-11-09 22:12:18 UTC) #10
sky
LGTM - You'll need to wait for Brett though.
8 years, 1 month ago (2012-11-12 16:36:32 UTC) #11
brettw
LGTM, I only looked at platform_canvas.h but it looks fine. https://codereview.chromium.org/11138024/diff/87146/skia/ext/platform_canvas.h File skia/ext/platform_canvas.h (right): https://codereview.chromium.org/11138024/diff/87146/skia/ext/platform_canvas.h#newcode18 ...
8 years, 1 month ago (2012-11-12 21:08:52 UTC) #12
reed1
8 years, 1 month ago (2012-11-14 14:01:43 UTC) #13
https://codereview.chromium.org/11138024/diff/87146/skia/ext/platform_canvas.h
File skia/ext/platform_canvas.h (right):

https://codereview.chromium.org/11138024/diff/87146/skia/ext/platform_canvas....
skia/ext/platform_canvas.h:18: /*
On 2012/11/12 21:08:52, brettw wrote:
> Can you use //-style comments instead? We only do it your way in .c files.

Done.

Powered by Google App Engine
This is Rietveld 408576698