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

Unified Diff: chrome/gpu/gpu_backing_store_win.cc

Issue 3834003: On Windows, create a new TransportDIB::Handle struct which includes the file (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Rebase Created 10 years, 2 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: 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_));
}

Powered by Google App Engine
This is Rietveld 408576698