コード例 #1
0
GMPPlaneImpl::GMPPlaneImpl(const GMPPlaneData& aPlaneData, GMPVideoHostImpl* aHost)
: mBuffer(aPlaneData.mBuffer()),
  mSize(aPlaneData.mSize()),
  mStride(aPlaneData.mStride()),
  mHost(aHost)
{
  MOZ_ASSERT(mHost);
  mHost->PlaneCreated(this);
}
コード例 #2
0
bool GMPPlaneImpl::InitPlaneData(GMPPlaneData& aPlaneData) {
  aPlaneData.mBuffer() = mBuffer;
  aPlaneData.mSize() = mSize;
  aPlaneData.mStride() = mStride;

  // This method is called right before Shmem is sent to another process.
  // We need to effectively zero out our member copy so that we don't
  // try to delete memory we don't own later.
  mBuffer = ipc::Shmem();

  return true;
}