diff options
author | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-02 17:35:08 +0000 |
---|---|---|
committer | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-02 17:35:08 +0000 |
commit | 8bd8725b91a348f2c6c65978831c0c43af7b99f9 (patch) | |
tree | fc2f99a5e4bf832f2b0d1a8a00215892c2496fd9 | |
parent | c0b5eb0b631fbdaff5561bb908a54479c7621a22 (diff) | |
download | chromium_src-8bd8725b91a348f2c6c65978831c0c43af7b99f9.zip chromium_src-8bd8725b91a348f2c6c65978831c0c43af7b99f9.tar.gz chromium_src-8bd8725b91a348f2c6c65978831c0c43af7b99f9.tar.bz2 |
Transfer texture wrap mode in in cc::Resources
This is needed for the delegated software renderer. For the GL delegated
render, the texture state is maintained by the driver.
BUG=314190
Review URL: https://codereview.chromium.org/303063002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274269 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | cc/resources/resource_provider.cc | 5 | ||||
-rw-r--r-- | cc/resources/transferable_resource.cc | 4 | ||||
-rw-r--r-- | cc/resources/transferable_resource.h | 1 | ||||
-rw-r--r-- | content/common/cc_messages.h | 1 |
4 files changed, 8 insertions, 3 deletions
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc index de683e7..e3c21ff 100644 --- a/cc/resources/resource_provider.cc +++ b/cc/resources/resource_provider.cc @@ -1445,7 +1445,7 @@ void ResourceProvider::ReceiveFromChild( it->size, Resource::Delegated, GL_LINEAR, - GL_CLAMP_TO_EDGE); + it->is_repeated ? GL_REPEAT : GL_CLAMP_TO_EDGE); } else { resource = Resource(0, it->size, @@ -1453,7 +1453,7 @@ void ResourceProvider::ReceiveFromChild( it->mailbox_holder.texture_target, it->filter, 0, - GL_CLAMP_TO_EDGE, + it->is_repeated ? GL_REPEAT : GL_CLAMP_TO_EDGE, TextureUsageAny, it->format); resource.mailbox = TextureMailbox(it->mailbox_holder.mailbox, @@ -1620,6 +1620,7 @@ void ResourceProvider::TransferResource(GLES2Interface* gl, resource->mailbox_holder.texture_target = source->target; resource->filter = source->filter; resource->size = source->size; + resource->is_repeated = (source->wrap_mode == GL_REPEAT); if (source->type == Bitmap) { resource->mailbox_holder.mailbox = source->shared_bitmap_id; diff --git a/cc/resources/transferable_resource.cc b/cc/resources/transferable_resource.cc index e7e9e24..30fa316 100644 --- a/cc/resources/transferable_resource.cc +++ b/cc/resources/transferable_resource.cc @@ -12,7 +12,9 @@ TransferableResource::TransferableResource() : id(0), format(RGBA_8888), filter(0), - is_software(false) {} + is_repeated(false), + is_software(false) { +} TransferableResource::~TransferableResource() { } diff --git a/cc/resources/transferable_resource.h b/cc/resources/transferable_resource.h index 8ca9ffa..11651f2 100644 --- a/cc/resources/transferable_resource.h +++ b/cc/resources/transferable_resource.h @@ -33,6 +33,7 @@ struct CC_EXPORT TransferableResource { uint32 filter; gfx::Size size; gpu::MailboxHolder mailbox_holder; + bool is_repeated; bool is_software; }; diff --git a/content/common/cc_messages.h b/content/common/cc_messages.h index 3ad133c..8a4dcfe 100644 --- a/content/common/cc_messages.h +++ b/content/common/cc_messages.h @@ -241,6 +241,7 @@ IPC_STRUCT_TRAITS_BEGIN(cc::TransferableResource) IPC_STRUCT_TRAITS_MEMBER(filter) IPC_STRUCT_TRAITS_MEMBER(size) IPC_STRUCT_TRAITS_MEMBER(mailbox_holder) + IPC_STRUCT_TRAITS_MEMBER(is_repeated) IPC_STRUCT_TRAITS_MEMBER(is_software) IPC_STRUCT_TRAITS_END() |