summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/raw_var_data.h
diff options
context:
space:
mode:
authorraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 14:46:05 +0000
committerraymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 14:46:05 +0000
commit38f428f10f6e3dca2ff875e663f614aa56fc099f (patch)
tree968c95f0c8eb184930f0e9a982020c0285da84e7 /ppapi/proxy/raw_var_data.h
parent9e7e4122711c551a3885d1b641dcadbfcf31b241 (diff)
downloadchromium_src-38f428f10f6e3dca2ff875e663f614aa56fc099f.zip
chromium_src-38f428f10f6e3dca2ff875e663f614aa56fc099f.tar.gz
chromium_src-38f428f10f6e3dca2ff875e663f614aa56fc099f.tar.bz2
Hookup RawVarData to SerializedVar
This hooks up the rewritten RawVarData implementation with SerializedVar. It also fixes tests to make sure that shmem ArrayBuffers are actually tested. Previously, no testing of shmem ArrayBuffers was happening because OS_LINUX is never defined in ppapi/tests and none of the other ArrayBuffer test sizes were above the threshhold to invoke that code path. This CL adds a PPB_Testing function to set the threshhold to a lower value, which permits this code path to be taken while still having fast tests. BUG= Review URL: https://chromiumcodereview.appspot.com/14208016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195189 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/raw_var_data.h')
-rw-r--r--ppapi/proxy/raw_var_data.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/ppapi/proxy/raw_var_data.h b/ppapi/proxy/raw_var_data.h
index 17bdaee..1e8746f 100644
--- a/ppapi/proxy/raw_var_data.h
+++ b/ppapi/proxy/raw_var_data.h
@@ -72,6 +72,16 @@ class PPAPI_PROXY_EXPORT RawVarDataGraph {
static scoped_ptr<RawVarDataGraph> Read(const IPC::Message* m,
PickleIterator* iter);
+ // Returns a vector of SerializedHandles associated with this RawVarDataGraph.
+ // Ownership of the pointers remains with the elements of the RawVarDataGraph.
+ std::vector<SerializedHandle*> GetHandles();
+
+ // Sets the threshold size at which point we switch from transmitting
+ // array buffers in IPC messages to using shared memory. This is only used
+ // for testing purposes where we need to transmit small buffers using shmem
+ // (in order to have fast tests).
+ static void SetMinimumArrayBufferSizeForShmemForTest(uint32 threshold);
+
// A list of the nodes in the graph.
ScopedVector<RawVarData> data_;
};
@@ -107,6 +117,10 @@ class RawVarData {
const IPC::Message* m,
PickleIterator* iter) = 0;
+ // Returns a SerializedHandle associated with this RawVarData or NULL if none
+ // exists. Ownership of the pointer remains with the RawVarData.
+ virtual SerializedHandle* GetHandle();
+
bool initialized() { return initialized_; }
protected:
@@ -182,6 +196,7 @@ class ArrayBufferRawVarData : public RawVarData {
virtual bool Read(PP_VarType type,
const IPC::Message* m,
PickleIterator* iter) OVERRIDE;
+ virtual SerializedHandle* GetHandle() OVERRIDE;
private:
// The type of the storage underlying the array buffer.