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

Issue 10915065: Add PlatformPictureSkia and RecordingPlatformDeviceSkia. (Closed)

Created:
8 years, 3 months ago by reveman
Modified:
7 years, 5 months ago
CC:
chromium-reviews, nduca, tfarina, Alexei Svitkine (slow)
Visibility:
Public.

Description

Add PlatformPictureSkia and RecordingPlatformDeviceSkia. PlatformPictureSkia can be used to record drawing comands while still providing support for platform paint. BUG=123392

Patch Set 1 #

Patch Set 2 : Avoid subclassing of SkPicture. #

Patch Set 3 : Add skia::SupportsDirectPlatformPaint() to avoid using platform paint for text and native controls. #

Patch Set 4 : Include compositor changes #

Patch Set 5 : Minor style changes and move skia include to .cpp file. #

Total comments: 26

Patch Set 6 : Rebase and address code review feedback #

Patch Set 7 : Fix SkProxyCanvas leak #

Total comments: 12

Patch Set 8 : Remove SkRefPtr usage, s/drawPicture/drawInto/ and improve comments. #

Patch Set 9 : Replace SupportsPlatformPaint() with PlatformPaintSupport() which return one of the following enum … #

Total comments: 2

Patch Set 10 : Update native_theme_win too. #

Patch Set 11 : Add PLATFORM_PAINT prefix to PlatformPaint enum and fix another windows build issue. #

Patch Set 12 : Fix another OS_WIN typo. #

Patch Set 13 : And one more.. #

Total comments: 2

Patch Set 14 : Explicit platform paint enum checks #

Total comments: 4

Patch Set 15 : Use static Create() function to create an instance of RecordingPlatformDeviceSkia instead of Create… #

Patch Set 16 : Constrain temporary bitmap size by current clip. #

Patch Set 17 : Just move comment and SkASSERT to correct place #

