summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralexst@chromium.org <alexst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 22:19:18 +0000
committeralexst@chromium.org <alexst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 22:19:18 +0000
commit7bb5a1d600877521ccdc830e57cb697d83921134 (patch)
tree53ba02a75b2b4271c21f9120dc04c87c7465c2a0
parent0a57375ad73780e61e1770a9d88b0529b0dbd33b (diff)
downloadchromium_src-7bb5a1d600877521ccdc830e57cb697d83921134.zip
chromium_src-7bb5a1d600877521ccdc830e57cb697d83921134.tar.gz
chromium_src-7bb5a1d600877521ccdc830e57cb697d83921134.tar.bz2
Enable browser plugin compositing by default, but add a flag to disable it.
BUG= Review URL: https://chromiumcodereview.appspot.com/12547016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186794 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/login/chrome_restart_request.cc6
-rw-r--r--content/browser/renderer_host/gpu_message_filter.cc6
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc1
-rw-r--r--content/browser/renderer_host/render_widget_host_view_guest.cc44
-rw-r--r--content/browser/renderer_host/render_widget_host_view_guest.h1
-rw-r--r--content/browser/web_contents/web_contents_impl.cc4
-rw-r--r--content/public/common/content_switches.cc4
-rw-r--r--content/public/common/content_switches.h2
8 files changed, 19 insertions, 49 deletions
diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc
index 7669c31..a8daec8 100644
--- a/chrome/browser/chromeos/login/chrome_restart_request.cc
+++ b/chrome/browser/chromeos/login/chrome_restart_request.cc
@@ -73,6 +73,7 @@ std::string DeriveCommandLine(const GURL& start_url,
::switches::kDisableAcceleratedOverflowScroll,
::switches::kDisableAcceleratedPlugins,
::switches::kDisableAcceleratedVideoDecode,
+ ::switches::kDisableBrowserPluginCompositing,
::switches::kDisableEncryptedMedia,
::switches::kDisableForceCompositingMode,
::switches::kDisableGpuWatchdog,
@@ -84,7 +85,6 @@ std::string DeriveCommandLine(const GURL& start_url,
::switches::kDisableSeccompFilterSandbox,
::switches::kDisableSeccompSandbox,
::switches::kEnableAcceleratedOverflowScroll,
- ::switches::kEnableBrowserPluginCompositing,
::switches::kEnableCompositingForFixedPosition,
::switches::kEnableGestureTapHighlight,
::switches::kEnableLogging,
@@ -284,10 +284,6 @@ std::string GetKioskAppCommandLine(const std::string& app_id) {
app_switches.SetString(::switches::kForceAppMode, std::string());
app_switches.SetString(::switches::kAppId, app_id);
app_switches.SetString(::switches::kLoginUser, std::string());
- // TODO(zelidrag): Move the next switch to /sbin/session_manager_setup.sh
- // instead once http://crbug.com/179256 is resolved.
- app_switches.SetString(::switches::kEnableBrowserPluginCompositing,
- std::string());
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
CommandLine new_command_line(browser_command_line.GetProgram());
diff --git a/content/browser/renderer_host/gpu_message_filter.cc b/content/browser/renderer_host/gpu_message_filter.cc
index a25d5a4..30d3e7a 100644
--- a/content/browser/renderer_host/gpu_message_filter.cc
+++ b/content/browser/renderer_host/gpu_message_filter.cc
@@ -49,10 +49,8 @@ GpuMessageFilter::GpuMessageFilter(int render_process_id,
share_contexts_ = true;
#else
// Share contexts when compositing webview plugin.
- // Keep this behind a flag for now until we can run a
- // stability experiment.
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableBrowserPluginCompositing))
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableBrowserPluginCompositing))
share_contexts_ = true;
#endif
}
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index ba0054d..dcc1838 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -764,7 +764,6 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kDisableWebSockets,
switches::kDomAutomationController,
switches::kEnableAccessibilityLogging,
- switches::kEnableBrowserPluginCompositing,
switches::kEnableBrowserPluginForAllViewTypes,
switches::kEnableBrowserPluginPointerLock,
switches::kEnableDCHECK,
diff --git a/content/browser/renderer_host/render_widget_host_view_guest.cc b/content/browser/renderer_host/render_widget_host_view_guest.cc
index dc3f258..a6ca59c 100644
--- a/content/browser/renderer_host/render_widget_host_view_guest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_guest.cc
@@ -28,9 +28,6 @@ RenderWidgetHostViewGuest::RenderWidgetHostViewGuest(
is_hidden_(false),
platform_view_(static_cast<RenderWidgetHostViewPort*>(platform_view)) {
host_->SetView(this);
-
- enable_compositing_ = CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableBrowserPluginCompositing);
}
RenderWidgetHostViewGuest::~RenderWidgetHostViewGuest() {
@@ -103,34 +100,22 @@ void RenderWidgetHostViewGuest::SetTooltipText(const string16& tooltip_text) {
void RenderWidgetHostViewGuest::AcceleratedSurfaceBuffersSwapped(
const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
int gpu_host_id) {
- DCHECK(enable_compositing_);
// If accelerated surface buffers are getting swapped then we're not using
// the software path.
guest_->clear_damage_buffer();
- if (enable_compositing_) {
- guest_->SendMessageToEmbedder(
- new BrowserPluginMsg_BuffersSwapped(
- guest_->instance_id(),
- params.size,
- params.mailbox_name,
- params.route_id,
- gpu_host_id));
- }
+ guest_->SendMessageToEmbedder(
+ new BrowserPluginMsg_BuffersSwapped(
+ guest_->instance_id(),
+ params.size,
+ params.mailbox_name,
+ params.route_id,
+ gpu_host_id));
}
void RenderWidgetHostViewGuest::AcceleratedSurfacePostSubBuffer(
const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params,
int gpu_host_id) {
- DCHECK(enable_compositing_);
- if (enable_compositing_) {
- guest_->SendMessageToEmbedder(
- new BrowserPluginMsg_BuffersSwapped(
- guest_->instance_id(),
- params.surface_size,
- params.mailbox_name,
- params.route_id,
- gpu_host_id));
- }
+ NOTREACHED();
}
void RenderWidgetHostViewGuest::SetBounds(const gfx::Rect& rect) {
@@ -187,11 +172,8 @@ bool RenderWidgetHostViewGuest::HasFocus() const {
}
bool RenderWidgetHostViewGuest::IsSurfaceAvailableForCopy() const {
- DCHECK(enable_compositing_);
- if (enable_compositing_)
- return true;
- else
- return platform_view_->IsSurfaceAvailableForCopy();
+ NOTIMPLEMENTED();
+ return false;
}
void RenderWidgetHostViewGuest::UpdateCursor(const WebCursor& cursor) {
@@ -265,11 +247,7 @@ void RenderWidgetHostViewGuest::AcceleratedSurfaceRelease() {
bool RenderWidgetHostViewGuest::HasAcceleratedSurface(
const gfx::Size& desired_size) {
- DCHECK(enable_compositing_);
- if (enable_compositing_)
- return false;
- else
- return platform_view_->HasAcceleratedSurface(desired_size);
+ return false;
}
void RenderWidgetHostViewGuest::SetBackground(const SkBitmap& background) {
diff --git a/content/browser/renderer_host/render_widget_host_view_guest.h b/content/browser/renderer_host/render_widget_host_view_guest.h
index 4fd751e..eaf418d 100644
--- a/content/browser/renderer_host/render_widget_host_view_guest.h
+++ b/content/browser/renderer_host/render_widget_host_view_guest.h
@@ -178,7 +178,6 @@ class CONTENT_EXPORT RenderWidgetHostViewGuest
RenderWidgetHostImpl* host_;
BrowserPluginGuest *guest_;
- bool enable_compositing_;
bool is_hidden_;
// The platform view for this RenderWidgetHostView.
// RenderWidgetHostViewGuest mostly only cares about stuff related to
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index f7bee53..23dc526 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -632,8 +632,8 @@ WebPreferences WebContentsImpl::GetWebkitPrefs(RenderViewHost* rvh,
// Disable compositing in guests until we have compositing path implemented
// for guests.
- bool guest_compositing_enabled = command_line.HasSwitch(
- switches::kEnableBrowserPluginCompositing);
+ bool guest_compositing_enabled = !command_line.HasSwitch(
+ switches::kDisableBrowserPluginCompositing);
if (rvh->GetProcess()->IsGuest() && !guest_compositing_enabled) {
prefs.force_compositing_mode = false;
prefs.accelerated_compositing_enabled = false;
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index 0c17b8e..cda068f 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -260,8 +260,8 @@ const char kEnableAcceleratedFilters[] = "enable-accelerated-filters";
const char kEnableAccessibilityLogging[] = "enable-accessibility-logging";
// Enables browser plugin compositing experiment.
-const char kEnableBrowserPluginCompositing[] =
- "enable-browser-plugin-compositing";
+const char kDisableBrowserPluginCompositing[] =
+ "disable-browser-plugin-compositing";
// Enables browser plugin for all types of pages.
const char kEnableBrowserPluginForAllViewTypes[] =
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index 457ab690..dc1597a 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -94,7 +94,7 @@ CONTENT_EXPORT extern const char kReduceSecurityForDomAutomationTests[];
CONTENT_EXPORT extern const char kEnableAcceleratedPainting[];
CONTENT_EXPORT extern const char kEnableAcceleratedFilters[];
extern const char kEnableAccessibilityLogging[];
-CONTENT_EXPORT extern const char kEnableBrowserPluginCompositing[];
+CONTENT_EXPORT extern const char kDisableBrowserPluginCompositing[];
CONTENT_EXPORT extern const char kEnableBrowserPluginForAllViewTypes[];
CONTENT_EXPORT extern const char kEnableBrowserPluginPointerLock[];
CONTENT_EXPORT extern const char kEnableCompositingForFixedPosition[];