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

Issue 19491: POSIX: bitmap data on the wire (Closed)

Created:
11 years, 10 months ago by Lei Zhang
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

From agl. Cleaned up version of issue 19046. POSIX: bitmap data on the wire On Windows, when drawing a given rect in the renderer, we allocate memory for the bitmap, render and send a shared memory handle across IPC. In the browser, we bitblit the shared memory to the backing store and draw it to the screen. In the long term, on Linux, we want the backingstore to be shared with both X and the renderer. The renderer then draws directly to that store, sends an IPC to the browser and the browser sends a message to X to bitblit to the display. Since only cache a few backing stores we'll need messages from the browser to tell the renderer to attach and detatch from shared memory regions as they get created and evicted. In the short term, however, to get something that works, we make a BitmapWireData typedef. This will be a shared memory region on Windows, as before, and on POSIX we'll be sending the bitmap data over the wire. Obviously this'll be pretty slow but it'll work sooner. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=9065

Patch Set 1 #

Total comments: 18

Patch Set 2 : '' #

Total comments: 24

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 12

Patch Set 7 : '' #

Patch Set 8 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+244 lines, -73 lines) Patch
M chrome/browser/browser.scons View 1 2 3 4 7 chunks +17 lines, -6 lines 0 comments Download
M chrome/browser/renderer_host/backing_store.h View 1 2 3 4 5 6 4 chunks +9 lines, -7 lines 0 comments Download
M chrome/browser/renderer_host/backing_store.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A chrome/browser/renderer_host/backing_store_posix.cc View 1 2 3 1 chunk +37 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/backing_store_win.cc View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host.h View 1 2 3 4 3 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host.cc View 1 2 3 4 5 6 6 chunks +21 lines, -12 lines 0 comments Download
M chrome/chrome.xcodeproj/project.pbxproj View 2 3 4 4 chunks +4 lines, -0 lines 0 comments Download
A chrome/common/bitmap_wire_data.h View 1 2 3 4 6 1 chunk +35 lines, -0 lines 0 comments Download
M chrome/common/render_messages.h View 1 2 3 4 6 8 chunks +35 lines, -14 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 3 4 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/renderer/render_widget.h View 1 2 3 4 5 6 3 chunks +9 lines, -8 lines 0 comments Download
M chrome/renderer/render_widget.cc View 1 2 3 4 5 6 7 6 chunks +52 lines, -14 lines 0 comments Download
M chrome/renderer/renderer.scons View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M skia/ext/platform_canvas_mac.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M skia/ext/platform_canvas_mac.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M skia/ext/platform_canvas_win.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M skia/ext/platform_canvas_win.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Lei Zhang
Primary reviewer: Brett. Adding Darin per Evan's suggestion. Succeeded on the try servers. Brett suggested ...
11 years, 10 months ago (2009-01-30 02:04:16 UTC) #1
brettw
http://codereview.chromium.org/19491/diff/1/6 File chrome/browser/browser.scons (right): http://codereview.chromium.org/19491/diff/1/6#newcode841 Line 841: 'renderer_host/backing_store_posix.cc', I'm a little unclear how this is ...
11 years, 10 months ago (2009-01-30 17:06:47 UTC) #2
Lei Zhang
Also added backing_store_posix.cc to chrome/chrome.xcodeproj/project.pbxproj. http://codereview.chromium.org/19491/diff/1/6 File chrome/browser/browser.scons (right): http://codereview.chromium.org/19491/diff/1/6#newcode841 Line 841: 'renderer_host/backing_store_posix.cc', On 2009/01/30 ...
11 years, 10 months ago (2009-01-31 01:42:06 UTC) #3
brettw
http://codereview.chromium.org/19491/diff/224/229 File chrome/browser/renderer_host/backing_store.h (right): http://codereview.chromium.org/19491/diff/224/229#newcode73 Line 73: scoped_ptr<SkCanvas> canvas_; Can't you make this just a ...
11 years, 10 months ago (2009-02-02 19:14:59 UTC) #4
Evan Stade
http://codereview.chromium.org/19491/diff/224/236 File chrome/renderer/render_widget.cc (right): http://codereview.chromium.org/19491/diff/224/236#newcode383 Line 383: // Setup the given SkBitmap to take ownership ...
11 years, 10 months ago (2009-02-02 19:25:19 UTC) #5
Evan Stade
> But we do need to access the memory region that backs the canvas (see ...
11 years, 10 months ago (2009-02-02 19:28:56 UTC) #6
Lei Zhang
Please take a look at patch set 4. http://codereview.chromium.org/19491/diff/224/229 File chrome/browser/renderer_host/backing_store.h (right): http://codereview.chromium.org/19491/diff/224/229#newcode73 Line 73: ...
11 years, 10 months ago (2009-02-02 23:19:54 UTC) #7
Evan Stade
http://codereview.chromium.org/19491/diff/224/226 File chrome/common/bitmap_wire_data.h (right): http://codereview.chromium.org/19491/diff/224/226#newcode11 Line 11: #include "skia/include/SkBitmap.h" On 2009/02/02 23:19:54, Lei Zhang wrote: ...
11 years, 10 months ago (2009-02-02 23:57:27 UTC) #8
Lei Zhang
Now at patch set 6. http://codereview.chromium.org/19491/diff/224/226 File chrome/common/bitmap_wire_data.h (right): http://codereview.chromium.org/19491/diff/224/226#newcode11 Line 11: #include "skia/include/SkBitmap.h" On ...
11 years, 10 months ago (2009-02-03 01:09:46 UTC) #9
Lei Zhang
FYI Patch set 5 has #include "skia/ext/SkBitmap.h" where estade suggested it should go.
11 years, 10 months ago (2009-02-03 01:14:38 UTC) #10
Evan Stade
just some nits and LGTM (also be sure to take care of the 2 lint ...
11 years, 10 months ago (2009-02-03 01:22:43 UTC) #11
brettw
http://codereview.chromium.org/19491/diff/2413/2415 File chrome/common/bitmap_wire_data.h (right): http://codereview.chromium.org/19491/diff/2413/2415#newcode16 Line 16: On 2009/02/03 01:22:43, estade wrote: > don't need ...
11 years, 10 months ago (2009-02-03 01:30:36 UTC) #12
brettw
LGTM with this one change. http://codereview.chromium.org/19491/diff/2413/2415 File chrome/common/bitmap_wire_data.h (right): http://codereview.chromium.org/19491/diff/2413/2415#newcode9 Line 9: #include "skia/include/SkBitmap.h" I ...
11 years, 10 months ago (2009-02-03 01:33:46 UTC) #13
Lei Zhang
11 years, 10 months ago (2009-02-03 01:47:53 UTC) #14
Addressed last round of comments in patch set 8.

http://codereview.chromium.org/19491/diff/2413/2415
File chrome/common/bitmap_wire_data.h (right):

http://codereview.chromium.org/19491/diff/2413/2415#newcode9
Line 9: #include "skia/include/SkBitmap.h"
On 2009/02/03 01:33:46, brettw wrote:
> I thought you were going to forward declare this?

Yep, reverted back to patch set 5.

http://codereview.chromium.org/19491/diff/2413/2425
File chrome/renderer/render_widget.cc (right):

http://codereview.chromium.org/19491/diff/2413/2425#newcode508
Line 508: true);
On 2009/02/03 01:22:43, estade wrote:
> can fit this on line above

Nope, goes over 80 chars per line by 1.

http://codereview.chromium.org/19491/diff/2413/2425#newcode525
Line 525: // POSIX currently passes the data itself. SkBuffer takes ownership of
On 2009/02/03 01:22:43, estade wrote:
> update comment

done.

http://codereview.chromium.org/19491/diff/2413/2426
File chrome/renderer/render_widget.h (right):

http://codereview.chromium.org/19491/diff/2413/2426#newcode108
Line 108: // Paints the given rectangular region of the WebWidget into paint_buf
(a
On 2009/02/03 01:22:43, estade wrote:
> update comment

Done.

Powered by Google App Engine
This is Rietveld 408576698