Commit d8233279 authored by enne's avatar enne Committed by Commit bot

Remove incorrect isAcceleratedCompositingActive check

isAcceleratedCompositingActive is a racy check asking if the page has
had a compositing update with a non-null root layer.  This check in
WebTestProxy was added as a part of converting layout tests to force
compositing mode to make sure that any test asking for a readback was
going down the composited path rather than the legacy software path.

It should be possible to finish a test and ask for an asynchronous
readback prior to having done any compositing updates.  This check does
not seem legit in the first place, so just remove it.

BUG=397321

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

Cr-Commit-Position: refs/heads/master@{#296450}
parent 8af59efe
......@@ -489,9 +489,9 @@ void WebTestProxyBase::CopyImageAtAndCapturePixels(
// It may happen that there is a scheduled animation and
// no rootGraphicsLayer yet. If so we would run it right now. Otherwise
// isAcceleratedCompositingActive will return false;
// TODO(enne): remove this: http://crbug.com/397321
AnimateNow();
DCHECK(web_widget_->isAcceleratedCompositingActive());
DCHECK(!callback.is_null());
uint64_t sequence_number = blink::Platform::current()->clipboard()->
sequenceNumber(blink::WebClipboard::Buffer());
......@@ -574,9 +574,9 @@ void WebTestProxyBase::CapturePixelsAsync(
// It may happen that there is a scheduled animation and
// no rootGraphicsLayer yet. If so we would run it right now. Otherwise
// isAcceleratedCompositingActive will return false;
// TODO(enne): remove this: http://crbug.com/397321
AnimateNow();
DCHECK(web_widget_->isAcceleratedCompositingActive());
DCHECK(!callback.is_null());
if (test_interfaces_->GetTestRunner()->isPrinting()) {
......@@ -626,9 +626,9 @@ void WebTestProxyBase::DisplayAsyncThen(const base::Closure& callback) {
// It may happen that there is a scheduled animation and
// no rootGraphicsLayer yet. If so we would run it right now. Otherwise
// isAcceleratedCompositingActive will return false;
// TODO(enne): remove this: http://crbug.com/397321
AnimateNow();
CHECK(web_widget_->isAcceleratedCompositingActive());
CapturePixelsAsync(base::Bind(
&WebTestProxyBase::DidDisplayAsync, base::Unretained(this), callback));
}
......
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