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

Side by Side Diff: content/browser/tab_contents/tab_contents.cc

Issue 7519017: respect --force-compositing-mode for chrome: pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add new flag instead Created 9 years, 5 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
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
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 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 message, 1685 message,
1686 reply_msg); 1686 reply_msg);
1687 } 1687 }
1688 1688
1689 WebPreferences TabContents::GetWebkitPrefs() { 1689 WebPreferences TabContents::GetWebkitPrefs() {
1690 WebPreferences web_prefs = 1690 WebPreferences web_prefs =
1691 content::GetContentClient()->browser()->GetWebkitPrefs( 1691 content::GetContentClient()->browser()->GetWebkitPrefs(
1692 render_view_host()->process()->browser_context(), false); 1692 render_view_host()->process()->browser_context(), false);
1693 1693
1694 // Force accelerated compositing and 2d canvas off for chrome:, about: and 1694 // Force accelerated compositing and 2d canvas off for chrome:, about: and
1695 // chrome-devtools: pages. 1695 // chrome-devtools: pages (unless it's specifically allowed).
1696 if (GetURL().SchemeIs(chrome::kChromeDevToolsScheme) || 1696 if ((GetURL().SchemeIs(chrome::kChromeDevToolsScheme) ||
1697 GetURL().SchemeIs(chrome::kChromeUIScheme) || 1697 GetURL().SchemeIs(chrome::kChromeUIScheme) ||
1698 GetURL().SchemeIs(chrome::kAboutScheme)) { 1698 GetURL().SchemeIs(chrome::kAboutScheme)) &&
1699 !web_prefs.allow_webui_compositing) {
1699 web_prefs.accelerated_compositing_enabled = false; 1700 web_prefs.accelerated_compositing_enabled = false;
1700 web_prefs.accelerated_2d_canvas_enabled = false; 1701 web_prefs.accelerated_2d_canvas_enabled = false;
1701 } 1702 }
1702 1703
1703 #if defined(OS_MACOSX) 1704 #if defined(OS_MACOSX)
1704 // Disable accelerated compositing if IOSurface's are not supported, 1705 // Disable accelerated compositing if IOSurface's are not supported,
1705 // as is the case in 10.5. 1706 // as is the case in 10.5.
1706 if (!IOSurfaceSupport::Initialize()) 1707 if (!IOSurfaceSupport::Initialize())
1707 web_prefs.accelerated_compositing_enabled = false; 1708 web_prefs.accelerated_compositing_enabled = false;
1708 #endif 1709 #endif
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 } 1880 }
1880 1881
1881 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 1882 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
1882 render_manager_.SwapInRenderViewHost(rvh); 1883 render_manager_.SwapInRenderViewHost(rvh);
1883 } 1884 }
1884 1885
1885 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 1886 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
1886 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 1887 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
1887 rwh_view->SetSize(view()->GetContainerSize()); 1888 rwh_view->SetSize(view()->GetContainerSize());
1888 } 1889 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698