summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/render_widget_host_view_browsertest.cc
diff options
context:
space:
mode:
authorccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-02 01:40:18 +0000
committerccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-02 01:40:18 +0000
commit5ca3c2c9c7bed1cfe7cdf2413893e40dab56d718 (patch)
tree510c6c2635dac593481d4804cb260b034972815f /content/browser/renderer_host/render_widget_host_view_browsertest.cc
parentd013efc32e29077d3e85b007546c3a65039ae3c2 (diff)
downloadchromium_src-5ca3c2c9c7bed1cfe7cdf2413893e40dab56d718.zip
chromium_src-5ca3c2c9c7bed1cfe7cdf2413893e40dab56d718.tar.gz
chromium_src-5ca3c2c9c7bed1cfe7cdf2413893e40dab56d718.tar.bz2
Fix browser test bugs with delegated rendering on Mac
Add a delay between requesting a snapshot and actually taking the snapshot. This is the previously-encountered issue where the snapshot mechanism lags CALayer content updates by an unspecified amount. Fix places where defined(USE_AURA) was used to check if delegated rendering is enabled. In particular, fix places where this was used to determine if extra error should be given for tab capture tests, and some places where this was used to determine if ImageTransportSurface should be initialized. Add a destroyCompositor method to BrowserCompositorViewCocoa. We don't precisely control when BrowserCompositorViewCocoa are deallocated, but we need to precisely control when the ui::Compositor is destroyed. Use a separate BrowserCompositorViewPlaceholderMac to control the lifetime of the recyclable BrowserCompositorViewCocoa, rather than using the scheme where an "invalid" BrowserCompositorViewMac is used as a placeholder. BUG=314190 NOTRY=True (passed Mac bots) Review URL: https://codereview.chromium.org/358403003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280936 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/render_widget_host_view_browsertest.cc')
-rw-r--r--content/browser/renderer_host/render_widget_host_view_browsertest.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_browsertest.cc b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
index 4dfd18c..302f4fe 100644
--- a/content/browser/renderer_host/render_widget_host_view_browsertest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_browsertest.cc
@@ -620,16 +620,16 @@ class CompositingRenderWidgetHostViewBrowserTestTabCapture
video_frame,
callback);
} else {
-#if defined(USE_AURA)
- if (!content::GpuDataManager::GetInstance()
- ->CanUseGpuBrowserCompositor()) {
- // Skia rendering can cause color differences, particularly in the
- // middle two columns.
- SetAllowableError(2);
- SetExcludeRect(
- gfx::Rect(output_size.width() / 2 - 1, 0, 2, output_size.height()));
+ if (IsDelegatedRendererEnabled()) {
+ if (!content::GpuDataManager::GetInstance()
+ ->CanUseGpuBrowserCompositor()) {
+ // Skia rendering can cause color differences, particularly in the
+ // middle two columns.
+ SetAllowableError(2);
+ SetExcludeRect(gfx::Rect(
+ output_size.width() / 2 - 1, 0, 2, output_size.height()));
+ }
}
-#endif
base::Callback<void(bool, const SkBitmap&)> callback =
base::Bind(&CompositingRenderWidgetHostViewBrowserTestTabCapture::