diff options
author | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-06 13:05:21 +0000 |
---|---|---|
committer | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-06 13:05:21 +0000 |
commit | bbf569f597c93713bad67551807fc06d4cfdaceb (patch) | |
tree | 9b728d40f8e40f05265a9d6962608974ef5ddddb /chrome/browser | |
parent | e966876de05c6692e69cca528eab27b5b54e4b3a (diff) | |
download | chromium_src-bbf569f597c93713bad67551807fc06d4cfdaceb.zip chromium_src-bbf569f597c93713bad67551807fc06d4cfdaceb.tar.gz chromium_src-bbf569f597c93713bad67551807fc06d4cfdaceb.tar.bz2 |
Minor cleanups for views compositor builds.
We do support using the GPU process when the views compositor is active. We no longer need to paint a hole when the views compositor is active.
BUG=none
TEST=Ctrl+Shift+I to open content that is not GPU accelerated. It paints fine.
Review URL: http://codereview.chromium.org/8135031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_views.cc | 19 |
1 files changed, 14 insertions, 5 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 ab3c6d9..d093c99 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_views.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_views.cc @@ -799,12 +799,15 @@ void RenderWidgetHostViewViews::OnPaint(gfx::Canvas* canvas) { 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 + // If we aren't using the views compositor, then + // 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. - canvas->FillRectInt(SK_ColorBLACK, 0, 0, - bounds().width(), bounds().height(), - SkXfermode::kClear_Mode); + if (!get_use_acceleration_when_possible()) { + canvas->FillRectInt(SK_ColorBLACK, 0, 0, + bounds().width(), bounds().height(), + SkXfermode::kClear_Mode); + } DCHECK(!about_to_validate_and_paint_); @@ -1027,9 +1030,15 @@ void RenderWidgetHostViewViews::DestroyPluginContainer( void RenderWidgetHostViewViews::AcceleratedCompositingActivated( bool activated) { - // TODO(anicolao): figure out if we need something here +#if defined(TOUCH_UI) + // If we don't use a views compositor, we currently have no way of + // supporting rendering via the GPU process. + if (!get_use_acceleration_when_possible() && activated) + NOTREACHED(); +#else if (activated) NOTIMPLEMENTED(); +#endif } #endif // TOOLKIT_USES_GTK |