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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 77083002: Add chromium side flag for enabling/disabling layer squashing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); 367 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks);
368 prefs.allow_file_access_from_file_urls = 368 prefs.allow_file_access_from_file_urls =
369 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); 369 command_line.HasSwitch(switches::kAllowFileAccessFromFiles);
370 370
371 prefs.accelerated_compositing_for_overflow_scroll_enabled = false; 371 prefs.accelerated_compositing_for_overflow_scroll_enabled = false;
372 if (command_line.HasSwitch(switches::kEnableAcceleratedOverflowScroll)) 372 if (command_line.HasSwitch(switches::kEnableAcceleratedOverflowScroll))
373 prefs.accelerated_compositing_for_overflow_scroll_enabled = true; 373 prefs.accelerated_compositing_for_overflow_scroll_enabled = true;
374 if (command_line.HasSwitch(switches::kDisableAcceleratedOverflowScroll)) 374 if (command_line.HasSwitch(switches::kDisableAcceleratedOverflowScroll))
375 prefs.accelerated_compositing_for_overflow_scroll_enabled = false; 375 prefs.accelerated_compositing_for_overflow_scroll_enabled = false;
376 376
377 prefs.layer_squashing_enabled = false;
378 if (command_line.HasSwitch(switches::kEnableLayerSquashing))
379 prefs.layer_squashing_enabled = true;
380 if (command_line.HasSwitch(switches::kDisableLayerSquashing))
381 prefs.layer_squashing_enabled = false;
382
377 prefs.accelerated_compositing_for_scrollable_frames_enabled = false; 383 prefs.accelerated_compositing_for_scrollable_frames_enabled = false;
378 if (command_line.HasSwitch(switches::kEnableAcceleratedScrollableFrames)) 384 if (command_line.HasSwitch(switches::kEnableAcceleratedScrollableFrames))
379 prefs.accelerated_compositing_for_scrollable_frames_enabled = true; 385 prefs.accelerated_compositing_for_scrollable_frames_enabled = true;
380 if (command_line.HasSwitch(switches::kDisableAcceleratedScrollableFrames)) 386 if (command_line.HasSwitch(switches::kDisableAcceleratedScrollableFrames))
381 prefs.accelerated_compositing_for_scrollable_frames_enabled = false; 387 prefs.accelerated_compositing_for_scrollable_frames_enabled = false;
382 388
383 prefs.composited_scrolling_for_frames_enabled = false; 389 prefs.composited_scrolling_for_frames_enabled = false;
384 if (command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames)) 390 if (command_line.HasSwitch(switches::kEnableCompositedScrollingForFrames))
385 prefs.composited_scrolling_for_frames_enabled = true; 391 prefs.composited_scrolling_for_frames_enabled = true;
386 if (command_line.HasSwitch(switches::kDisableCompositedScrollingForFrames)) 392 if (command_line.HasSwitch(switches::kDisableCompositedScrollingForFrames))
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 prefs.accelerated_compositing_for_plugins_enabled = 425 prefs.accelerated_compositing_for_plugins_enabled =
420 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); 426 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins);
421 prefs.accelerated_compositing_for_video_enabled = 427 prefs.accelerated_compositing_for_video_enabled =
422 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); 428 !command_line.HasSwitch(switches::kDisableAcceleratedVideo);
423 prefs.fullscreen_enabled = 429 prefs.fullscreen_enabled =
424 !command_line.HasSwitch(switches::kDisableFullScreen); 430 !command_line.HasSwitch(switches::kDisableFullScreen);
425 prefs.lazy_layout_enabled = 431 prefs.lazy_layout_enabled =
426 command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures); 432 command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures);
427 prefs.region_based_columns_enabled = 433 prefs.region_based_columns_enabled =
428 command_line.HasSwitch(switches::kEnableRegionBasedColumns); 434 command_line.HasSwitch(switches::kEnableRegionBasedColumns);
435 prefs.layer_squashing_enabled =
jochen (gone - plz use gerrit) 2013/11/20 08:59:45 this overrides anything you've set above in line 3
shawnsingh 2013/11/20 18:08:57 whoops - left from a previous iteration of the pat
436 command_line.HasSwitch(switches::kEnableLayerSquashing);
429 prefs.threaded_html_parser = 437 prefs.threaded_html_parser =
430 !command_line.HasSwitch(switches::kDisableThreadedHTMLParser); 438 !command_line.HasSwitch(switches::kDisableThreadedHTMLParser);
431 prefs.experimental_websocket_enabled = 439 prefs.experimental_websocket_enabled =
432 command_line.HasSwitch(switches::kEnableExperimentalWebSocket); 440 command_line.HasSwitch(switches::kEnableExperimentalWebSocket);
433 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport)) { 441 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport)) {
434 prefs.pinch_virtual_viewport_enabled = true; 442 prefs.pinch_virtual_viewport_enabled = true;
435 prefs.pinch_overlay_scrollbar_thickness = 10; 443 prefs.pinch_overlay_scrollbar_thickness = 10;
436 } 444 }
437 prefs.use_solid_color_scrollbars = command_line.HasSwitch( 445 prefs.use_solid_color_scrollbars = command_line.HasSwitch(
438 switches::kEnableOverlayScrollbars); 446 switches::kEnableOverlayScrollbars);
(...skipping 1839 matching lines...) Expand 10 before | Expand all | Expand 10 after
2278 void RenderViewHostImpl::AttachToFrameTree() { 2286 void RenderViewHostImpl::AttachToFrameTree() {
2279 FrameTree* frame_tree = delegate_->GetFrameTree(); 2287 FrameTree* frame_tree = delegate_->GetFrameTree();
2280 2288
2281 frame_tree->SwapMainFrame(main_render_frame_host_.get()); 2289 frame_tree->SwapMainFrame(main_render_frame_host_.get());
2282 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { 2290 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) {
2283 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); 2291 frame_tree->OnFirstNavigationAfterSwap(main_frame_id());
2284 } 2292 }
2285 } 2293 }
2286 2294
2287 } // namespace content 2295 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698