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

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

Issue 7865016: Enable GPU process rendering of extensions on TOUCH_UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1807 } 1807 }
1808 1808
1809 WebPreferences TabContents::GetWebkitPrefs() { 1809 WebPreferences TabContents::GetWebkitPrefs() {
1810 WebPreferences web_prefs = 1810 WebPreferences web_prefs =
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)
1818 // Allow accelerated compositing for keyboard and log in screen.
1817 GetURL().SchemeIs(chrome::kChromeUIScheme) || 1819 GetURL().SchemeIs(chrome::kChromeUIScheme) ||
1820 #endif
1818 GetURL().SchemeIs(chrome::kAboutScheme)) && 1821 GetURL().SchemeIs(chrome::kAboutScheme)) &&
1819 !web_prefs.allow_webui_compositing) { 1822 !web_prefs.allow_webui_compositing) {
1820 web_prefs.accelerated_compositing_enabled = false; 1823 web_prefs.accelerated_compositing_enabled = false;
1821 web_prefs.accelerated_2d_canvas_enabled = false; 1824 web_prefs.accelerated_2d_canvas_enabled = false;
1822 } 1825 }
1823 1826
1824 #if defined(OS_MACOSX) 1827 #if defined(OS_MACOSX)
1825 // Disable accelerated compositing if IOSurface's are not supported, 1828 // Disable accelerated compositing if IOSurface's are not supported,
1826 // as is the case in 10.5. 1829 // as is the case in 10.5.
1827 if (!IOSurfaceSupport::Initialize()) 1830 if (!IOSurfaceSupport::Initialize())
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2012 } 2015 }
2013 2016
2014 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 2017 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
2015 render_manager_.SwapInRenderViewHost(rvh); 2018 render_manager_.SwapInRenderViewHost(rvh);
2016 } 2019 }
2017 2020
2018 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2021 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2019 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 2022 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
2020 rwh_view->SetSize(view()->GetContainerSize()); 2023 rwh_view->SetSize(view()->GetContainerSize());
2021 } 2024 }
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