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

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

Issue 10383297: Revert 138415 - Makes the browser send pixels to the GPU process where it should. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 if (command_line.HasSwitch(switches::kDefaultTileHeight)) 539 if (command_line.HasSwitch(switches::kDefaultTileHeight))
540 prefs.default_tile_height = 540 prefs.default_tile_height =
541 GetSwitchValueAsInt(command_line, switches::kDefaultTileHeight, 1); 541 GetSwitchValueAsInt(command_line, switches::kDefaultTileHeight, 1);
542 if (command_line.HasSwitch(switches::kMaxUntiledLayerWidth)) 542 if (command_line.HasSwitch(switches::kMaxUntiledLayerWidth))
543 prefs.max_untiled_layer_width = 543 prefs.max_untiled_layer_width =
544 GetSwitchValueAsInt(command_line, switches::kMaxUntiledLayerWidth, 1); 544 GetSwitchValueAsInt(command_line, switches::kMaxUntiledLayerWidth, 1);
545 if (command_line.HasSwitch(switches::kMaxUntiledLayerHeight)) 545 if (command_line.HasSwitch(switches::kMaxUntiledLayerHeight))
546 prefs.max_untiled_layer_height = 546 prefs.max_untiled_layer_height =
547 GetSwitchValueAsInt(command_line, switches::kMaxUntiledLayerHeight, 1); 547 GetSwitchValueAsInt(command_line, switches::kMaxUntiledLayerHeight, 1);
548 548
549 if (gfx::Screen::IsDIPEnabled()) {
550 // Only apply when using DIP coordinate system as this setting interferes
551 // with fixed layout mode.
552 prefs.apply_default_device_scale_factor_in_compositor = true;
553 }
554
555 content::GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs); 549 content::GetContentClient()->browser()->OverrideWebkitPrefs(rvh, url, &prefs);
556 550
557 return prefs; 551 return prefs;
558 } 552 }
559 553
560 NavigationControllerImpl& WebContentsImpl::GetControllerImpl() { 554 NavigationControllerImpl& WebContentsImpl::GetControllerImpl() {
561 return controller_; 555 return controller_;
562 } 556 }
563 557
564 RenderViewHostManager* WebContentsImpl::GetRenderManagerForTesting() { 558 RenderViewHostManager* WebContentsImpl::GetRenderManagerForTesting() {
(...skipping 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2810 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2817 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); 2811 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh);
2818 // Can be NULL during tests. 2812 // Can be NULL during tests.
2819 if (rwh_view) 2813 if (rwh_view)
2820 rwh_view->SetSize(GetView()->GetContainerSize()); 2814 rwh_view->SetSize(GetView()->GetContainerSize());
2821 } 2815 }
2822 2816
2823 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { 2817 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() {
2824 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); 2818 return static_cast<RenderViewHostImpl*>(GetRenderViewHost());
2825 } 2819 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698