diff options
author | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-06 12:53:45 +0000 |
---|---|---|
committer | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-06 12:53:45 +0000 |
commit | e966876de05c6692e69cca528eab27b5b54e4b3a (patch) | |
tree | a8296ca9d5d9f98df376daa99f9aef373b52e7c7 /chrome | |
parent | 211c6ff7c99de8fee83beae4d9b99414f56e8046 (diff) | |
download | chromium_src-e966876de05c6692e69cca528eab27b5b54e4b3a.zip chromium_src-e966876de05c6692e69cca528eab27b5b54e4b3a.tar.gz chromium_src-e966876de05c6692e69cca528eab27b5b54e4b3a.tar.bz2 |
Flash white instead of black when a new tab is opened.
When a new tab is opened there is a delay associated with getting external textures from webkit. During that time the tab contents are painting using a non accelerated path.
Draw a white texture instead of a black one.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/8136007
Patch from Peter Kotwicz <pkotwicz@chromium.org>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_views.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.cc b/chrome/browser/renderer_host/render_widget_host_view_views.cc index 9ad6ce6..ab3c6d9 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_views.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_views.cc @@ -793,9 +793,12 @@ views::View* RenderWidgetHostViewViews::GetOwnerViewOfTextInputClient() { } void RenderWidgetHostViewViews::OnPaint(gfx::Canvas* canvas) { - if (is_hidden_ || !host_ || host_->is_accelerated_compositing_active()) + if (is_hidden_ || !host_) return; + DCHECK(!host_->is_accelerated_compositing_active() || + get_use_acceleration_when_possible()); + // Paint a "hole" in the canvas so that the render of the web page is on // top of whatever else has already been painted in the views hierarchy. // Later views might still get to paint on top. @@ -864,6 +867,10 @@ void RenderWidgetHostViewViews::OnPaint(gfx::Canvas* canvas) { } else { if (whiteout_start_time_.is_null()) whiteout_start_time_ = base::TimeTicks::Now(); + + if (get_use_acceleration_when_possible()) + canvas->FillRectInt(SK_ColorWHITE, 0, 0, + bounds().width(), bounds().height()); } } |