Correctly track texture cleared state for sharing
commit2f4ff4807f5d7805a5658ceb7ba71072152ea6c9
authorboliu <boliu@chromium.org>
Thu, 29 Jan 2015 23:00:37 +0000 (29 15:00 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 29 Jan 2015 23:01:33 +0000 (29 23:01 +0000)
treeddfd1b1858152265e8c771ddf9f6c73e26fd8452
parent044dfb80b1f612f3c84b35182db0f9b4d93e086c
Correctly track texture cleared state for sharing

When sharing textures in mailboxes using MailboxManagerSync
there's an optimization that if textures are not updated then
there is no need to share it again. However the code that
checks whether textures are updated ignores the cleared
state, causing shared texture to remain uncleared
indefinitely.

Fix by check the cleared state. And add a unit test.

BUG=453199

Review URL: https://codereview.chromium.org/890453002

Cr-Commit-Position: refs/heads/master@{#313814}
gpu/command_buffer/service/mailbox_manager_unittest.cc
gpu/command_buffer/service/texture_definition.cc
gpu/command_buffer/service/texture_definition.h