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

Unified Diff: command_buffer/client/cross/effect_helper.h

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/client/cross/effect_helper.h
===================================================================
--- command_buffer/client/cross/effect_helper.h (revision 19749)
+++ command_buffer/client/cross/effect_helper.h (working copy)
@@ -59,6 +59,10 @@
// structure (counting strings) for a
// param.
};
+ struct EffectStreamDesc {
+ vertex_struct::Semantic semantic; // The semantic enum type.
+ unsigned int semantic_index;
+ };
EffectHelper(CommandBufferHelper *helper,
FencedAllocatorWrapper *shm_allocator,
@@ -119,6 +123,23 @@
// descs: the vector of descriptions containing the ResourceIDs of the
// parameters to destroy.
void DestroyEffectParameters(const std::vector<EffectParamDesc> &descs);
+
+ // Gets all the input stream semantics and semantic indices in an
+ // array. These will be retrieved as many as possible at a time. At least
+ // sizeof(effect_param::Desc) must be available for this function to succeed.
+ // This function will call Finish(), hence will block.
+ //
+ // Parameters:
+ // effect_id: the ResourceID of the effect.
+ // descs: A pointer to a vector containing the returned descriptions.
+ // The pointed vector will be cleared.
+ // Returns:
+ // true if successful. Reasons for failure are:
+ // - invalid effect_id,
+ // - not enough memory in the shm_allocator_.
+ bool GetEffectStreams(ResourceID effect_id,
+ std::vector<EffectStreamDesc> *descs);
+
private:
CommandBufferHelper *helper_;
FencedAllocatorWrapper *shm_allocator_;
« no previous file with comments | « no previous file | command_buffer/client/cross/effect_helper.cc » ('j') | command_buffer/service/cross/resource.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698