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

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

Issue 7779022: Allow gpu features for about:blank (unlike other about: schemes) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged up for relanding Created 9 years, 3 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 | « no previous file | no next file » | 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 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 content::GetContentClient()->browser()->GetWebkitPrefs( 1811 content::GetContentClient()->browser()->GetWebkitPrefs(
1812 render_view_host()->process()->browser_context(), false); 1812 render_view_host()->process()->browser_context(), false);
1813 1813
1814 // Force accelerated compositing and 2d canvas off for chrome:, about: and 1814 // Force accelerated compositing and 2d canvas off for chrome:, about: and
1815 // chrome-devtools: pages (unless it's specifically allowed). 1815 // chrome-devtools: pages (unless it's specifically allowed).
1816 if ((GetURL().SchemeIs(chrome::kChromeDevToolsScheme) || 1816 if ((GetURL().SchemeIs(chrome::kChromeDevToolsScheme) ||
1817 #if !defined(TOUCH_UI) 1817 #if !defined(TOUCH_UI)
1818 // Allow accelerated compositing for keyboard and log in screen. 1818 // Allow accelerated compositing for keyboard and log in screen.
1819 GetURL().SchemeIs(chrome::kChromeUIScheme) || 1819 GetURL().SchemeIs(chrome::kChromeUIScheme) ||
1820 #endif 1820 #endif
1821 GetURL().SchemeIs(chrome::kAboutScheme)) && 1821 (GetURL().SchemeIs(chrome::kAboutScheme) &&
1822 GetURL().spec() != chrome::kAboutBlankURL)) &&
1822 !web_prefs.allow_webui_compositing) { 1823 !web_prefs.allow_webui_compositing) {
1823 web_prefs.accelerated_compositing_enabled = false; 1824 web_prefs.accelerated_compositing_enabled = false;
1824 web_prefs.accelerated_2d_canvas_enabled = false; 1825 web_prefs.accelerated_2d_canvas_enabled = false;
1825 } 1826 }
1826 1827
1827 #if defined(OS_MACOSX) 1828 #if defined(OS_MACOSX)
1828 // Disable accelerated compositing if IOSurface's are not supported, 1829 // Disable accelerated compositing if IOSurface's are not supported,
1829 // as is the case in 10.5. 1830 // as is the case in 10.5.
1830 if (!IOSurfaceSupport::Initialize()) 1831 if (!IOSurfaceSupport::Initialize())
1831 web_prefs.accelerated_compositing_enabled = false; 1832 web_prefs.accelerated_compositing_enabled = false;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
2015 } 2016 }
2016 2017
2017 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 2018 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
2018 render_manager_.SwapInRenderViewHost(rvh); 2019 render_manager_.SwapInRenderViewHost(rvh);
2019 } 2020 }
2020 2021
2021 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2022 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2022 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 2023 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
2023 rwh_view->SetSize(view()->GetContainerSize()); 2024 rwh_view->SetSize(view()->GetContainerSize());
2024 } 2025 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698