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

Issue 7633040: CL removing inheritance of SkDevice from PlatformDevice. Flavours of PlatformDevice classes now ... (Closed)

Created:
9 years, 4 months ago by Jeff Timanus
Modified:
9 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

CL removing inheritance of SkDevice from PlatformDevice. PlatformDevice is now a base interface, which is implemented by the various flavours of BitmapPlatformDevice, and VectorPlatformDevice. The BitmapPlatformDevice and VectorPlatformDevice classes now inherit directly from SkDevice, or SkPDFDevice, as appropriate. PlatformDevice helper functions access the PlatformDevice interface attached to a SkDevice via meta-data on the SkDevice. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98230 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98585

Patch Set 1 #

Patch Set 2 : No DEPS changes required. #

Patch Set 3 : Fix use of drawSprite. #

Total comments: 6

Patch Set 4 : '' #

Patch Set 5 : Port to Linux. #

Total comments: 2

Patch Set 6 : Add mac changes. #

Total comments: 18

Patch Set 7 : Coalesce platform_device.h and address comments. #

Patch Set 8 : '' #

Patch Set 9 : Address (some) lint errors. #

Patch Set 10 : Fix mac & windows compile errors. #

Patch Set 11 : '' #

Total comments: 6

Patch Set 12 : Address comments, and compilation issues. #

Total comments: 8

Patch Set 13 : Address comments. #

Patch Set 14 : Fix line-ending. #

Patch Set 15 : Add BSD & SUN macro statements. #

