Index: ui/surface/transport_dib_win.cc |
diff --git a/ui/surface/transport_dib_win.cc b/ui/surface/transport_dib_win.cc |
index e8d36adbd5a5454c36e64bb46ac18b5bbbe6d762..af55af284349ca9648a9088d4c14f3024efc0dae 100644 |
--- a/ui/surface/transport_dib_win.cc |
+++ b/ui/surface/transport_dib_win.cc |
@@ -20,10 +20,8 @@ TransportDIB::TransportDIB() |
TransportDIB::~TransportDIB() { |
} |
-TransportDIB::TransportDIB(HANDLE handle) |
- : shared_memory_(handle, false /* read write */), |
- size_(0) { |
-} |
+TransportDIB::TransportDIB(base::SharedMemoryHandle handle) |
+ : shared_memory_(handle, false /* read write */), size_(0) {} |
// static |
TransportDIB* TransportDIB::Create(size_t size, uint32 sequence_num) { |
@@ -55,7 +53,7 @@ TransportDIB* TransportDIB::CreateWithHandle(Handle handle) { |
// static |
bool TransportDIB::is_valid_handle(Handle dib) { |
- return dib != NULL; |
+ return dib.IsValid(); |
} |
skia::PlatformCanvas* TransportDIB::GetPlatformCanvas(int w, int h) { |
@@ -66,9 +64,9 @@ skia::PlatformCanvas* TransportDIB::GetPlatformCanvas(int w, int h) { |
// We can't check the canvas size before mapping, but it's safe because |
// Windows will fail to map the section if the dimensions of the canvas |
// are too large. |
- skia::PlatformCanvas* canvas = |
- skia::CreatePlatformCanvas(w, h, true, shared_memory_.handle(), |
- skia::RETURN_NULL_ON_FAILURE); |
+ skia::PlatformCanvas* canvas = skia::CreatePlatformCanvas( |
+ w, h, true, shared_memory_.handle().GetHandle(), |
+ skia::RETURN_NULL_ON_FAILURE); |
// Calculate the size for the memory region backing the canvas. |
if (canvas) |
@@ -85,7 +83,7 @@ bool TransportDIB::Map() { |
if (!shared_memory_.Map(0 /* map whole shared memory segment */)) { |
LOG(ERROR) << "Failed to map transport DIB" |
- << " handle:" << shared_memory_.handle() |
+ << " handle:" << shared_memory_.handle().GetHandle() |
<< " error:" << ::GetLastError(); |
return false; |
} |