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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 11414308: Add vsync notification command line switch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 prefs.accelerated_compositing_for_overflow_scroll_enabled = false; 488 prefs.accelerated_compositing_for_overflow_scroll_enabled = false;
489 489
490 prefs.accelerated_compositing_for_scrollable_frames_enabled = 490 prefs.accelerated_compositing_for_scrollable_frames_enabled =
491 command_line.HasSwitch(switches::kEnableAcceleratedScrollableFrames); 491 command_line.HasSwitch(switches::kEnableAcceleratedScrollableFrames);
492 prefs.composited_scrolling_for_frames_enabled = 492 prefs.composited_scrolling_for_frames_enabled =
493 command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames); 493 command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames);
494 prefs.show_paint_rects = 494 prefs.show_paint_rects =
495 command_line.HasSwitch(switches::kShowPaintRects); 495 command_line.HasSwitch(switches::kShowPaintRects);
496 prefs.render_vsync_enabled = 496 prefs.render_vsync_enabled =
497 !command_line.HasSwitch(switches::kDisableGpuVsync); 497 !command_line.HasSwitch(switches::kDisableGpuVsync);
498 prefs.render_vsync_notification_enabled =
499 command_line.HasSwitch(cc::switches::kEnableVsyncNotification);
498 prefs.accelerated_compositing_enabled = 500 prefs.accelerated_compositing_enabled =
499 GpuProcessHost::gpu_enabled() && 501 GpuProcessHost::gpu_enabled() &&
500 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); 502 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing);
501 #if defined(OS_WIN) && defined(ENABLE_HIDPI) 503 #if defined(OS_WIN) && defined(ENABLE_HIDPI)
502 prefs.force_compositing_mode = true; 504 prefs.force_compositing_mode = true;
503 #else 505 #else
504 prefs.force_compositing_mode = 506 prefs.force_compositing_mode =
505 content::IsForceCompositingModeEnabled() && 507 content::IsForceCompositingModeEnabled() &&
506 !command_line.HasSwitch(switches::kDisableForceCompositingMode); 508 !command_line.HasSwitch(switches::kDisableForceCompositingMode);
507 #endif 509 #endif
(...skipping 2989 matching lines...) Expand 10 before | Expand all | Expand 10 after
3497 3499
3498 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const { 3500 BrowserPluginGuest* WebContentsImpl::GetBrowserPluginGuest() const {
3499 return browser_plugin_guest_.get(); 3501 return browser_plugin_guest_.get();
3500 } 3502 }
3501 3503
3502 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const { 3504 BrowserPluginEmbedder* WebContentsImpl::GetBrowserPluginEmbedder() const {
3503 return browser_plugin_embedder_.get(); 3505 return browser_plugin_embedder_.get();
3504 } 3506 }
3505 3507
3506 } // namespace content 3508 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698