diff options
author | kbr <kbr@chromium.org> | 2015-03-17 19:29:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-18 02:30:57 +0000 |
commit | 3f3c5c6bbbfcdb156635c686b822d4ab94797725 (patch) | |
tree | edcd68abd524931dc444e4cf8753d7635e8988b5 /content/browser/gpu/gpu_data_manager_impl.h | |
parent | c0bde7562701892afcf977802e8e45bbbb01660b (diff) | |
download | chromium_src-3f3c5c6bbbfcdb156635c686b822d4ab94797725.zip chromium_src-3f3c5c6bbbfcdb156635c686b822d4ab94797725.tar.gz chromium_src-3f3c5c6bbbfcdb156635c686b822d4ab94797725.tar.bz2 |
Fixed race conditions in SystemInfo.getInfo.
SystemInfo.getInfo was not properly waiting for GPU information to be
collected when the GPU was available. Made this call asynchronous in
the browser DevTools protocol and hooked up GpuDataManager observers
to respond when it's collected. Return the data immediately when there
is no GPU available.
Note that it was not possible to wait for full GPU information to be
collected on Windows. This takes so long that internal 10-second
timeouts in the tests are hit in Debug mode on Windows. Fixed a bug in
MergeGpuInfo where the GpuDataManager would never think that full
information had been collected on Windows. Unfortunately it was not
easy to write a regression test for this fix.
Added a regression test in the gpu_process page set ensuring that the
gl_renderer string will always be available on the GPU bots.
BUG=454906
Review URL: https://codereview.chromium.org/999643002
Cr-Commit-Position: refs/heads/master@{#321058}
Diffstat (limited to 'content/browser/gpu/gpu_data_manager_impl.h')
-rw-r--r-- | content/browser/gpu/gpu_data_manager_impl.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h index 35501e4..44a91fd 100644 --- a/content/browser/gpu/gpu_data_manager_impl.h +++ b/content/browser/gpu/gpu_data_manager_impl.h @@ -72,6 +72,11 @@ class CONTENT_EXPORT GpuDataManagerImpl bool ShouldUseSwiftShader() const override; void RegisterSwiftShaderPath(const base::FilePath& path) override; bool ShouldUseWarp() const override; + // TODO(kbr): the threading model for the GpuDataManagerObservers is + // not well defined, and it's impossible for callers to correctly + // delete observers from anywhere except in one of the observer's + // notification methods. Observer addition and removal, and their + // callbacks, should probably be required to occur on the UI thread. void AddObserver(GpuDataManagerObserver* observer) override; void RemoveObserver(GpuDataManagerObserver* observer) override; void UnblockDomainFrom3DAPIs(const GURL& url) override; |