Patch Set 18 : Add IsPlatformPaintSupported(), update comment in WebPluginDelegateProxy::Paint and require direct … #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+304 lines, -55 lines) Patch
M cc/BitmapSkPictureCanvasLayerTextureUpdater.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M cc/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M cc/SkPictureCanvasLayerTextureUpdater.h View 1 2 3 4 5 6 7 2 chunks +6 lines, -3 lines 0 comments Download
M cc/SkPictureCanvasLayerTextureUpdater.cpp View 1 2 3 4 5 6 7 2 chunks +7 lines, -5 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 1 chunk +3 lines, -6 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 1 chunk +5 lines, -1 line 1 comment 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 1 chunk +9 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 2 chunks +22 lines, -2 lines 0 comments Download
M skia/ext/platform_device.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
A skia/ext/platform_picture_skia.h View 1 2 3 4 5 6 7 1 chunk +34 lines, -0 lines 0 comments Download
A skia/ext/platform_picture_skia.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +48 lines, -0 lines 0 comments Download
A + skia/ext/recording_platform_device_skia.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +17 lines, -18 lines 0 comments Download
A skia/ext/recording_platform_device_skia.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +125 lines, -0 lines 0 comments Download
M skia/ext/vector_platform_device_skia.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M skia/ext/vector_platform_device_skia.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -2 lines 0 comments Download
M skia/skia.gyp View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M ui/base/native_theme/native_theme_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +3 lines, -2 lines 0 comments Download
M ui/gfx/blit.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +6 lines, -5 lines 0 comments Download
M webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M webkit/plugins/npapi/webplugin_delegate_impl_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -1 line 0 comments Download
M webkit/plugins/ppapi/ppb_graphics_2d_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 51 (0 generated)
reveman
Hi, this allows us to support windowless NPAPI plugins when using SkPicture recording and per-tile ...
8 years, 3 months ago (2012-09-04 18:06:12 UTC) #1
alokp
I do not like the fact that we need to inherit from SkPicture. reed@ may ...
8 years, 3 months ago (2012-09-04 19:51:15 UTC) #2
reed1
Is this API just for chrome, or for the plugin itself? In general, I think ...
8 years, 3 months ago (2012-09-04 20:46:55 UTC) #3
reveman
On 2012/09/04 20:46:55, reed1 wrote: > Is this API just for chrome, or for the ...
8 years, 3 months ago (2012-09-04 21:43:59 UTC) #4
reveman
Latest patch doesn't subclass SkPicture and adds the skia::SupportsDirectPlatformPaint function to avoid using platform paint ...
8 years, 3 months ago (2012-09-10 23:47:31 UTC) #5
alokp
Minor comments. reed@ would be the best person to review skia usage. http://codereview.chromium.org/10915065/diff/10003/skia/ext/platform_canvas.h File skia/ext/platform_canvas.h ...
8 years, 3 months ago (2012-09-17 16:29:30 UTC) #6
reed1
http://codereview.chromium.org/10915065/diff/10003/skia/ext/platform_canvas.h File skia/ext/platform_canvas.h (right): http://codereview.chromium.org/10915065/diff/10003/skia/ext/platform_canvas.h#newcode124 skia/ext/platform_canvas.h:124: // given canvas without any indirect rendering taking place. ...
8 years, 3 months ago (2012-09-17 16:51:24 UTC) #7
reveman
Thanks for looking at this! I'll update the patch shortly based on your feedback. http://codereview.chromium.org/10915065/diff/10003/skia/ext/platform_canvas.h ...
8 years, 3 months ago (2012-09-17 21:22:16 UTC) #8
nduca
http://codereview.chromium.org/10915065/diff/10003/skia/ext/platform_canvas.h File skia/ext/platform_canvas.h (right): http://codereview.chromium.org/10915065/diff/10003/skia/ext/platform_canvas.h#newcode124 skia/ext/platform_canvas.h:124: // given canvas without any indirect rendering taking place. ...
8 years, 3 months ago (2012-09-18 09:54:23 UTC) #9
nduca
http://codereview.chromium.org/10915065/diff/10003/skia/ext/platform_picture_skia.cc File skia/ext/platform_picture_skia.cc (right): http://codereview.chromium.org/10915065/diff/10003/skia/ext/platform_picture_skia.cc#newcode22 skia/ext/platform_picture_skia.cc:22: SkCanvas* PlatformPictureSkia::beginRecording(int width, int height) { alokp/reveman, does the ...
8 years, 3 months ago (2012-09-18 09:58:22 UTC) #10
reveman
https://chromiumcodereview.appspot.com/10915065/diff/10003/skia/ext/platform_canvas.h File skia/ext/platform_canvas.h (right): https://chromiumcodereview.appspot.com/10915065/diff/10003/skia/ext/platform_canvas.h#newcode124 skia/ext/platform_canvas.h:124: // given canvas without any indirect rendering taking place. ...
8 years, 3 months ago (2012-09-18 17:56:15 UTC) #11
reveman
https://chromiumcodereview.appspot.com/10915065/diff/10003/skia/ext/platform_picture_skia.cc File skia/ext/platform_picture_skia.cc (right): https://chromiumcodereview.appspot.com/10915065/diff/10003/skia/ext/platform_picture_skia.cc#newcode22 skia/ext/platform_picture_skia.cc:22: SkCanvas* PlatformPictureSkia::beginRecording(int width, int height) { On 2012/09/18 09:58:23, ...
8 years, 3 months ago (2012-09-18 19:45:16 UTC) #12
reveman
Need the following questions answered to move forward: Is SupportsPlatformPaint/SupportsDirectPlatformPaint OK or should I add ...
8 years, 3 months ago (2012-09-19 23:42:53 UTC) #13
reed1
I think this has two large inefficiencies. I'll leave it to other reviews and the ...
8 years, 3 months ago (2012-09-20 13:42:28 UTC) #14
reed1
Regarding the size of the offscreen, I think I may have underestimated its size. Is ...
8 years, 3 months ago (2012-09-20 13:44:35 UTC) #15
alokp
I am fine with updating microbenchmarks in a subsequent patch. http://codereview.chromium.org/10915065/diff/21001/skia/ext/platform_canvas.h File skia/ext/platform_canvas.h (right): http://codereview.chromium.org/10915065/diff/21001/skia/ext/platform_canvas.h#newcode123 ...
8 years, 3 months ago (2012-09-20 15:47:51 UTC) #16
reveman
http://codereview.chromium.org/10915065/diff/21001/skia/ext/platform_canvas.h File skia/ext/platform_canvas.h (right): http://codereview.chromium.org/10915065/diff/21001/skia/ext/platform_canvas.h#newcode123 skia/ext/platform_canvas.h:123: // Returns true if native platform routines can be ...
8 years, 3 months ago (2012-09-20 17:01:26 UTC) #17
reveman
On 2012/09/20 13:42:28, reed1 wrote: > I think this has two large inefficiencies. I'll leave ...
8 years, 3 months ago (2012-09-20 17:07:31 UTC) #18
reveman
On 2012/09/20 13:44:35, reed1 wrote: > Regarding the size of the offscreen, I think I ...
8 years, 3 months ago (2012-09-20 17:13:22 UTC) #19
reed1
Just capturing my take on our recent hangout. 1. rename support query so we're sure ...
8 years, 3 months ago (2012-09-24 15:23:35 UTC) #20
reveman
On 2012/09/24 15:23:35, reed1 wrote: > Just capturing my take on our recent hangout. > ...
8 years, 3 months ago (2012-09-24 20:40:43 UTC) #21
reed1
https://codereview.chromium.org/10915065/diff/37001/skia/ext/platform_canvas.h File skia/ext/platform_canvas.h (right): https://codereview.chromium.org/10915065/diff/37001/skia/ext/platform_canvas.h#newcode117 skia/ext/platform_canvas.h:117: So now a canvas/device will report DIRECT or INDIRECT ...
8 years, 3 months ago (2012-09-24 21:04:01 UTC) #22
reveman
On 2012/09/24 21:04:01, reed1 wrote: > https://codereview.chromium.org/10915065/diff/37001/skia/ext/platform_canvas.h > File skia/ext/platform_canvas.h (right): > > https://codereview.chromium.org/10915065/diff/37001/skia/ext/platform_canvas.h#newcode117 > ...
8 years, 2 months ago (2012-09-24 23:09:40 UTC) #23
reed1
we see do a lot of this DCHECK(skia::PlatformPaintSupport(canvas)); but that routine now returns an enum. ...
8 years, 2 months ago (2012-09-25 11:53:59 UTC) #24
reveman
https://chromiumcodereview.appspot.com/10915065/diff/52003/ui/base/native_theme/native_theme_win.cc File ui/base/native_theme/native_theme_win.cc (right): https://chromiumcodereview.appspot.com/10915065/diff/52003/ui/base/native_theme/native_theme_win.cc#newcode486 ui/base/native_theme/native_theme_win.cc:486: DCHECK(offscreen_canvas.get()); On 2012/09/25 11:53:59, reed1 wrote: > shouldn't we ...
8 years, 2 months ago (2012-09-25 12:04:13 UTC) #25
reed1
I understand why it works today, but I think that is very fragile, and not ...
8 years, 2 months ago (2012-09-25 12:05:30 UTC) #26
reed1
lgtm after we can fixed the DCHECKs
8 years, 2 months ago (2012-09-25 12:06:01 UTC) #27
reveman
On 2012/09/25 12:05:30, reed1 wrote: > I understand why it works today, but I think ...
8 years, 2 months ago (2012-09-25 12:50:55 UTC) #28
reed1
fragile if a later editor reorders or inserts new enums.
8 years, 2 months ago (2012-09-25 13:05:44 UTC) #29
tfarina
http://codereview.chromium.org/10915065/diff/39010/skia/ext/recording_platform_device_skia.h File skia/ext/recording_platform_device_skia.h (right): http://codereview.chromium.org/10915065/diff/39010/skia/ext/recording_platform_device_skia.h#newcode55 skia/ext/recording_platform_device_skia.h:55: SK_API SkDevice* CreateRecordingPlatformDeviceSkia( why not fold this into the ...
8 years, 2 months ago (2012-09-25 16:43:09 UTC) #30
tfarina
http://codereview.chromium.org/10915065/diff/39010/skia/ext/recording_platform_device_skia.h File skia/ext/recording_platform_device_skia.h (right): http://codereview.chromium.org/10915065/diff/39010/skia/ext/recording_platform_device_skia.h#newcode55 skia/ext/recording_platform_device_skia.h:55: SK_API SkDevice* CreateRecordingPlatformDeviceSkia( On 2012/09/25 16:43:09, tfarina wrote: > ...
8 years, 2 months ago (2012-09-25 16:43:45 UTC) #31
reveman
http://codereview.chromium.org/10915065/diff/39010/skia/ext/recording_platform_device_skia.h File skia/ext/recording_platform_device_skia.h (right): http://codereview.chromium.org/10915065/diff/39010/skia/ext/recording_platform_device_skia.h#newcode55 skia/ext/recording_platform_device_skia.h:55: SK_API SkDevice* CreateRecordingPlatformDeviceSkia( On 2012/09/25 16:43:09, tfarina wrote: > ...
8 years, 2 months ago (2012-09-25 18:07:11 UTC) #32
reveman
I included the the clip optimization we talked about in this CL. This is only ...
8 years, 2 months ago (2012-09-25 23:36:59 UTC) #33
reed1
lgtm
8 years, 2 months ago (2012-09-26 13:30:39 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reveman@chromium.org/10915065/56003
8 years, 2 months ago (2012-09-26 13:49:13 UTC) #35
commit-bot: I haz the power
Presubmit check for 10915065-56003 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 2 months ago (2012-09-26 13:49:27 UTC) #36
reveman
Need OWNER lgtm for s/SupportsPlatformPaint/PlatformPaintSupport/ change. No structural changes except in skia/ext which have already ...
8 years, 2 months ago (2012-09-26 14:13:07 UTC) #37
Bernhard Bauer
webkit/plugins/npapi LGTM.
8 years, 2 months ago (2012-09-26 14:22:42 UTC) #38
Alexei Svitkine (slow)
LGTM with a nit. Nit: You seem to be doing a lot of: "skia::PlatformPaintSupport(src_canvas) != ...
8 years, 2 months ago (2012-09-26 14:29:32 UTC) #39
tfarina
On Wed, Sep 26, 2012 at 11:29 AM, <asvitkine@chromium.org> wrote: > e.g. something like: > ...
8 years, 2 months ago (2012-09-26 14:31:42 UTC) #40
reed1
+1 and/or IsPlatformPaintSupported(canvas, DIRECT | INDIRECT); On Wed, Sep 26, 2012 at 10:31 AM, Thiago ...
8 years, 2 months ago (2012-09-26 14:40:18 UTC) #41
piman
lgtm
8 years, 2 months ago (2012-09-26 16:05:34 UTC) #42
jamesr
I think a better strategy for windowless plugins would be to give them a fully ...
8 years, 2 months ago (2012-09-26 17:39:10 UTC) #43
reveman
On 2012/09/26 17:39:10, jamesr wrote: > I think a better strategy for windowless plugins would ...
8 years, 2 months ago (2012-09-26 19:03:23 UTC) #44
jamesr
On 2012/09/26 19:03:23, David Reveman wrote: > On 2012/09/26 17:39:10, jamesr wrote: > > I ...
8 years, 2 months ago (2012-09-26 19:14:49 UTC) #45
jamesr
From https://bugzilla.mozilla.org/show_bug.cgi?id=611698 it looks like what Firefox did is force ClearType off completely for NPAPI ...
8 years, 2 months ago (2012-09-26 19:25:42 UTC) #46
jamesr
On 2012/09/26 19:25:42, jamesr wrote: > From https://bugzilla.mozilla.org/show_bug.cgi?id=611698 it looks like what > Firefox did ...
8 years, 2 months ago (2012-09-26 19:28:18 UTC) #47
reveman
Seems hard to know what plugins and pages this will impact until per-tile painting is ...
8 years, 2 months ago (2012-09-26 20:20:56 UTC) #48
jamesr
On 2012/09/26 20:20:56, David Reveman wrote: > Seems hard to know what plugins and pages ...
8 years, 2 months ago (2012-09-26 20:35:37 UTC) #49
sky
https://codereview.chromium.org/10915065/diff/37048/skia/ext/platform_canvas.h File skia/ext/platform_canvas.h (right): https://codereview.chromium.org/10915065/diff/37048/skia/ext/platform_canvas.h#newcode119 skia/ext/platform_canvas.h:119: SK_API PlatformDevice::PlatformPaint PlatformPaintSupport( Can we have a Get in ...
8 years, 2 months ago (2012-09-26 21:17:32 UTC) #50
Alexei Svitkine (slow)
8 years, 2 months ago (2012-10-04 16:07:55 UTC) #51
Removing myself as reviewer since I'm OOO on vacation.

Powered by Google App Engine
This is Rietveld 408576698