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

Issue 441303002: 2D Canvas doesn't blend video with the destination buffer. (Closed)

Created:
6 years, 4 months ago by dshwang
Modified:
6 years, 4 months ago
CC:
cc-bugs_chromium.org, chromium-reviews, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

2D Canvas doesn't blend video with the destination buffer. r283338 causes this bug because the fix overwrites the buffer no matter what. The compositor needs to completely overwrite, while Blink needs to blend. It's because the compositor reuses the buffer resource and Blink draws the video frame on the existing GraphicsContext. BUG=401027 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=291070

Patch Set 1 #

Total comments: 1

Patch Set 2 : Update SkCanvasVideoRendererTest.TransparentFrame #

Total comments: 2

Patch Set 3 : remove stale comment #

Patch Set 4 : Keep Src_Mode on software compositor #

Patch Set 5 : prepare Blink changes #

Patch Set 6 : browser test build fix #

Total comments: 4

Patch Set 7 : remove redundant SkCanvas::clear on compositor #

Total comments: 5

Patch Set 8 : small optimize browser test as danakj@ mentioned. #

Total comments: 1

Patch Set 9 : Add Copy() as syntactic sugar #

Total comments: 3

Patch Set 10 : rebase to ToT. improve TODO comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -31 lines) Patch
M cc/resources/video_resource_updater.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -5 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_browsertest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -7 lines 0 comments Download
M content/renderer/media/android/webmediaplayer_android.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/media/android/webmediaplayer_android.cc View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -0 lines 0 comments Download
M content/renderer/media/webmediaplayer_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/media/webmediaplayer_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -2 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.cc View 1 2 3 4 5 6 7 8 9 1 chunk +15 lines, -4 lines 0 comments Download
M media/filters/skcanvas_video_renderer.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download
M media/filters/skcanvas_video_renderer.cc View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -3 lines 0 comments Download
M media/filters/skcanvas_video_renderer_unittest.cc View 1 2 3 4 5 6 7 8 7 chunks +58 lines, -10 lines 0 comments Download

Messages

