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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 588033002: Cleanup BrowserPluginGuest::SwapCompositorFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_plugin/browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 1d233971b9fd8511c8465477bffff4150493c98d..f2a0f74dd0be0d5abaa9a5ac17b99f8c89617c12 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(
« 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