| Index: content/shell/renderer/webkit_test_runner.cc
|
| diff --git a/content/shell/renderer/webkit_test_runner.cc b/content/shell/renderer/webkit_test_runner.cc
|
| index 67596c0350725830a25eb7209f23aa3edddb12cd..8ef19674007a890bb9e447cb30666fdb8a06cbe5 100644
|
| --- a/content/shell/renderer/webkit_test_runner.cc
|
| +++ b/content/shell/renderer/webkit_test_runner.cc
|
| @@ -648,8 +648,15 @@ void WebKitTestRunner::CaptureDump() {
|
|
|
| if (test_config_.enable_pixel_dumping &&
|
| interfaces->testRunner()->shouldGeneratePixelResults()) {
|
| - proxy()->CapturePixelsAsync(base::Bind(
|
| - &WebKitTestRunner::CaptureDumpPixels, base::Unretained(this)));
|
| + // TODO(danakj): Remove when kForceCompositingMode is everywhere.
|
| + if (!render_view()->GetWebView()->isAcceleratedCompositingActive()) {
|
| + SkBitmap snapshot;
|
| + CopyCanvasToBitmap(proxy()->capturePixels(), &snapshot);
|
| + CaptureDumpPixels(snapshot);
|
| + } else {
|
| + proxy()->CapturePixelsAsync(base::Bind(
|
| + &WebKitTestRunner::CaptureDumpPixels, base::Unretained(this)));
|
| + }
|
| return;
|
| }
|
| }
|
| @@ -657,19 +664,7 @@ void WebKitTestRunner::CaptureDump() {
|
| CaptureDumpComplete();
|
| }
|
|
|
| -void WebKitTestRunner::CaptureDumpPixels(const SkBitmap& compositor_snapshot) {
|
| - SkBitmap snapshot = compositor_snapshot;
|
| -
|
| - CommandLine* cmd = CommandLine::ForCurrentProcess();
|
| - if (!cmd->HasSwitch(switches::kForceCompositingMode) &&
|
| - !cmd->HasSwitch(switches::kEnableThreadedCompositing)) {
|
| - // If the readback fails because we're not in compositing mode, do a
|
| - // synchronous software readback here. This can go away when we have FCM
|
| - // always.
|
| - if (!snapshot.info().fWidth || !snapshot.info().fHeight)
|
| - CopyCanvasToBitmap(proxy()->capturePixels(), &snapshot);
|
| - }
|
| -
|
| +void WebKitTestRunner::CaptureDumpPixels(const SkBitmap& snapshot) {
|
| DCHECK_NE(0, snapshot.info().fWidth);
|
| DCHECK_NE(0, snapshot.info().fHeight);
|
|
|
|
|