summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_plugin/browser_plugin_guest.cc
diff options
context:
space:
mode:
authorfsamuel <fsamuel@chromium.org>2014-09-20 14:11:00 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-20 21:11:12 +0000
commitac35203eb3d9ddfcec077883ad897c8136027762 (patch)
tree9fc6e9594ec7f96abea581ccace2cad8bac2af8a /content/browser/browser_plugin/browser_plugin_guest.cc
parentba729da9c8327a4efc18963abd365efe409a80b5 (diff)
downloadchromium_src-ac35203eb3d9ddfcec077883ad897c8136027762.zip
chromium_src-ac35203eb3d9ddfcec077883ad897c8136027762.tar.gz
chromium_src-ac35203eb3d9ddfcec077883ad897c8136027762.tar.bz2
Cleanup BrowserPluginGuest::SwapCompositorFrame
BUG=330264 Review URL: https://codereview.chromium.org/588033002 Cr-Commit-Position: refs/heads/master@{#295891}
Diffstat (limited to 'content/browser/browser_plugin/browser_plugin_guest.cc')
-rw-r--r--content/browser/browser_plugin/browser_plugin_guest.cc25
1 files changed, 0 insertions, 25 deletions
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 1d23397..f2a0f74 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -320,12 +320,6 @@ void BrowserPluginGuest::SwapCompositorFrame(
int host_process_id,
int host_routing_id,
scoped_ptr<cc::CompositorFrame> frame) {
- if (!attached()) {
- // If the guest doesn't have an embedder then there's nothing to give the
- // the frame to.
- return;
- }
-
cc::RenderPass* root_pass =
frame->delegated_frame_data->render_pass_list.back();
gfx::Size view_size(gfx::ToFlooredSize(gfx::ScaleSize(
@@ -337,30 +331,11 @@ void BrowserPluginGuest::SwapCompositorFrame(
last_seen_view_size_ = view_size;
}
- base::SharedMemoryHandle software_frame_handle =
- base::SharedMemory::NULLHandle();
- if (frame->software_frame_data) {
- cc::SoftwareFrameData* frame_data = frame->software_frame_data.get();
- scoped_ptr<cc::SharedBitmap> bitmap =
- HostSharedBitmapManager::current()->GetSharedBitmapFromId(
- frame_data->size, frame_data->bitmap_id);
- if (!bitmap)
- return;
-
- RenderWidgetHostView* embedder_rwhv =
- GetEmbedderRenderWidgetHostView();
- base::ProcessHandle embedder_pid =
- embedder_rwhv->GetRenderWidgetHost()->GetProcess()->GetHandle();
-
- bitmap->memory()->ShareToProcess(embedder_pid, &software_frame_handle);
- }
-
FrameMsg_CompositorFrameSwapped_Params guest_params;
frame->AssignTo(&guest_params.frame);
guest_params.output_surface_id = output_surface_id;
guest_params.producing_route_id = host_routing_id;
guest_params.producing_host_id = host_process_id;
- guest_params.shared_memory_handle = software_frame_handle;
SendMessageToEmbedder(
new BrowserPluginMsg_CompositorFrameSwapped(