diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-03 07:10:22 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-03 07:10:22 +0000 |
commit | 857ace8d77ab2f90292cf54c7c6623a26d5f6722 (patch) | |
tree | 7eedfdba24d0baa44941b2eff0d7e51456910ce0 /cc/transferable_resource.h | |
parent | 1bcf642ae46442039caa517e405fcaf5758f146d (diff) | |
download | chromium_src-857ace8d77ab2f90292cf54c7c6623a26d5f6722.zip chromium_src-857ace8d77ab2f90292cf54c7c6623a26d5f6722.tar.gz chromium_src-857ace8d77ab2f90292cf54c7c6623a26d5f6722.tar.bz2 |
Separate TransferableResource into own header
This is so that we can write the picklers without having to include webcore/wtf.
This also changes the resource transfer functions to avoid copies.
BUG=146080
Review URL: https://chromiumcodereview.appspot.com/11358080
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165847 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/transferable_resource.h')
-rw-r--r-- | cc/transferable_resource.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/cc/transferable_resource.h b/cc/transferable_resource.h new file mode 100644 index 0000000..a390104 --- /dev/null +++ b/cc/transferable_resource.h @@ -0,0 +1,44 @@ +// Copyright 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CC_TRANSERABLE_RESOURCE_H_ +#define CC_TRANSERABLE_RESOURCE_H_ + +#include <vector> + +#include "cc/cc_export.h" +#include "ui/gfx/size.h" +#include "third_party/khronos/GLES2/gl2.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorTransferableResourceList.h" + +namespace cc { + +struct Mailbox { + GLbyte name[64]; +}; + +struct CC_EXPORT TransferableResource { + TransferableResource(); + ~TransferableResource(); + + unsigned id; + GLenum format; + gfx::Size size; + Mailbox mailbox; +}; + +typedef std::vector<TransferableResource> TransferableResourceArray; + +struct CC_EXPORT TransferableResourceList : + public NON_EXPORTED_BASE(WebKit::WebCompositorTransferableResourceList) { + TransferableResourceList(); + ~TransferableResourceList(); + + TransferableResourceArray resources; + unsigned sync_point; +}; + +} // namespace cc + +#endif // CC_TRANSERABLE_RESOURCE_H_ |