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

Issue 135273008: cc: Use ResourceProvider::Resouce::type to check the type of the given resource. (Closed)

Created:
6 years, 10 months ago by dshwang
Modified:
6 years, 10 months ago
Reviewers:
danakj, piman
CC:
chromium-reviews, cc-bugs_chromium.org, jbauman
Base URL:
https://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

cc: Use ResourceProvider::Resouce::type to check the type of the given resource. Currently, some code uses the type variable to check the type of the given resource, while other code uses the shared_bitmap, pixels or mailbox variable to check the same condition. This CL makes all code use the type variable for this purpose. In addition, this CL clarify texture_pool can be non-null only if the type is Texture and the origin is Internal. In addition, add several DCHECKs to increase readability. BUG=337519 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=248861

Patch Set 1 #

Patch Set 2 : Add DCHECK #

Total comments: 1

Patch Set 3 : Restore ResourceProvider::GetSharedMemory() #

Patch Set 4 : Change CL's purpose #

Total comments: 17

Patch Set 5 : In addition, clarify texture_pool #

Total comments: 10

Patch Set 6 : Improve DCHECKs as reviewer suggested. #

Patch Set 7 : Move Origin enum to better place :) #

Total comments: 6

Patch Set 8 : remove redundant comment. rebase to upstream #

Patch Set 9 : remove redundant comment. rebase to upstream #

Patch Set 10 : upload by intel account #

Total comments: 9

Patch Set 11 : Improve about DCHECK(pixels) #

Total comments: 5

Patch Set 12 : remove trailing comma in one line enum #

Total comments: 1

Patch Set 13 : rebase to upstream #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -50 lines) Patch
M cc/resources/resource_provider.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +4 lines, -5 lines 0 comments Download
M cc/resources/resource_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 31 chunks +62 lines, -45 lines 0 comments Download

Messages

