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

Issue 11031055: Introduce PlatformBitmap, which is a minimal helper class that wraps an SkBitmap (Closed)

Created:
8 years, 2 months ago by reed1
Modified:
8 years, 2 months ago
Reviewers:
brettw
CC:
chromium-reviews, Avi (use Gerrit), mihaip-chromium-reviews_chromium.org, creis+watch_chromium.org, yusukes+watch_chromium.org, gavinp+prer_chromium.org, tburkard+watch_chromium.org, jam, penghuang+watch_chromium.org, cbentzel+watch_chromium.org, joi+watch-content_chromium.org, Aaron Boodman, dominich+watch_chromium.org, darin-cc_chromium.org, ajwong+watch_chromium.org, James Su, mmenke
Visibility:
Public.

Description

Introduce PlatformBitmap, which is a minimal helper class that wraps an SkBitmap and a PlatformSurface. This is used to replace the PlatformCanvas that was being passed to BackingStore to return pixels. The problem to solve is that PlatformCanvas is an extension of SkCanvas, and SkCanvas is losing the ability to have its backend specified after its constructor (for performance reasons). The BackingStore interface only needs to return a copy of its pixels, and offer a platform-specific way to draw into it (i.e. BitBlt). The PlatformSurface is sufficient for this, so the larger infrastructure of PlatformCanvas/PlatformDevice is not required. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=161163

Patch Set 1 #

Patch Set 2 : update linux render_widget_host #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Total comments: 25

Patch Set 11 : #

Total comments: 1

Patch Set 12 : #

Patch Set 13 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+216 lines, -99 lines) Patch
M chrome/browser/extensions/api/tabs/tabs.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/prerender/prerender_tab_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/thumbnails/thumbnail_tab_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/thumbnails/thumbnail_tab_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +5 lines, -5 lines 0 comments Download
M content/browser/renderer_host/backing_store.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/backing_store_aura.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/backing_store_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -4 lines 0 comments Download
M content/browser/renderer_host/backing_store_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/backing_store_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/backing_store_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/backing_store_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -4 lines 0 comments Download
M content/browser/renderer_host/backing_store_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/backing_store_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_gtk.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/test_backing_store.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/test_backing_store.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/test_render_view_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/test_render_view_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/port/browser/render_widget_host_view_port.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +5 lines, -1 line 0 comments Download
M content/public/browser/render_widget_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 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 2 chunks +15 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 2 chunks +25 lines, -1 line 0 comments Download
M skia/ext/bitmap_platform_device_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +25 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 3 chunks +58 lines, -30 lines 0 comments Download
M skia/ext/platform_canvas.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +23 lines, -0 lines 0 comments Download
M skia/ext/platform_canvas.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
reed1
update linux render_widget_host
8 years, 2 months ago (2012-10-04 20:14:58 UTC) #1
reed1
Brett, ping me in chat if you need some guidance on reviewing this. I think ...
8 years, 2 months ago (2012-10-08 18:15:03 UTC) #2
brettw
I don't totally get the Lock/Unlock stuff. None of the unlock implementations do anything, and ...
8 years, 2 months ago (2012-10-09 20:40:12 UTC) #3
reed1
Good comments. I think I can replace Lock/Unlock with just Get, and I can remove ...
8 years, 2 months ago (2012-10-09 21:06:42 UTC) #4
brettw
https://codereview.chromium.org/11031055/diff/27009/skia/ext/platform_canvas.h File skia/ext/platform_canvas.h (right): https://codereview.chromium.org/11031055/diff/27009/skia/ext/platform_canvas.h#newcode169 skia/ext/platform_canvas.h:169: }; If you're doing Chrome code I'd prefer the ...
8 years, 2 months ago (2012-10-09 21:08:22 UTC) #5
reed1
On 2012/10/09 21:08:22, brettw wrote: > https://codereview.chromium.org/11031055/diff/27009/skia/ext/platform_canvas.h > File skia/ext/platform_canvas.h (right): > > https://codereview.chromium.org/11031055/diff/27009/skia/ext/platform_canvas.h#newcode169 > ...
8 years, 2 months ago (2012-10-09 21:30:19 UTC) #6
reed1
I had started with Lock/Unlock semantics, just trying to be defensive. As you noticed, none ...
8 years, 2 months ago (2012-10-09 21:39:37 UTC) #7
brettw
https://codereview.chromium.org/11031055/diff/24019/skia/ext/platform_canvas.h File skia/ext/platform_canvas.h (right): https://codereview.chromium.org/11031055/diff/24019/skia/ext/platform_canvas.h#newcode157 skia/ext/platform_canvas.h:157: PlatformBitmap(); I think you lost the implementation of this ...
8 years, 2 months ago (2012-10-09 21:59:17 UTC) #8
reed1
On 2012/10/09 21:59:17, brettw wrote: > https://codereview.chromium.org/11031055/diff/24019/skia/ext/platform_canvas.h > File skia/ext/platform_canvas.h (right): > > https://codereview.chromium.org/11031055/diff/24019/skia/ext/platform_canvas.h#newcode157 > ...
8 years, 2 months ago (2012-10-10 11:50:58 UTC) #9
reed1
PTAL I will try to run the ppapi tests locally (I never have before), so ...
8 years, 2 months ago (2012-10-10 17:47:27 UTC) #10
brettw
8 years, 2 months ago (2012-10-10 19:41:02 UTC) #11
lgtm

Powered by Google App Engine
This is Rietveld 408576698