Patch Set 16 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+237 lines, -529 lines) Patch
M printing/pdf_metafile_skia.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -7 lines 0 comments Download
M skia/ext/bitmap_platform_device_linux.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +12 lines, -9 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 2 chunks +8 lines, -1 line 0 comments Download
M skia/ext/bitmap_platform_device_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +8 lines, -7 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 1 chunk +2 lines, -1 line 0 comments Download
M skia/ext/bitmap_platform_device_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +14 lines, -18 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 2 chunks +2 lines, -2 lines 0 comments Download
M skia/ext/platform_device.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +113 lines, -17 lines 0 comments Download
M skia/ext/platform_device.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +8 lines, -1 line 0 comments Download
M skia/ext/platform_device_linux.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -38 lines 0 comments Download
M skia/ext/platform_device_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -13 lines 0 comments Download
M skia/ext/platform_device_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -80 lines 0 comments Download
M skia/ext/platform_device_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +0 lines, -10 lines 0 comments Download
M skia/ext/platform_device_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -90 lines 0 comments Download
M skia/ext/platform_device_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +7 lines, -5 lines 0 comments Download
M skia/ext/vector_platform_device_cairo_linux.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +9 lines, -6 lines 0 comments Download
M skia/ext/vector_platform_device_cairo_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +12 lines, -6 lines 0 comments Download
M skia/ext/vector_platform_device_emf_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -6 lines 0 comments Download
M skia/ext/vector_platform_device_emf_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +6 lines, -9 lines 0 comments Download
M skia/ext/vector_platform_device_skia.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +7 lines, -51 lines 0 comments Download
M skia/ext/vector_platform_device_skia.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +19 lines, -149 lines 0 comments Download
M skia/skia.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
Jeff Timanus
PTAL. Here's a start at what a post-inheritance PlatformDevice world would look like. I think ...
9 years, 4 months ago (2011-08-12 23:59:22 UTC) #1
vandebo (ex-Chrome)
http://codereview.chromium.org/7633040/diff/3007/skia/ext/vector_platform_device_emf_win.h File skia/ext/vector_platform_device_emf_win.h (right): http://codereview.chromium.org/7633040/diff/3007/skia/ext/vector_platform_device_emf_win.h#newcode21 skia/ext/vector_platform_device_emf_win.h:21: class VectorPlatformDeviceEmf : public PlatformDevice, public SkDevice { Would ...
9 years, 4 months ago (2011-08-15 19:52:10 UTC) #2
Jeff Timanus
http://codereview.chromium.org/7633040/diff/3007/skia/ext/vector_platform_device_emf_win.h File skia/ext/vector_platform_device_emf_win.h (right): http://codereview.chromium.org/7633040/diff/3007/skia/ext/vector_platform_device_emf_win.h#newcode21 skia/ext/vector_platform_device_emf_win.h:21: class VectorPlatformDeviceEmf : public PlatformDevice, public SkDevice { On ...
9 years, 4 months ago (2011-08-15 20:06:24 UTC) #3
vandebo (ex-Chrome)
http://codereview.chromium.org/7633040/diff/3007/skia/ext/vector_platform_device_skia.cc File skia/ext/vector_platform_device_skia.cc (right): http://codereview.chromium.org/7633040/diff/3007/skia/ext/vector_platform_device_skia.cc#newcode73 skia/ext/vector_platform_device_skia.cc:73: SkCanvas pdf_canvas(GetOwningDevice()); On 2011/08/15 20:06:25, Jeff Timanus wrote: > ...
9 years, 4 months ago (2011-08-15 20:13:56 UTC) #4
alokp
Sorry for being late to the party - I was out for a week. I ...
9 years, 4 months ago (2011-08-15 20:38:46 UTC) #5
Jeff Timanus
On 2011/08/15 20:38:46, Alok Priyadarshi wrote: > Sorry for being late to the party - ...
9 years, 4 months ago (2011-08-15 20:46:59 UTC) #6
alokp
> My understanding is that some of the classes in skia\ext are genuine SkDevice > ...
9 years, 4 months ago (2011-08-15 20:53:46 UTC) #7
Jeff Timanus
On 2011/08/15 20:53:46, Alok Priyadarshi wrote: > > My understanding is that some of the ...
9 years, 4 months ago (2011-08-16 15:14:40 UTC) #8
alokp
> > > > In that case I will replace PlatformDevice with a set of ...
9 years, 4 months ago (2011-08-16 21:01:23 UTC) #9
Jeff Timanus
On 2011/08/16 21:01:23, Alok Priyadarshi wrote: > > > > > > In that case ...
9 years, 4 months ago (2011-08-17 18:51:12 UTC) #10
Jeff Timanus
On 2011/08/17 18:51:12, Jeff Timanus wrote: > On 2011/08/16 21:01:23, Alok Priyadarshi wrote: > > ...
9 years, 4 months ago (2011-08-18 19:44:24 UTC) #11
alokp
Looks better. Is there still a need to have PlatformDevice decalred in three different files? ...
9 years, 4 months ago (2011-08-19 03:01:41 UTC) #12
Jeff Timanus
On 2011/08/19 03:01:41, Alok Priyadarshi wrote: > Looks better. Is there still a need to ...
9 years, 4 months ago (2011-08-19 18:32:26 UTC) #13
vandebo (ex-Chrome)
http://codereview.chromium.org/7633040/diff/18001/skia/ext/bitmap_platform_device_linux.cc File skia/ext/bitmap_platform_device_linux.cc (right): http://codereview.chromium.org/7633040/diff/18001/skia/ext/bitmap_platform_device_linux.cc#newcode78 skia/ext/bitmap_platform_device_linux.cc:78: BitmapPlatformDevice* BitmapPlatformDevice::Create(int width, int height, bool is_opaque, Formatting was ...
9 years, 4 months ago (2011-08-19 21:54:22 UTC) #14
Jeff Timanus
Thanks for the reviews. Addressed the comments, and uploaded a new patch that removes the ...
9 years, 4 months ago (2011-08-20 02:31:04 UTC) #15
Jeff Timanus
Patch set 8 seems to be introducing a printing regression on Linux (and possibly other ...
9 years, 4 months ago (2011-08-20 02:51:47 UTC) #16
Jeff Timanus
Patch 11 corrects the crash mentioned below. The problem was incorrect reference counting of newly ...
9 years, 4 months ago (2011-08-23 16:14:32 UTC) #17
vandebo (ex-Chrome)
LGTM with nits. http://codereview.chromium.org/7633040/diff/31001/printing/pdf_metafile_skia.cc File printing/pdf_metafile_skia.cc (right): http://codereview.chromium.org/7633040/diff/31001/printing/pdf_metafile_skia.cc#newcode64 printing/pdf_metafile_skia.cc:64: // TODO(ctguil): Refactor: don't create the ...
9 years, 4 months ago (2011-08-23 17:40:35 UTC) #18
Jeff Timanus
Done. Will submit as soon as I get some green trys. http://codereview.chromium.org/7633040/diff/31001/printing/pdf_metafile_skia.cc File printing/pdf_metafile_skia.cc (right): ...
9 years, 4 months ago (2011-08-23 21:13:02 UTC) #19
vandebo (ex-Chrome)
Cool, it'll be great to have this fixed. http://codereview.chromium.org/7633040/diff/38001/skia/ext/platform_device.h File skia/ext/platform_device.h (right): http://codereview.chromium.org/7633040/diff/38001/skia/ext/platform_device.h#newcode89 skia/ext/platform_device.h:89: #elif ...
9 years, 4 months ago (2011-08-23 21:16:41 UTC) #20
alokp
lgtm http://codereview.chromium.org/7633040/diff/38001/skia/ext/bitmap_platform_device_win.cc File skia/ext/bitmap_platform_device_win.cc (right): http://codereview.chromium.org/7633040/diff/38001/skia/ext/bitmap_platform_device_win.cc#newcode157 skia/ext/bitmap_platform_device_win.cc:157: BitmapPlatformDevice* device = BitmapPlatformDevice::create(screen_dc, width, height, nit: formatting ...
9 years, 4 months ago (2011-08-24 17:03:02 UTC) #21
Jeff Timanus
http://codereview.chromium.org/7633040/diff/38001/skia/ext/bitmap_platform_device_win.cc File skia/ext/bitmap_platform_device_win.cc (right): http://codereview.chromium.org/7633040/diff/38001/skia/ext/bitmap_platform_device_win.cc#newcode157 skia/ext/bitmap_platform_device_win.cc:157: BitmapPlatformDevice* device = BitmapPlatformDevice::create(screen_dc, width, height, On 2011/08/24 17:03:02, ...
9 years, 4 months ago (2011-08-24 22:09:58 UTC) #22
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test. Builder is ...
9 years, 4 months ago (2011-08-25 04:06:11 UTC) #23
Jeff Timanus
9 years, 4 months ago (2011-08-25 19:52:50 UTC) #24
Commit was reverted because it broke the shared library builds.

A Skia change is required to properly export SkPDFDevice::setDrawingArea.  See
landed skia change:  http://code.google.com/p/skia/source/detail?r=2172

Will re-submit once skia rolls past 2172.

Powered by Google App Engine
This is Rietveld 408576698