diff options
Diffstat (limited to 'chrome/gpu/gpu_backing_store_win.cc')
-rw-r--r-- | chrome/gpu/gpu_backing_store_win.cc | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/chrome/gpu/gpu_backing_store_win.cc b/chrome/gpu/gpu_backing_store_win.cc index d5af441..2b22369 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_)); } |