Index: chrome/gpu/gpu_backing_store_win.cc |
diff --git a/chrome/gpu/gpu_backing_store_win.cc b/chrome/gpu/gpu_backing_store_win.cc |
index d5af441c89661170420697c4e75384c5af8d4f49..2b2236976a13632c6342477d0dbe3a35231950b6 100644 |
--- a/chrome/gpu/gpu_backing_store_win.cc |
+++ b/chrome/gpu/gpu_backing_store_win.cc |
@@ -116,21 +116,10 @@ void GpuBackingStoreWin::OnChannelError() { |
} |
void GpuBackingStoreWin::OnPaintToBackingStore( |
- base::ProcessId source_process_id, |
- TransportDIB::Id id, |
+ TransportDIB::Handle dib_handle, |
const gfx::Rect& bitmap_rect, |
const std::vector<gfx::Rect>& copy_rects) { |
- HANDLE source_process_handle = OpenProcess(PROCESS_ALL_ACCESS, |
- FALSE, source_process_id); |
- CHECK(source_process_handle); |
- |
- // On Windows we need to duplicate the handle from the remote process. |
- // See BrowserRenderProcessHost::MapTransportDIB for how to do this on other |
- // platforms. |
- HANDLE section = win_util::GetSectionFromProcess( |
- id.handle, source_process_handle, false /* read write */); |
- CHECK(section); |
- scoped_ptr<TransportDIB> dib(TransportDIB::Map(section)); |
+ scoped_ptr<TransportDIB> dib(TransportDIB::Map(dib_handle)); |
CHECK(dib.get()); |
if (!backing_store_dib_) { |
@@ -168,7 +157,6 @@ void GpuBackingStoreWin::OnPaintToBackingStore( |
view_->InvalidateRect(&paint_rect.ToRECT()); |
} |
- CloseHandle(source_process_handle); |
gpu_thread_->Send(new GpuHostMsg_PaintToBackingStore_ACK(routing_id_)); |
} |