| Index: cc/layers/texture_layer.cc
|
| diff --git a/cc/layers/texture_layer.cc b/cc/layers/texture_layer.cc
|
| index eab540ecb9743cb087a6e48ae2586e2c6b96a94f..b5b31732ac88dd356dd6974d448dd4135b6602a9 100644
|
| --- a/cc/layers/texture_layer.cc
|
| +++ b/cc/layers/texture_layer.cc
|
| @@ -152,6 +152,26 @@
|
| bool allow_mailbox_reuse = false;
|
| SetTextureMailboxInternal(mailbox, std::move(release_callback),
|
| requires_commit, allow_mailbox_reuse);
|
| +}
|
| +
|
| +static void IgnoreReleaseCallback(const gpu::SyncToken& sync_token, bool lost) {
|
| +}
|
| +
|
| +void TextureLayer::SetTextureMailboxWithoutReleaseCallback(
|
| + const TextureMailbox& mailbox) {
|
| + // We allow reuse of the mailbox if there is a new sync point signalling new
|
| + // content, and the release callback goes nowhere since we'll be calling it
|
| + // multiple times for the same mailbox.
|
| + DCHECK(!mailbox.IsValid() || !holder_ref_ ||
|
| + !mailbox.Equals(holder_ref_->holder()->mailbox()) ||
|
| + mailbox.sync_token() != holder_ref_->holder()->mailbox().sync_token());
|
| + std::unique_ptr<SingleReleaseCallback> release;
|
| + bool requires_commit = true;
|
| + bool allow_mailbox_reuse = true;
|
| + if (mailbox.IsValid())
|
| + release = SingleReleaseCallback::Create(base::Bind(&IgnoreReleaseCallback));
|
| + SetTextureMailboxInternal(mailbox, std::move(release), requires_commit,
|
| + allow_mailbox_reuse);
|
| }
|
|
|
| void TextureLayer::SetNeedsDisplayRect(const gfx::Rect& dirty_rect) {
|
|
|