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

Unified Diff: content/browser/renderer_host/render_widget_host_view_guest.cc

Issue 12547016: Enable browser plugin compositing by default, but add a flag to disable it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_guest.cc
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 dc3f258007abce26656fd92d07a12a35c3ed5c7c..a6ca59c6279101f16515cb98c21099cef14300c3 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) {
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_guest.h ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698