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

Issue 221523003: cc: Remove all usage of GetArea() from production code in cc (Closed)

Created:
6 years, 8 months ago by danakj
Modified:
6 years, 8 months ago
Reviewers:
jschuh, jbauman, piman
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, jam, penghuang+watch_chromium.org, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, cc-bugs_chromium.org, James Su, danakj+watch_chromium.org, miu+watch_chromium.org, enne (OOO)
Visibility:
Public.

Description

cc: Remove all usage of GetArea() from production code in cc Consolidate the calls to turn gfx::Size into a number of bytes onto the cc::SharedBitmap class. The class offers the following methods: 1. Get a size_t bytes and bool saying if you overflowed or not. 2. Get a size_t bytes and crash if you overflow. 3. Get a size_t bytes and don't check for overflow. 4. Tell me if the gfx::Size would overflow to create the size_t bytes. These were the use cases I found in the existing code, plus the addition of case 2. A few places that were finding the size_t bytes without looking for overflow (case 3), from a previously-unchecked gfx::Size, were changed to crash on overflow instead (case 2). R=jbauman@chromium.org, piman@chromium.org BUG=348332 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261817

Patch Set 1 : getarea: #

Total comments: 4

Patch Set 2 : getarea: #

Total comments: 1

Patch Set 3 : getarea: #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -63 lines) Patch
M cc/layers/texture_layer_impl.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M cc/output/software_frame_data.h View 2 chunks +0 lines, -4 lines 0 comments Download
M cc/output/software_frame_data.cc View 1 chunk +0 lines, -13 lines 0 comments Download
M cc/resources/resource_provider.cc View 3 chunks +9 lines, -7 lines 0 comments Download
M cc/resources/shared_bitmap.h View 1 2 2 chunks +11 lines, -3 lines 0 comments Download
M cc/resources/shared_bitmap.cc View 1 2 3 chunks +34 lines, -6 lines 0 comments Download
M cc/resources/texture_mailbox.h View 2 chunks +0 lines, -3 lines 0 comments Download
M cc/resources/texture_mailbox.cc View 3 chunks +6 lines, -13 lines 0 comments Download
M content/browser/renderer_host/software_frame_manager.cc View 1 2 chunks +6 lines, -3 lines 0 comments Download
M content/child/child_shared_bitmap_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/common/cc_messages.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M content/common/host_shared_bitmap_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/common/host_shared_bitmap_manager_unittest.cc View 4 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
danakj
6 years, 8 months ago (2014-04-03 21:33:16 UTC) #1
piman
lgtm https://codereview.chromium.org/221523003/diff/110001/content/browser/renderer_host/software_frame_manager.cc File content/browser/renderer_host/software_frame_manager.cc (right): https://codereview.chromium.org/221523003/diff/110001/content/browser/renderer_host/software_frame_manager.cc#newcode103 content/browser/renderer_host/software_frame_manager.cc:103: // frame_data was received over IPC. nit: missing ...
6 years, 8 months ago (2014-04-03 21:41:20 UTC) #2
danakj
https://codereview.chromium.org/221523003/diff/110001/content/browser/renderer_host/software_frame_manager.cc File content/browser/renderer_host/software_frame_manager.cc (right): https://codereview.chromium.org/221523003/diff/110001/content/browser/renderer_host/software_frame_manager.cc#newcode103 content/browser/renderer_host/software_frame_manager.cc:103: // frame_data was received over IPC. 2014/04/03 21:41:20, piman ...
6 years, 8 months ago (2014-04-03 21:43:48 UTC) #3
jbauman
https://codereview.chromium.org/221523003/diff/110001/cc/resources/shared_bitmap.cc File cc/resources/shared_bitmap.cc (right): https://codereview.chromium.org/221523003/diff/110001/cc/resources/shared_bitmap.cc#newcode35 cc/resources/shared_bitmap.cc:35: s *= size.width(); How does CheckedNumeric deal with multiplication ...
6 years, 8 months ago (2014-04-03 21:47:17 UTC) #4
danakj
https://codereview.chromium.org/221523003/diff/110001/cc/resources/shared_bitmap.cc File cc/resources/shared_bitmap.cc (right): https://codereview.chromium.org/221523003/diff/110001/cc/resources/shared_bitmap.cc#newcode35 cc/resources/shared_bitmap.cc:35: s *= size.width(); On 2014/04/03 21:47:17, jbauman wrote: > ...
6 years, 8 months ago (2014-04-03 21:48:46 UTC) #5
jbauman
On 2014/04/03 21:48:46, danakj wrote: > https://codereview.chromium.org/221523003/diff/110001/cc/resources/shared_bitmap.cc > File cc/resources/shared_bitmap.cc (right): > > https://codereview.chromium.org/221523003/diff/110001/cc/resources/shared_bitmap.cc#newcode35 > ...
6 years, 8 months ago (2014-04-03 21:52:02 UTC) #6
danakj
https://codereview.chromium.org/221523003/diff/120001/cc/resources/shared_bitmap.cc File cc/resources/shared_bitmap.cc (left): https://codereview.chromium.org/221523003/diff/120001/cc/resources/shared_bitmap.cc#oldcode23 cc/resources/shared_bitmap.cc:23: if (size.width() <= 0 || size.height() <= 0) For ...
6 years, 8 months ago (2014-04-04 14:56:03 UTC) #7
danakj
The CQ bit was checked by danakj@chromium.org
6 years, 8 months ago (2014-04-04 15:09:03 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/221523003/140001
6 years, 8 months ago (2014-04-04 15:09:12 UTC) #9
jschuh
I'm out for a few days, but seems good so rubberstamp ipc lgtm.
6 years, 8 months ago (2014-04-04 15:12:16 UTC) #10
danakj
The CQ bit was unchecked by danakj@chromium.org
6 years, 8 months ago (2014-04-04 15:12:48 UTC) #11
danakj
The CQ bit was checked by danakj@chromium.org
6 years, 8 months ago (2014-04-04 15:13:08 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/221523003/140001
6 years, 8 months ago (2014-04-04 15:13:18 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/221523003/140001
6 years, 8 months ago (2014-04-04 15:30:05 UTC) #14
commit-bot: I haz the power
6 years, 8 months ago (2014-04-04 19:01:23 UTC) #15
Message was sent while issue was closed.
Change committed as 261817

Powered by Google App Engine
This is Rietveld 408576698