Total messages: 35 (0 generated)
dshwang
Hi, this CL fixes canvas bug which https://codereview.chromium.org/388363002/ made. scherkus@, reed1@, could you review media/ ...
6 years, 4 months ago (2014-08-06 11:10:30 UTC) #1
dshwang
https://codereview.chromium.org/441303002/diff/1/media/filters/skcanvas_video_renderer.cc File media/filters/skcanvas_video_renderer.cc (left): https://codereview.chromium.org/441303002/diff/1/media/filters/skcanvas_video_renderer.cc#oldcode221 media/filters/skcanvas_video_renderer.cc:221: paint.setFilterLevel(SkPaint::kLow_FilterLevel); Is Low filter really needed?
6 years, 4 months ago (2014-08-06 11:11:12 UTC) #2
danakj
https://codereview.chromium.org/441303002/diff/20001/media/filters/skcanvas_video_renderer_unittest.cc File media/filters/skcanvas_video_renderer_unittest.cc (right): https://codereview.chromium.org/441303002/diff/20001/media/filters/skcanvas_video_renderer_unittest.cc#newcode218 media/filters/skcanvas_video_renderer_unittest.cc:218: // Test that we don't blend with existing canvas ...
6 years, 4 months ago (2014-08-06 13:39:15 UTC) #3
Justin Novosad
Using the src compositing mode and skipping the initial clear is a generally useful optimization. ...
6 years, 4 months ago (2014-08-06 14:29:16 UTC) #4
dshwang
On 2014/08/06 14:29:16, junov wrote: > Using the src compositing mode and skipping the initial ...
6 years, 4 months ago (2014-08-06 14:35:53 UTC) #5
dshwang
https://codereview.chromium.org/441303002/diff/20001/media/filters/skcanvas_video_renderer_unittest.cc File media/filters/skcanvas_video_renderer_unittest.cc (right): https://codereview.chromium.org/441303002/diff/20001/media/filters/skcanvas_video_renderer_unittest.cc#newcode218 media/filters/skcanvas_video_renderer_unittest.cc:218: // Test that we don't blend with existing canvas ...
6 years, 4 months ago (2014-08-06 14:47:51 UTC) #6
danakj
On 2014/08/06 14:35:53, dshwang wrote: > On 2014/08/06 14:29:16, junov wrote: > > Using the ...
6 years, 4 months ago (2014-08-06 15:56:40 UTC) #7
dshwang
On 2014/08/06 15:56:40, danakj wrote: > Can you pass the blend mode from somewhere on ...
6 years, 4 months ago (2014-08-06 17:41:30 UTC) #8
danakj
https://codereview.chromium.org/441303002/diff/100001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/441303002/diff/100001/cc/resources/video_resource_updater.cc#newcode252 cc/resources/video_resource_updater.cc:252: // Use SRC mode so we completely overwrite the ...
6 years, 4 months ago (2014-08-06 18:07:16 UTC) #9
dshwang
https://codereview.chromium.org/441303002/diff/100001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/441303002/diff/100001/cc/resources/video_resource_updater.cc#newcode252 cc/resources/video_resource_updater.cc:252: // Use SRC mode so we completely overwrite the ...
6 years, 4 months ago (2014-08-06 18:12:40 UTC) #10
danakj
cc LGTM
6 years, 4 months ago (2014-08-06 18:18:48 UTC) #11
Justin Novosad
lgtm (non-owner) https://codereview.chromium.org/441303002/diff/120001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/441303002/diff/120001/cc/resources/video_resource_updater.cc#newcode257 cc/resources/video_resource_updater.cc:257: SkXfermode::kSrc_Mode); Excellent!
6 years, 4 months ago (2014-08-06 18:30:29 UTC) #12
danakj
https://codereview.chromium.org/441303002/diff/120001/content/browser/renderer_host/render_widget_host_view_browsertest.cc File content/browser/renderer_host/render_widget_host_view_browsertest.cc (right): https://codereview.chromium.org/441303002/diff/120001/content/browser/renderer_host/render_widget_host_view_browsertest.cc#newcode494 content/browser/renderer_host/render_widget_host_view_browsertest.cc:494: bitmap.eraseColor(SK_ColorTRANSPARENT); btw can we remove this then?
6 years, 4 months ago (2014-08-06 18:31:48 UTC) #13
dshwang
danakj, junov, Thank you for quick review. scherkus@, could you review in media/ and content/renderer/media ...
6 years, 4 months ago (2014-08-06 19:22:01 UTC) #14
danakj
https://codereview.chromium.org/441303002/diff/120001/content/browser/renderer_host/render_widget_host_view_browsertest.cc File content/browser/renderer_host/render_widget_host_view_browsertest.cc (right): https://codereview.chromium.org/441303002/diff/120001/content/browser/renderer_host/render_widget_host_view_browsertest.cc#newcode494 content/browser/renderer_host/render_widget_host_view_browsertest.cc:494: bitmap.eraseColor(SK_ColorTRANSPARENT); On 2014/08/06 19:22:01, dshwang wrote: > we can ...
6 years, 4 months ago (2014-08-06 19:23:41 UTC) #15
dshwang
scherkus@, could you review in media/ and content/renderer/media ? aelias@, could you review content/browser/renderer_host/render_widget_host_view_browsertest.cc ? ...
6 years, 4 months ago (2014-08-07 12:47:53 UTC) #16
aelias_OOO_until_Jul13
render_widget_host_view_browsertest.cc lgtm
6 years, 4 months ago (2014-08-07 18:38:50 UTC) #17
scherkus (not reviewing)
rileya: can you look at this for me? you're more up to date on graphics ...
6 years, 4 months ago (2014-08-08 00:03:25 UTC) #18
rileya (GONE FROM CHROMIUM)
On 2014/08/08 00:03:25, scherkus wrote: > rileya: can you look at this for me? you're ...
6 years, 4 months ago (2014-08-08 21:03:24 UTC) #19
aelias_OOO_until_Jul13
On 2014/08/08 at 21:03:24, rileya wrote: > On 2014/08/08 00:03:25, scherkus wrote: > > rileya: ...
6 years, 4 months ago (2014-08-08 21:09:39 UTC) #20
rileya1
Even if it still goes through Skia, I think calling it a copy rather than ...
6 years, 4 months ago (2014-08-08 21:14:32 UTC) #21
aelias_OOO_until_Jul13
On 2014/08/08 at 21:14:32, rileya wrote: > Even if it still goes through Skia, I ...
6 years, 4 months ago (2014-08-08 21:18:17 UTC) #22
dshwang
On 2014/08/08 21:18:17, aelias wrote: > On 2014/08/08 at 21:14:32, rileya wrote: > > Even ...
6 years, 4 months ago (2014-08-11 08:53:10 UTC) #23
rileya (GONE FROM CHROMIUM)
What I meant was keeping Paint() around as-is (without xfermode, just always blend), and having ...
6 years, 4 months ago (2014-08-11 20:25:53 UTC) #24
dshwang
On 2014/08/11 20:25:53, rileya wrote: > What I meant was keeping Paint() around as-is (without ...
6 years, 4 months ago (2014-08-12 08:31:26 UTC) #25
dshwang
rileya@, scherkus@, reed1@, could you review media/ and content/renderer/media ?
6 years, 4 months ago (2014-08-14 12:01:55 UTC) #26
reed1
skia usage looks good
6 years, 4 months ago (2014-08-14 13:47:40 UTC) #27
dshwang
On 2014/08/14 13:47:40, reed1 wrote: > skia usage looks good Thank you. scherkus@, reed1@, could ...
6 years, 4 months ago (2014-08-18 13:24:51 UTC) #28
dshwang
rileya@, scherkus@, could you review media/ and content/renderer/media again? Thanks.
6 years, 4 months ago (2014-08-20 16:50:40 UTC) #29
rileya (GONE FROM CHROMIUM)
Sorry for the delay, was out last week. media/ looks good to me, looks like ...
6 years, 4 months ago (2014-08-21 00:14:11 UTC) #30
scherkus (not reviewing)
nits on comments, but lgtm otherwise https://codereview.chromium.org/441303002/diff/160001/content/renderer/media/android/webmediaplayer_android.h File content/renderer/media/android/webmediaplayer_android.h (right): https://codereview.chromium.org/441303002/diff/160001/content/renderer/media/android/webmediaplayer_android.h#newcode117 content/renderer/media/android/webmediaplayer_android.h:117: // TODO(dshwang): remove ...
6 years, 4 months ago (2014-08-21 01:09:01 UTC) #31
dshwang
On 2014/08/21 01:09:01, scherkus wrote: > nits on comments, but lgtm otherwise > > https://codereview.chromium.org/441303002/diff/160001/content/renderer/media/android/webmediaplayer_android.h ...
6 years, 4 months ago (2014-08-21 12:43:17 UTC) #32
dshwang
The CQ bit was checked by dongseong.hwang@intel.com
6 years, 4 months ago (2014-08-21 12:43:22 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/441303002/180001
6 years, 4 months ago (2014-08-21 12:44:39 UTC) #34
commit-bot: I haz the power
6 years, 4 months ago (2014-08-21 15:00:40 UTC) #35
Message was sent while issue was closed.
Committed patchset #10 (180001) as 291070

Powered by Google App Engine
This is Rietveld 408576698