Commit c14c19c6 authored by kbr@chromium.org's avatar kbr@chromium.org

Revert 272565 "Re-land: cc: Fail more visibly when sync queries ..."

Caused two native crashes in contentshell_instrumentation_tests on
Android Tests (dbg) bot on Blink waterfall.

BUG=377053,371530,373360

> Re-land: cc: Fail more visibly when sync queries are not working correctly.
> 
> Instead of creating an infinite number of sync queries, which will
> eventually cause performance issues, log an error message and block
> until oldest query has passed when reaching 16 pending queries.
> 
> BUG=371530,373360
> 
> Review URL: https://codereview.chromium.org/280543003

TBR=reveman@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272638 0039d316-1c4b-4281-b951-d872f2087c98
parent 9464e40d
......@@ -175,10 +175,6 @@ SamplerType SamplerTypeFromTextureTarget(GLenum target) {
// determine when anti-aliasing is unnecessary.
const float kAntiAliasingEpsilon = 1.0f / 1024.0f;
// Block or crash if the number of pending sync queries reach this high as
// something is seriously wrong on the service side if this happens.
const size_t kMaxPendingSyncQueries = 16;
} // anonymous namespace
class GLRenderer::ScopedUseGrContext {
......@@ -252,11 +248,6 @@ class GLRenderer::SyncQuery {
return !available;
}
void Wait() {
unsigned result = 0;
gl_->GetQueryObjectuivEXT(query_id_, GL_QUERY_RESULT_EXT, &result);
}
private:
class Fence : public ResourceProvider::Fence {
public:
......@@ -450,15 +441,6 @@ void GLRenderer::BeginDrawingFrame(DrawingFrame* frame) {
scoped_refptr<ResourceProvider::Fence> read_lock_fence;
if (use_sync_query_) {
// Block until oldest sync query has passed if the number of pending queries
// ever reach kMaxPendingSyncQueries.
if (pending_sync_queries_.size() >= kMaxPendingSyncQueries) {
LOG(ERROR) << "Reached limit of pending sync queries.";
pending_sync_queries_.front()->Wait();
DCHECK(!pending_sync_queries_.front()->IsPending());
}
while (!pending_sync_queries_.empty()) {
if (pending_sync_queries_.front()->IsPending())
break;
......
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