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

Unified Diff: ui/surface/transport_dib_win.cc

Issue 1145893009: Change transport dib API to not make copies of SharedMemoryHandle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shared_memory_pepper_rename
Patch Set: Comments from jbauman. Created 5 years, 7 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
« no previous file with comments | « ui/surface/transport_dib_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/surface/transport_dib_win.cc
diff --git a/ui/surface/transport_dib_win.cc b/ui/surface/transport_dib_win.cc
index a664266dae6e26831be25f67513d0a156b4c267b..ba917e05069ff8dc5749a6b73053f22b276e5d08 100644
--- a/ui/surface/transport_dib_win.cc
+++ b/ui/surface/transport_dib_win.cc
@@ -72,7 +72,7 @@ skia::PlatformCanvas* TransportDIB::GetPlatformCanvas(int w, int h) {
// Windows will fail to map the section if the dimensions of the canvas
// are too large.
skia::PlatformCanvas* canvas =
- skia::CreatePlatformCanvas(w, h, true, handle(),
+ skia::CreatePlatformCanvas(w, h, true, shared_memory_.handle(),
skia::RETURN_NULL_ON_FAILURE);
// Calculate the size for the memory region backing the canvas.
@@ -83,7 +83,7 @@ skia::PlatformCanvas* TransportDIB::GetPlatformCanvas(int w, int h) {
}
bool TransportDIB::Map() {
- if (!is_valid_handle(handle()))
+ if (!is_valid_handle(shared_memory_.handle()))
return false;
if (memory())
return true;
@@ -103,10 +103,6 @@ void* TransportDIB::memory() const {
return shared_memory_.memory();
}
-TransportDIB::Handle TransportDIB::handle() const {
- return shared_memory_.handle();
-}
-
TransportDIB::Id TransportDIB::id() const {
- return Id(handle(), sequence_num_);
+ return Id(shared_memory_.handle(), sequence_num_);
}
« no previous file with comments | « ui/surface/transport_dib_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698