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

Issue 11146009: Mac Flash: Fix scaling bitmap (Closed)

Created:
8 years, 2 months ago by sail
Modified:
8 years, 2 months ago
CC:
chromium-reviews, darin-cc_chromium.org
Visibility:
Public.

Description

Mac Flash: Fix scaling bitmap There was a bug in the Flash code that caused a render crash. To reproduce the crash you had to do the following: - run on a Retina device - disable accelerated compositing - enable click to play In this case playing a flash video would crash the renderer. The problem was that we were incorrectly calculating the scaled rect of a bitmap. For example, when the pixel size of the bitmap is 1x1 the scaled size should be 0x0. Instead we were rounding up and returning a scaled valeu of 1x1. Fix was to use ToEnclosedRect instead of ToEnclosingRect. BUG=155309 TBR=brettw@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=162384

Patch Set 1 #

Patch Set 2 : add test #

Patch Set 3 : clean up #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -7 lines) Patch
A webkit/plugins/ppapi/mock_platform_image_2d.h View 1 1 chunk +31 lines, -0 lines 0 comments Download
A webkit/plugins/ppapi/mock_platform_image_2d.cc View 1 1 chunk +34 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.cc View 1 2 chunks +2 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.cc View 1 chunk +1 line, -1 line 0 comments Download
M webkit/plugins/ppapi/ppapi_unittest.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_unittest.cc View 1 3 chunks +8 lines, -1 line 0 comments Download
M webkit/plugins/ppapi/ppb_graphics_2d_impl.h View 1 1 chunk +3 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_graphics_2d_impl_unittest.cc View 1 2 2 chunks +45 lines, -1 line 0 comments Download
M webkit/tools/test_shell/test_shell.gypi View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
sail
8 years, 2 months ago (2012-10-14 21:33:46 UTC) #1
Scott Hess - ex-Googler
lgtm
8 years, 2 months ago (2012-10-14 21:43:46 UTC) #2
Nico
test?
8 years, 2 months ago (2012-10-14 22:08:01 UTC) #3
danakj
I'm not sure what I should review here. You used ToEnclosedRect correctly, so lgtm? But ...
8 years, 2 months ago (2012-10-16 00:54:52 UTC) #4
sail
Added test, please take another look.
8 years, 2 months ago (2012-10-16 18:44:27 UTC) #5
sail
+brettw for test changes
8 years, 2 months ago (2012-10-16 18:45:25 UTC) #6
sail
On 2012/10/16 00:54:52, danakj wrote: > I'm not sure what I should review here. You ...
8 years, 2 months ago (2012-10-16 18:46:30 UTC) #7
danakj
On 2012/10/16 18:46:30, sail wrote: > On 2012/10/16 00:54:52, danakj wrote: > > I'm not ...
8 years, 2 months ago (2012-10-16 18:52:56 UTC) #8
sail
On 2012/10/16 18:52:56, danakj wrote: > On 2012/10/16 18:46:30, sail wrote: > > On 2012/10/16 ...
8 years, 2 months ago (2012-10-16 19:15:34 UTC) #9
sail
+vollick ^^ See above conversation.
8 years, 2 months ago (2012-10-16 19:15:56 UTC) #10
sail
spamming more webkit/plugin/ppapi/* OWNERS
8 years, 2 months ago (2012-10-16 21:31:38 UTC) #11
danakj
On 2012/10/16 19:15:34, sail wrote: > On 2012/10/16 18:52:56, danakj wrote: > > On 2012/10/16 ...
8 years, 2 months ago (2012-10-16 21:35:50 UTC) #12
sail
On 2012/10/16 21:35:50, danakj wrote: > On 2012/10/16 19:15:34, sail wrote: > > On 2012/10/16 ...
8 years, 2 months ago (2012-10-16 21:44:10 UTC) #13
danakj
> When the bitmap is first initialized it's pixel rect is 1x1. Consider 1.5 scale ...
8 years, 2 months ago (2012-10-16 21:55:16 UTC) #14
Nico
Thanks for adding a test. This lgtm as crash fix. Medium term, it'd be good ...
8 years, 2 months ago (2012-10-16 22:08:58 UTC) #15
sail
On 2012/10/16 21:55:16, danakj wrote: > > When the bitmap is first initialized it's pixel ...
8 years, 2 months ago (2012-10-16 22:17:34 UTC) #16
danakj
I see, thanks for the explanations. I'm glad Nico is pointing toward where this code ...
8 years, 2 months ago (2012-10-16 22:30:15 UTC) #17
piman
lgtm
8 years, 2 months ago (2012-10-16 23:31:15 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sail@chromium.org/11146009/8001
8 years, 2 months ago (2012-10-16 23:36:13 UTC) #19
commit-bot: I haz the power
Presubmit check for 11146009-8001 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 2 months ago (2012-10-16 23:36:21 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sail@chromium.org/11146009/8001
8 years, 2 months ago (2012-10-16 23:38:06 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sail@chromium.org/11146009/8001
8 years, 2 months ago (2012-10-17 11:16:06 UTC) #22
commit-bot: I haz the power
8 years, 2 months ago (2012-10-17 13:22:35 UTC) #23
Change committed as 162384

Powered by Google App Engine
This is Rietveld 408576698