Total messages: 62 (0 generated)
dshwang
6 years, 10 months ago (2014-01-28 15:25:14 UTC) #1
dshwang
https://codereview.chromium.org/135273008/diff/20001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/135273008/diff/20001/cc/resources/resource_provider.cc#newcode273 cc/resources/resource_provider.cc:273: shared_bitmap(bitmap) { shared_bitmap can be NULL, while pixels must ...
6 years, 10 months ago (2014-01-28 15:36:28 UTC) #2
danakj
> In addition, remove unused ResourceProvider::GetSharedMemory() method. This is because the software ubercomp path is ...
6 years, 10 months ago (2014-01-28 16:38:02 UTC) #3
dshwang
On 2014/01/28 16:38:02, danakj wrote: > > In addition, remove unused ResourceProvider::GetSharedMemory() method. > > ...
6 years, 10 months ago (2014-01-28 17:40:03 UTC) #4
danakj
On 2014/01/28 17:40:03, dshwang wrote: > On 2014/01/28 16:38:02, danakj wrote: > > > In ...
6 years, 10 months ago (2014-01-28 17:50:03 UTC) #5
dshwang
On 2014/01/28 17:50:03, danakj wrote: > The CL. Since the "type" field is tied pretty ...
6 years, 10 months ago (2014-01-28 18:32:04 UTC) #6
danakj
https://codereview.chromium.org/135273008/diff/60001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/135273008/diff/60001/cc/resources/resource_provider.cc#newcode278 cc/resources/resource_provider.cc:278: DCHECK(pixels); This is a great DCHECK. Since we don't ...
6 years, 10 months ago (2014-01-28 19:21:22 UTC) #7
dshwang
Thank you for review. I'll address your review soon! https://codereview.chromium.org/135273008/diff/60001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/135273008/diff/60001/cc/resources/resource_provider.cc#newcode278 cc/resources/resource_provider.cc:278: ...
6 years, 10 months ago (2014-01-28 19:48:13 UTC) #8
danakj
https://codereview.chromium.org/135273008/diff/60001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/135273008/diff/60001/cc/resources/resource_provider.cc#newcode1282 cc/resources/resource_provider.cc:1282: DCHECK(source->shared_bitmap); On 2014/01/28 19:48:13, dshwang wrote: > On 2014/01/28 ...
6 years, 10 months ago (2014-01-28 20:05:37 UTC) #9
dshwang
In new patch set, I clarify texture_pool can be non-null only if the type is ...
6 years, 10 months ago (2014-01-28 20:32:16 UTC) #10
dshwang
https://codereview.chromium.org/135273008/diff/80001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/135273008/diff/80001/cc/resources/resource_provider.cc#newcode240 cc/resources/resource_provider.cc:240: DCHECK(texture_pool || origin != Internal); For this DCHECK, I ...
6 years, 10 months ago (2014-01-28 20:35:36 UTC) #11
danakj
https://codereview.chromium.org/135273008/diff/80001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/135273008/diff/80001/cc/resources/resource_provider.cc#newcode240 cc/resources/resource_provider.cc:240: DCHECK(texture_pool || origin != Internal); On 2014/01/28 20:35:36, dshwang ...
6 years, 10 months ago (2014-01-28 21:59:01 UTC) #12
dshwang
On 2014/01/28 21:59:01, danakj wrote: Thank you for careful review! I address everything. Could you ...
6 years, 10 months ago (2014-01-29 17:25:39 UTC) #13
danakj
https://codereview.chromium.org/135273008/diff/120001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/135273008/diff/120001/cc/resources/resource_provider.cc#newcode281 cc/resources/resource_provider.cc:281: DCHECK(pixels); Reviewing a software ubercomp CL (https://codereview.chromium.org/148243013), this will ...
6 years, 10 months ago (2014-01-30 21:50:31 UTC) #14
dshwang
thx for review. could you re-review? https://codereview.chromium.org/135273008/diff/120001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/135273008/diff/120001/cc/resources/resource_provider.cc#newcode281 cc/resources/resource_provider.cc:281: DCHECK(pixels); On 2014/01/30 ...
6 years, 10 months ago (2014-01-31 17:25:34 UTC) #15
danakj
https://codereview.chromium.org/135273008/diff/120001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/135273008/diff/120001/cc/resources/resource_provider.cc#newcode1096 cc/resources/resource_provider.cc:1096: if ((!it->is_software && !gl) || (it->is_software && !pixels)) { ...
6 years, 10 months ago (2014-01-31 17:42:19 UTC) #16
dshwang
Currently, there are 3 places to call Resource(pixels, ...) constructor. As I understand your suggestion, ...
6 years, 10 months ago (2014-01-31 21:20:19 UTC) #17
danakj
Yeh, that sounds good, also a in places where we use the pixel_buffer, or map ...
6 years, 10 months ago (2014-01-31 22:20:11 UTC) #18
dshwang
Thank you for review! Could you re-review? I guess this turn is final :) https://codereview.chromium.org/135273008/diff/320001/cc/resources/resource_provider.cc ...
6 years, 10 months ago (2014-02-03 12:05:12 UTC) #19
danakj
LGTM https://codereview.chromium.org/135273008/diff/320001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/135273008/diff/320001/cc/resources/resource_provider.cc#newcode281 cc/resources/resource_provider.cc:281: DCHECK(origin == Delegated || pixels); On 2014/02/03 12:05:12, ...
6 years, 10 months ago (2014-02-03 18:09:17 UTC) #20
dshwang
Thank you for review! https://codereview.chromium.org/135273008/diff/320001/cc/resources/resource_provider.h File cc/resources/resource_provider.h (right): https://codereview.chromium.org/135273008/diff/320001/cc/resources/resource_provider.h#newcode366 cc/resources/resource_provider.h:366: enum Origin { Internal, External, ...
6 years, 10 months ago (2014-02-03 18:55:10 UTC) #21
dshwang
The CQ bit was checked by dongseong.hwang@intel.com
6 years, 10 months ago (2014-02-03 18:55:27 UTC) #22
danakj
On Mon, Feb 3, 2014 at 1:55 PM, <dongseong.hwang@intel.com> wrote: > Thank you for review! ...
6 years, 10 months ago (2014-02-03 18:56:53 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/135273008/320001
6 years, 10 months ago (2014-02-03 18:57:00 UTC) #24
dshwang
On 2014/02/03 18:55:10, dshwang wrote: > Thank you for review! > > https://codereview.chromium.org/135273008/diff/320001/cc/resources/resource_provider.h > File ...
6 years, 10 months ago (2014-02-03 18:57:54 UTC) #25
danakj
https://codereview.chromium.org/135273008/diff/320001/cc/resources/resource_provider.h File cc/resources/resource_provider.h (right): https://codereview.chromium.org/135273008/diff/320001/cc/resources/resource_provider.h#newcode366 cc/resources/resource_provider.h:366: enum Origin { Internal, External, Delegated, }; On 2014/02/03 ...
6 years, 10 months ago (2014-02-03 18:58:51 UTC) #26
dshwang
The CQ bit was unchecked by dongseong.hwang@intel.com
6 years, 10 months ago (2014-02-03 18:59:16 UTC) #27
commit-bot: I haz the power
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-03 18:59:17 UTC) #28
commit-bot: I haz the power
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-03 18:59:23 UTC) #29
dshwang
On 2014/02/03 18:58:51, danakj wrote: > https://codereview.chromium.org/135273008/diff/320001/cc/resources/resource_provider.h > File cc/resources/resource_provider.h (right): > > https://codereview.chromium.org/135273008/diff/320001/cc/resources/resource_provider.h#newcode366 > ...
6 years, 10 months ago (2014-02-03 18:59:47 UTC) #30
commit-bot: I haz the power
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-03 18:59:49 UTC) #31
dshwang
The CQ bit was checked by dongseong.hwang@intel.com
6 years, 10 months ago (2014-02-03 19:01:18 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/135273008/440002
6 years, 10 months ago (2014-02-03 19:03:19 UTC) #33
dshwang
https://codereview.chromium.org/135273008/diff/440002/cc/resources/resource_provider.h File cc/resources/resource_provider.h (right): https://codereview.chromium.org/135273008/diff/440002/cc/resources/resource_provider.h#newcode366 cc/resources/resource_provider.h:366: enum Origin { Internal, External, Delegated }; I changed ...
6 years, 10 months ago (2014-02-03 19:03:37 UTC) #34
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-03 23:44:04 UTC) #35
commit-bot: I haz the power
Failed to apply patch for cc/resources/resource_provider.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 10 months ago (2014-02-03 23:44:08 UTC) #36
commit-bot: I haz the power
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-03 23:44:08 UTC) #37
commit-bot: I haz the power
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-03 23:44:08 UTC) #38
commit-bot: I haz the power
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-03 23:44:13 UTC) #39
commit-bot: I haz the power
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-03 23:44:22 UTC) #40
commit-bot: I haz the power
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-03 23:44:54 UTC) #41
dshwang
The CQ bit was checked by dongseong.hwang@intel.com
6 years, 10 months ago (2014-02-04 08:55:53 UTC) #42
dshwang
The CQ bit was unchecked by dongseong.hwang@intel.com
6 years, 10 months ago (2014-02-04 08:56:01 UTC) #43
dshwang
The CQ bit was checked by dongseong.hwang@intel.com
6 years, 10 months ago (2014-02-04 11:07:10 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/135273008/820001
6 years, 10 months ago (2014-02-04 11:07:32 UTC) #45
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-04 11:51:26 UTC) #46
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) sync_integration_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=223076
6 years, 10 months ago (2014-02-04 11:51:27 UTC) #47
dshwang
The CQ bit was checked by dongseong.hwang@intel.com
6 years, 10 months ago (2014-02-04 12:40:59 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/135273008/820001
6 years, 10 months ago (2014-02-04 12:41:10 UTC) #49
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-04 13:39:19 UTC) #50
commit-bot: I haz the power
Retried try job too often on ios_dbg_simulator for step(s) url_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=ios_dbg_simulator&number=120756
6 years, 10 months ago (2014-02-04 13:39:20 UTC) #51
skia-commit-bot
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-04 13:39:22 UTC) #52
dshwang
The CQ bit was checked by dongseong.hwang@intel.com
6 years, 10 months ago (2014-02-04 15:56:20 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/135273008/820001
6 years, 10 months ago (2014-02-04 15:58:30 UTC) #54
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-04 17:17:30 UTC) #55
commit-bot: I haz the power
Retried try job too often on ios_dbg_simulator for step(s) url_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=ios_dbg_simulator&number=120912
6 years, 10 months ago (2014-02-04 17:17:31 UTC) #56
dshwang
The CQ bit was checked by dongseong.hwang@intel.com
6 years, 10 months ago (2014-02-04 18:11:46 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/135273008/820001
6 years, 10 months ago (2014-02-04 18:14:43 UTC) #58
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) base_unittests, browser_tests, interactive_ui_tests, net_unittests, sync_integration_tests, unit_tests ...
6 years, 10 months ago (2014-02-04 20:23:50 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/135273008/820001
6 years, 10 months ago (2014-02-04 20:24:51 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dongseong.hwang@intel.com/135273008/820001
6 years, 10 months ago (2014-02-05 00:49:23 UTC) #61
commit-bot: I haz the power
6 years, 10 months ago (2014-02-05 05:30:51 UTC) #62
Message was sent while issue was closed.
Change committed as 248861

Powered by Google App Engine
This is Rietveld 408576698