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

Unified Diff: chrome/browser/renderer_host/backing_store_proxy.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/browser/renderer_host/backing_store_proxy.cc
diff --git a/chrome/browser/renderer_host/backing_store_proxy.cc b/chrome/browser/renderer_host/backing_store_proxy.cc
index 3d2fd8e24a5c20e4f6d0f1c491ff98231d56487d..e5609e5e940bdc87edd3b24077ddf56b2994c496 100644
--- a/chrome/browser/renderer_host/backing_store_proxy.cc
+++ b/chrome/browser/renderer_host/backing_store_proxy.cc
@@ -12,10 +12,6 @@
#include "chrome/common/render_messages.h"
#include "gfx/rect.h"
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
-
BackingStoreProxy::BackingStoreProxy(RenderWidgetHost* widget,
const gfx::Size& size,
GpuProcessHostUIShim* process_shim,
@@ -33,21 +29,16 @@ BackingStoreProxy::~BackingStoreProxy() {
void BackingStoreProxy::PaintToBackingStore(
RenderProcessHost* process,
- TransportDIB::Id bitmap,
+ TransportDIB::Id dib_id,
+ TransportDIB::Handle dib_handle,
const gfx::Rect& bitmap_rect,
const std::vector<gfx::Rect>& copy_rects,
bool* painted_synchronously) {
DCHECK(!waiting_for_paint_ack_);
-
- base::ProcessId process_id;
-#if defined(OS_WIN)
- process_id = ::GetProcessId(process->GetHandle());
-#elif defined(OS_POSIX)
- process_id = process->GetHandle();
-#endif
+ TransportDIB::ScopedHandle scoped_dib_handle(dib_handle);
if (process_shim_->Send(new GpuMsg_PaintToBackingStore(
- routing_id_, process_id, bitmap, bitmap_rect, copy_rects))) {
+ routing_id_, scoped_dib_handle.release(), bitmap_rect, copy_rects))) {
// Message sent successfully, so the caller can not destroy the
// TransportDIB. OnDonePaintingToBackingStore will free it later.
*painted_synchronously = false;

Powered by Google App Engine
This is Rietveld 408576698