Commit b4cce56a authored by ccameron's avatar ccameron Committed by Commit bot

Fix unbounded allocation of GL queries

Check to see if previously-allocated queries are done before allocating
new ones. It turns out that destroying a massive list of queries
accounts for 50% of our watchdog timeouts in the GPU process.

BUG=398072

Review URL: https://codereview.chromium.org/642993002

Cr-Commit-Position: refs/heads/master@{#299164}
parent 42148e93
......@@ -116,6 +116,12 @@ double TextureUploader::EstimatedTexturesPerSecond() {
}
void TextureUploader::BeginQuery() {
// Check to see if any of the pending queries are free before allocating a
// new one. If this is not done, queries may be allocated without bound.
// http://crbug.com/398072
if (available_queries_.empty())
ProcessQueries();
if (available_queries_.empty())
available_queries_.push_back(Query::Create(gl_));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment