Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Unified Diff: views/widget/widget.cc

Issue 7104039: First draft to enable turning off compositor for unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revised to add conditional compilation guards. Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget.cc
diff --git a/views/widget/widget.cc b/views/widget/widget.cc
index e2b2202d5836a8680eff2f62a85bc46f267a50ed..368efca3be596b1d7ef83a2c0c94f3dbd4a32a03 100644
--- a/views/widget/widget.cc
+++ b/views/widget/widget.cc
@@ -634,7 +634,8 @@ void Widget::EnsureCompositor() {
// TODO(sad): If there is a parent Widget, then use the same compositor
// instead of creating a new one here.
gfx::AcceleratedWidget widget = native_widget_->GetAcceleratedWidget();
- if (widget != gfx::kNullAcceleratedWidget)
+ if (widget != gfx::kNullAcceleratedWidget &&
+ View::get_use_acceleration_when_possible())
compositor_ = ui::Compositor::Create(widget);
}
« no previous file with comments | « views/view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698