diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-16 00:00:41 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-16 00:00:41 +0000 |
commit | ac95423484e52877d1bcac0557dfc3f1a437c9b1 (patch) | |
tree | 50d976ff9d8b1d07238e43ce50e1ee8003285859 /cc/resources/texture_mailbox.h | |
parent | cdeb61bbacdaef60e54563f670113a9e10d6b724 (diff) | |
download | chromium_src-ac95423484e52877d1bcac0557dfc3f1a437c9b1.zip chromium_src-ac95423484e52877d1bcac0557dfc3f1a437c9b1.tar.gz chromium_src-ac95423484e52877d1bcac0557dfc3f1a437c9b1.tar.bz2 |
cc: Add a texture target to TextureMailbox.
Not all textures provided through TextureMailbox will be GL_TEXTURE_2D. When
the compositor consumes or produces mailboxes with other targets, it needs to
specify the appropriate target.
Tests:
ResourceProviderTest.TextureMailbox_GLTexture2D
ResourceProviderTest.TextureMailbox_GLTextureExternalOES
R=piman
BUG=179729
Review URL: https://codereview.chromium.org/14064009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/texture_mailbox.h')
-rw-r--r-- | cc/resources/texture_mailbox.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cc/resources/texture_mailbox.h b/cc/resources/texture_mailbox.h index 1353d47..ff8c184 100644 --- a/cc/resources/texture_mailbox.h +++ b/cc/resources/texture_mailbox.h @@ -26,6 +26,10 @@ class CC_EXPORT TextureMailbox { TextureMailbox(const gpu::Mailbox& mailbox_name, const ReleaseCallback& callback, unsigned sync_point); + TextureMailbox(const gpu::Mailbox& mailbox_name, + const ReleaseCallback& callback, + unsigned texture_target, + unsigned sync_point); ~TextureMailbox(); @@ -38,11 +42,13 @@ class CC_EXPORT TextureMailbox { void ResetSyncPoint() { sync_point_ = 0; } void RunReleaseCallback(unsigned sync_point, bool lost_resource) const; void SetName(const gpu::Mailbox&); + unsigned target() const { return target_; } unsigned sync_point() const { return sync_point_; } private: gpu::Mailbox name_; ReleaseCallback callback_; + unsigned target_; unsigned sync_point_; }; |