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

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

Issue 212003002: Re-land: content: Avoid duplicating the logic used to determine GPU features. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use IsDelegatedRendererEnabled in RenderWidgetHostViewAndroid Created 6 years, 9 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/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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 if (command_line.HasSwitch(switches::kEnableLayerSquashing)) 407 if (command_line.HasSwitch(switches::kEnableLayerSquashing))
408 prefs.layer_squashing_enabled = true; 408 prefs.layer_squashing_enabled = true;
409 if (command_line.HasSwitch(switches::kDisableLayerSquashing)) 409 if (command_line.HasSwitch(switches::kDisableLayerSquashing))
410 prefs.layer_squashing_enabled = false; 410 prefs.layer_squashing_enabled = false;
411 411
412 prefs.show_paint_rects = 412 prefs.show_paint_rects =
413 command_line.HasSwitch(switches::kShowPaintRects); 413 command_line.HasSwitch(switches::kShowPaintRects);
414 prefs.accelerated_compositing_enabled = 414 prefs.accelerated_compositing_enabled =
415 GpuProcessHost::gpu_enabled() && 415 GpuProcessHost::gpu_enabled() &&
416 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); 416 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing);
417 prefs.force_compositing_mode = 417 prefs.force_compositing_mode = content::IsForceCompositingModeEnabled();
418 content::IsForceCompositingModeEnabled() &&
419 !command_line.HasSwitch(switches::kDisableForceCompositingMode);
420 prefs.accelerated_2d_canvas_enabled = 418 prefs.accelerated_2d_canvas_enabled =
421 GpuProcessHost::gpu_enabled() && 419 GpuProcessHost::gpu_enabled() &&
422 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); 420 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas);
423 prefs.antialiased_2d_canvas_disabled = 421 prefs.antialiased_2d_canvas_disabled =
424 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing); 422 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing);
425 prefs.accelerated_2d_canvas_msaa_sample_count = 423 prefs.accelerated_2d_canvas_msaa_sample_count =
426 atoi(command_line.GetSwitchValueASCII( 424 atoi(command_line.GetSwitchValueASCII(
427 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); 425 switches::kAcceleratedCanvas2dMSAASampleCount).c_str());
428 prefs.deferred_filters_enabled = 426 prefs.deferred_filters_enabled =
429 command_line.HasSwitch(switches::kEnableDeferredFilters); 427 command_line.HasSwitch(switches::kEnableDeferredFilters);
(...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1951 return true; 1949 return true;
1952 } 1950 }
1953 1951
1954 void RenderViewHostImpl::AttachToFrameTree() { 1952 void RenderViewHostImpl::AttachToFrameTree() {
1955 FrameTree* frame_tree = delegate_->GetFrameTree(); 1953 FrameTree* frame_tree = delegate_->GetFrameTree();
1956 1954
1957 frame_tree->ResetForMainFrameSwap(); 1955 frame_tree->ResetForMainFrameSwap();
1958 } 1956 }
1959 1957
1960 } // namespace content 1958 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698