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

Unified Diff: command_buffer/service/cross/gapi_decoder.cc

Issue 147237: Adding GetStreamInfo functionality (and passing corresponding unit test). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 6 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: command_buffer/service/cross/gapi_decoder.cc
===================================================================
--- command_buffer/service/cross/gapi_decoder.cc (revision 19749)
+++ command_buffer/service/cross/gapi_decoder.cc (working copy)
@@ -367,6 +367,31 @@
} else {
return BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
}
+ case GET_STREAM_COUNT:
+ if (arg_count == 4) {
+ ResourceID id = args[0].value_uint32;
+ unsigned int size = args[1].value_uint32;
+ void *data = GetAddressAndCheckSize(args[2].value_uint32,
+ args[3].value_uint32,
+ size);
+ if (!data) return BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
+ return gapi_->GetStreamCount(id, size, data);
+ } else {
+ return BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
+ }
+ case GET_STREAM_DESC:
+ if (arg_count == 5) {
+ ResourceID id = args[0].value_uint32;
+ unsigned int index = args[1].value_uint32;
+ unsigned int size = args[2].value_uint32;
+ void *data = GetAddressAndCheckSize(args[3].value_uint32,
+ args[4].value_uint32,
+ size);
+ if (!data) return BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
+ return gapi_->GetStreamDesc(id, index, size, data);
+ } else {
+ return BufferSyncInterface::PARSE_INVALID_ARGUMENTS;
+ }
case DESTROY_TEXTURE:
if (arg_count == 1) {
return gapi_->DestroyTexture(args[0].value_uint32);

Powered by Google App Engine
This is Rietveld 408576698