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

Issue 176943004: [Android] Implement asynchronous zero-copy bitmap capture API. (Closed)

Created:
6 years, 10 months ago by vivekg_samsung
Modified:
6 years, 9 months ago
CC:
chromium-reviews, jbauman+watch_chromium.org, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, jam, penghuang+watch_chromium.org, sievers+watch_chromium.org, joi+watch-content_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, James Su, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

[Android] Implement asynchronous zero-copy bitmap capture API. This introduces zero-copy bitmap capture API for Android. Using this, the caller avoids a duplicate copy of the bitmap being created. This saves us about ~8MB of memory (while using ARGB_8888 for 1920x1080 resolution) or about ~4MB of memory (while using RGB565 for 1920x1080 resolution). This also significantly saves the power on variety of android devices using KitKat.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+204 lines, -36 lines) Patch
M content/browser/android/content_view_core_impl.h View 6 chunks +24 lines, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.cc View 6 chunks +70 lines, -3 lines 1 comment Download
M content/browser/frame_host/render_widget_host_view_child_frame.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 4 chunks +8 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 6 chunks +34 lines, -11 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_gtk.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_gtk.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 chunk +2 lines, -1 line 0 comments Download
M content/port/browser/render_widget_host_view_port.h View 1 chunk +2 lines, -1 line 1 comment Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 3 chunks +19 lines, -0 lines 0 comments Download
M content/public/browser/android/content_view_core.h View 3 chunks +15 lines, -4 lines 0 comments Download
M content/test/test_render_view_host.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/test/test_render_view_host.cc View 1 chunk +2 lines, -1 line 0 comments Download
M ui/gfx/android/java_bitmap.h View 1 chunk +5 lines, -0 lines 0 comments Download
M ui/gfx/android/java_bitmap.cc View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
vivekg
PTAL, thank you!
6 years, 10 months ago (2014-02-26 01:34:55 UTC) #1
vivekg
https://codereview.chromium.org/176943004/diff/1/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/176943004/diff/1/content/browser/android/content_view_core_impl.cc#newcode1531 content/browser/android/content_view_core_impl.cc:1531: //SkBitmap::Config bitmap_config = gfx::ConvertToSkiaConfig(jbitmap_config); This would be enabled once ...
6 years, 10 months ago (2014-02-26 01:44:45 UTC) #2
no sievers
Where does it avoid a copy? I don't think it avoids a copy in any ...
6 years, 10 months ago (2014-02-26 02:17:44 UTC) #3
vivekg
On 2014/02/26 02:17:44, sievers wrote: > Where does it avoid a copy? I don't think ...
6 years, 10 months ago (2014-02-26 02:21:37 UTC) #4
no sievers
On 2014/02/26 02:21:37, vivekg_ wrote: > On 2014/02/26 02:17:44, sievers wrote: > > Where does ...
6 years, 10 months ago (2014-02-26 03:19:20 UTC) #5
no sievers
> This also significantly saves the power on variety of android devices using KitKat. Do ...
6 years, 10 months ago (2014-02-26 03:20:37 UTC) #6
vivekg
On 2014/02/26 03:19:20, sievers wrote: > On 2014/02/26 02:21:37, vivekg_ wrote: > > On 2014/02/26 ...
6 years, 10 months ago (2014-02-26 03:51:03 UTC) #7
no sievers
On 2014/02/26 03:51:03, vivekg_ wrote: > On 2014/02/26 03:19:20, sievers wrote: > > On 2014/02/26 ...
6 years, 10 months ago (2014-02-26 17:31:38 UTC) #8
vivekg
On 2014/02/26 17:31:38, sievers wrote: > On 2014/02/26 03:51:03, vivekg_ wrote: > > On 2014/02/26 ...
6 years, 10 months ago (2014-02-26 17:48:00 UTC) #9
no sievers
On 2014/02/26 17:48:00, vivekg_ wrote: > On 2014/02/26 17:31:38, sievers wrote: > > On 2014/02/26 ...
6 years, 10 months ago (2014-02-26 17:58:58 UTC) #10
vivekg
On 2014/02/26 17:58:58, sievers wrote: > On 2014/02/26 17:48:00, vivekg_ wrote: > > On 2014/02/26 ...
6 years, 10 months ago (2014-02-26 18:18:58 UTC) #11
no sievers
On 2014/02/26 18:18:58, vivekg_ wrote: > On 2014/02/26 17:58:58, sievers wrote: > > On 2014/02/26 ...
6 years, 10 months ago (2014-02-26 19:37:55 UTC) #12
vivekg
Sure. Thanks for the review. I am also curious to know where the API GetScaledContentBitmap ...
6 years, 10 months ago (2014-02-27 04:42:09 UTC) #13
powei
On 2014/02/27 04:42:09, vivekg_ wrote: > Sure. Thanks for the review. > > I am ...
6 years, 9 months ago (2014-02-27 07:22:50 UTC) #14
piman
https://codereview.chromium.org/176943004/diff/1/content/port/browser/render_widget_host_view_port.h File content/port/browser/render_widget_host_view_port.h (right): https://codereview.chromium.org/176943004/diff/1/content/port/browser/render_widget_host_view_port.h#newcode186 content/port/browser/render_widget_host_view_port.h:186: scoped_ptr<SkBitmap> bitmap = scoped_ptr<SkBitmap>()) = 0; nit: no default ...
6 years, 9 months ago (2014-03-05 21:07:22 UTC) #15
no sievers
On 2014/03/05 21:07:22, piman wrote: > https://codereview.chromium.org/176943004/diff/1/content/port/browser/render_widget_host_view_port.h > File content/port/browser/render_widget_host_view_port.h (right): > > https://codereview.chromium.org/176943004/diff/1/content/port/browser/render_widget_host_view_port.h#newcode186 > ...
6 years, 9 months ago (2014-03-05 21:08:37 UTC) #16
vivekg_samsung
6 years, 9 months ago (2014-03-06 00:26:30 UTC) #17
Message was sent while issue was closed.
On 2014/03/05 21:08:37, sievers wrote:
> On 2014/03/05 21:07:22, piman wrote:
> >
>
https://codereview.chromium.org/176943004/diff/1/content/port/browser/render_...
> > File content/port/browser/render_widget_host_view_port.h (right):
> > 
> >
>
https://codereview.chromium.org/176943004/diff/1/content/port/browser/render_...
> > content/port/browser/render_widget_host_view_port.h:186:
scoped_ptr<SkBitmap>
> > bitmap = scoped_ptr<SkBitmap>()) = 0;
> > nit: no default argument.
> > 
> > I don't think it's ok that this argument is ignored on all platforms but
> > Android.
> 
> Actually, can we close the issue? Given that we'd rather work around the
problem
> by not using Java bitmaps so much.

Sorry for the confusion, closed the issue. Thank you!

Powered by Google App Engine
This is Rietveld 408576698