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

Issue 10891013: Make GpuDataManager thread safe. (Closed)

Created:
8 years, 3 months ago by Zhenyao Mo
Modified:
8 years, 3 months ago
Reviewers:
jbates
CC:
chromium-reviews, mihaip-chromium-reviews_chromium.org, jam, apatrick_chromium, joi+watch-content_chromium.org, Aaron Boodman, darin-cc_chromium.org
Visibility:
Public.

Description

Make GpuDataManager thread safe. Instead of forcing it on UI thread only, this CL makes it thread safe. We already put a locker around gpu_info, this CL puts another locker around log_messages, and the updater_list is thread safe. Therefore, the whole class now is thread safe. Also, I did a little bit clean up, 1) remove two dead function declarations; 2) rename Features to BlacklistedFeatures, because the old naming is confusing and multiple people complained to me already. 3) Expose AddLogMessage() so it can also be called on browser thread, which is the original motivation for me to do this refactoring. I am working on a unit test for GpuDataManager, but will upload it as a separate CL. This CL does not change behavior at all. BUG= TEST=tree Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=154275

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -121 lines) Patch
M chrome/browser/chrome_browser_main.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/component_updater/swiftshader_component_installer.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/gpu_blacklist.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/gpu_feature_checker.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/gpu_util.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/gpu_internals_ui.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/gpu/gpu_feature_browsertest.cc View 8 chunks +16 lines, -8 lines 0 comments Download
M content/browser/gpu/gpu_data_manager_impl.h View 5 chunks +18 lines, -24 lines 0 comments Download
M content/browser/gpu/gpu_data_manager_impl.cc View 13 chunks +59 lines, -58 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/gpu/gpu_process_host_ui_shim.cc View 2 chunks +5 lines, -10 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/gpu_data_manager.h View 3 chunks +21 lines, -10 lines 1 comment Download

Messages

Total messages: 3 (0 generated)
Zhenyao Mo
Please have a look.
8 years, 3 months ago (2012-08-28 23:50:08 UTC) #1
Zhenyao Mo
On 2012/08/28 23:50:08, Zhenyao Mo wrote: > Please have a look. Ping
8 years, 3 months ago (2012-08-30 20:19:57 UTC) #2
jbates
8 years, 3 months ago (2012-08-30 20:29:57 UTC) #3
LGTM with nit

http://codereview.chromium.org/10891013/diff/1/content/public/browser/gpu_dat...
File content/public/browser/gpu_data_manager.h (left):

http://codereview.chromium.org/10891013/diff/1/content/public/browser/gpu_dat...
content/public/browser/gpu_data_manager.h:22: // This class lives on the UI
thread. Only methods that explicitly state that
nit: How about explaining the new threading rules instead here, like: "This
class is fully thread-safe." Or if not, which methods are thread-safe and which
are not...

Powered by Google App Engine
This is Rietveld 408576698