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

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

Issue 12221005: Add flag to disable impl-side painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removing line Created 7 years, 10 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
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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 19 matching lines...) Expand all
30 #include "base/process_util.h" 30 #include "base/process_util.h"
31 #include "base/rand_util.h" 31 #include "base/rand_util.h"
32 #include "base/stl_util.h" 32 #include "base/stl_util.h"
33 #include "base/string_util.h" 33 #include "base/string_util.h"
34 #include "base/supports_user_data.h" 34 #include "base/supports_user_data.h"
35 #include "base/sys_info.h" 35 #include "base/sys_info.h"
36 #include "base/threading/thread.h" 36 #include "base/threading/thread.h"
37 #include "base/threading/thread_restrictions.h" 37 #include "base/threading/thread_restrictions.h"
38 #include "base/tracked_objects.h" 38 #include "base/tracked_objects.h"
39 #include "cc/switches.h" 39 #include "cc/switches.h"
40 #include "cc/util.h"
40 #include "content/browser/appcache/appcache_dispatcher_host.h" 41 #include "content/browser/appcache/appcache_dispatcher_host.h"
41 #include "content/browser/appcache/chrome_appcache_service.h" 42 #include "content/browser/appcache/chrome_appcache_service.h"
42 #include "content/browser/browser_main.h" 43 #include "content/browser/browser_main.h"
43 #include "content/browser/browser_main_loop.h" 44 #include "content/browser/browser_main_loop.h"
44 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" 45 #include "content/browser/browser_plugin/browser_plugin_message_filter.h"
45 #include "content/browser/child_process_security_policy_impl.h" 46 #include "content/browser/child_process_security_policy_impl.h"
46 #include "content/browser/device_orientation/orientation_message_filter.h" 47 #include "content/browser/device_orientation/orientation_message_filter.h"
47 #include "content/browser/dom_storage/dom_storage_context_impl.h" 48 #include "content/browser/dom_storage/dom_storage_context_impl.h"
48 #include "content/browser/dom_storage/dom_storage_message_filter.h" 49 #include "content/browser/dom_storage/dom_storage_message_filter.h"
49 #include "content/browser/download/mhtml_generation_manager.h" 50 #include "content/browser/download/mhtml_generation_manager.h"
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 switches::kUseGL, 839 switches::kUseGL,
839 switches::kUseMobileUserAgent, 840 switches::kUseMobileUserAgent,
840 switches::kUserAgent, 841 switches::kUserAgent,
841 switches::kV, 842 switches::kV,
842 switches::kVideoThreads, 843 switches::kVideoThreads,
843 switches::kVModule, 844 switches::kVModule,
844 switches::kWebCoreLogChannels, 845 switches::kWebCoreLogChannels,
845 switches::kWebIntentsInvocationEnabled, 846 switches::kWebIntentsInvocationEnabled,
846 cc::switches::kBackgroundColorInsteadOfCheckerboard, 847 cc::switches::kBackgroundColorInsteadOfCheckerboard,
847 cc::switches::kEnableCompositorFrameMessage, 848 cc::switches::kEnableCompositorFrameMessage,
849 cc::switches::kDisableImplSidePainting,
848 cc::switches::kEnableImplSidePainting, 850 cc::switches::kEnableImplSidePainting,
849 cc::switches::kEnablePartialSwap, 851 cc::switches::kEnablePartialSwap,
850 cc::switches::kEnableRightAlignedScheduling, 852 cc::switches::kEnableRightAlignedScheduling,
851 cc::switches::kEnableTopControlsPositionCalculation, 853 cc::switches::kEnableTopControlsPositionCalculation,
852 cc::switches::kNumRasterThreads, 854 cc::switches::kNumRasterThreads,
853 cc::switches::kShowPropertyChangedRects, 855 cc::switches::kShowPropertyChangedRects,
854 cc::switches::kShowSurfaceDamageRects, 856 cc::switches::kShowSurfaceDamageRects,
855 cc::switches::kShowScreenSpaceRects, 857 cc::switches::kShowScreenSpaceRects,
856 cc::switches::kShowReplicaScreenSpaceRects, 858 cc::switches::kShowReplicaScreenSpaceRects,
857 cc::switches::kShowNonOccludingRects, 859 cc::switches::kShowNonOccludingRects,
858 cc::switches::kShowOccludingRects, 860 cc::switches::kShowOccludingRects,
859 cc::switches::kTraceOverdraw, 861 cc::switches::kTraceOverdraw,
860 cc::switches::kTopControlsHeight, 862 cc::switches::kTopControlsHeight,
861 cc::switches::kSlowDownRasterScaleFactor, 863 cc::switches::kSlowDownRasterScaleFactor,
862 cc::switches::kUseCheapnessEstimator, 864 cc::switches::kUseCheapnessEstimator,
863 }; 865 };
864 renderer_cmd->CopySwitchesFrom(browser_cmd, kSwitchNames, 866 renderer_cmd->CopySwitchesFrom(browser_cmd, kSwitchNames,
865 arraysize(kSwitchNames)); 867 arraysize(kSwitchNames));
866 868
867 // Disable databases in incognito mode. 869 // Disable databases in incognito mode.
868 if (GetBrowserContext()->IsOffTheRecord() && 870 if (GetBrowserContext()->IsOffTheRecord() &&
869 !browser_cmd.HasSwitch(switches::kDisableDatabases)) { 871 !browser_cmd.HasSwitch(switches::kDisableDatabases)) {
870 renderer_cmd->AppendSwitch(switches::kDisableDatabases); 872 renderer_cmd->AppendSwitch(switches::kDisableDatabases);
871 #if defined(OS_ANDROID) 873 #if defined(OS_ANDROID)
872 renderer_cmd->AppendSwitch(switches::kDisableMediaHistoryLogging); 874 renderer_cmd->AppendSwitch(switches::kDisableMediaHistoryLogging);
873 #endif 875 #endif
874 } 876 }
875 877
876 // Enforce the extra command line flags for impl-side painting. 878 // Enforce the extra command line flags for impl-side painting.
877 if (browser_cmd.HasSwitch(cc::switches::kEnableImplSidePainting) && 879 if (cc::IsImplSidePaintingEnabled(&browser_cmd) &&
878 !browser_cmd.HasSwitch(switches::kEnableDeferredImageDecoding)) 880 !browser_cmd.HasSwitch(switches::kEnableDeferredImageDecoding))
879 renderer_cmd->AppendSwitch(switches::kEnableDeferredImageDecoding); 881 renderer_cmd->AppendSwitch(switches::kEnableDeferredImageDecoding);
880 } 882 }
881 883
882 base::ProcessHandle RenderProcessHostImpl::GetHandle() { 884 base::ProcessHandle RenderProcessHostImpl::GetHandle() {
883 if (run_renderer_in_process()) 885 if (run_renderer_in_process())
884 return base::Process::Current().handle(); 886 return base::Process::Current().handle();
885 887
886 if (!child_process_launcher_.get() || child_process_launcher_->IsStarting()) 888 if (!child_process_launcher_.get() || child_process_launcher_->IsStarting())
887 return base::kNullProcessHandle; 889 return base::kNullProcessHandle;
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 TRACE_EVENT0("renderer_host", 1611 TRACE_EVENT0("renderer_host",
1610 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); 1612 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost");
1611 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; 1613 AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
1612 ack_params.sync_point = 0; 1614 ack_params.sync_point = 0;
1613 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, 1615 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id,
1614 gpu_process_host_id, 1616 gpu_process_host_id,
1615 ack_params); 1617 ack_params);
1616 } 1618 }
1617 1619
1618 } // namespace content 1620 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698