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

Unified Diff: mojo/edk/system/dispatcher.cc

Issue 1776033002: Implement MojoGetBufferInformation(), part 1. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh Created 4 years, 9 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 | « mojo/edk/system/dispatcher.h ('k') | mojo/edk/system/dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/dispatcher.cc
diff --git a/mojo/edk/system/dispatcher.cc b/mojo/edk/system/dispatcher.cc
index de2af7d143c0e2a9f99d0a0fdc1ce6308c325c2a..f6bc98eb2f26629c9073ec29958a4af329c50b7c 100644
--- a/mojo/edk/system/dispatcher.cc
+++ b/mojo/edk/system/dispatcher.cc
@@ -206,6 +206,16 @@ MojoResult Dispatcher::DuplicateBufferHandle(
return DuplicateBufferHandleImplNoLock(options, new_dispatcher);
}
+MojoResult Dispatcher::GetBufferInformation(
+ UserPointer<MojoBufferInformation> info,
+ uint32_t info_num_bytes) {
+ MutexLocker locker(&mutex_);
+ if (is_closed_)
+ return MOJO_RESULT_INVALID_ARGUMENT;
+
+ return GetBufferInformationImplNoLock(info, info_num_bytes);
+}
+
MojoResult Dispatcher::MapBuffer(
uint64_t offset,
uint64_t num_bytes,
@@ -358,6 +368,15 @@ MojoResult Dispatcher::DuplicateBufferHandleImplNoLock(
return MOJO_RESULT_INVALID_ARGUMENT;
}
+MojoResult Dispatcher::GetBufferInformationImplNoLock(
+ UserPointer<MojoBufferInformation> /*info*/,
+ uint32_t /*info_num_bytes*/) {
+ mutex_.AssertHeld();
+ DCHECK(!is_closed_);
+ // By default, not supported. Only needed for buffer dispatchers.
+ return MOJO_RESULT_INVALID_ARGUMENT;
+}
+
MojoResult Dispatcher::MapBufferImplNoLock(
uint64_t /*offset*/,
uint64_t /*num_bytes*/,
« no previous file with comments | « mojo/edk/system/dispatcher.h ('k') | mojo/edk/system/dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698