OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h" | 5 #include "webkit/renderer/compositor_bindings/web_external_texture_layer_impl.h" |
6 | 6 |
7 #include "cc/layers/texture_layer.h" | 7 #include "cc/layers/texture_layer.h" |
8 #include "cc/resources/resource_update_queue.h" | 8 #include "cc/resources/resource_update_queue.h" |
9 #include "cc/resources/single_release_callback.h" | 9 #include "cc/resources/single_release_callback.h" |
10 #include "cc/resources/texture_mailbox.h" | 10 #include "cc/resources/texture_mailbox.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 return false; | 75 return false; |
76 } | 76 } |
77 gpu::Mailbox name; | 77 gpu::Mailbox name; |
78 name.SetName(client_mailbox.name); | 78 name.SetName(client_mailbox.name); |
79 if (bitmap) { | 79 if (bitmap) { |
80 *mailbox = cc::TextureMailbox(bitmap->shared_memory(), bitmap->size()); | 80 *mailbox = cc::TextureMailbox(bitmap->shared_memory(), bitmap->size()); |
81 } else { | 81 } else { |
82 *mailbox = | 82 *mailbox = |
83 cc::TextureMailbox(name, GL_TEXTURE_2D, client_mailbox.syncPoint); | 83 cc::TextureMailbox(name, GL_TEXTURE_2D, client_mailbox.syncPoint); |
84 } | 84 } |
| 85 mailbox->set_allow_overlay(client_mailbox.allowOverlay); |
85 | 86 |
86 if (mailbox->IsValid()) { | 87 if (mailbox->IsValid()) { |
87 *release_callback = cc::SingleReleaseCallback::Create(base::Bind( | 88 *release_callback = cc::SingleReleaseCallback::Create(base::Bind( |
88 &WebExternalTextureLayerImpl::DidReleaseMailbox, | 89 &WebExternalTextureLayerImpl::DidReleaseMailbox, |
89 this->AsWeakPtr(), | 90 this->AsWeakPtr(), |
90 client_mailbox, | 91 client_mailbox, |
91 bitmap)); | 92 bitmap)); |
92 } | 93 } |
93 | 94 |
94 return true; | 95 return true; |
(...skipping 22 matching lines...) Expand all Loading... |
117 | 118 |
118 blink::WebExternalTextureMailbox available_mailbox; | 119 blink::WebExternalTextureMailbox available_mailbox; |
119 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); | 120 memcpy(available_mailbox.name, mailbox.name, sizeof(available_mailbox.name)); |
120 available_mailbox.syncPoint = sync_point; | 121 available_mailbox.syncPoint = sync_point; |
121 if (bitmap) | 122 if (bitmap) |
122 layer->free_bitmaps_.push_back(bitmap); | 123 layer->free_bitmaps_.push_back(bitmap); |
123 layer->client_->mailboxReleased(available_mailbox); | 124 layer->client_->mailboxReleased(available_mailbox); |
124 } | 125 } |
125 | 126 |
126 } // namespace webkit | 127 } // namespace webkit |
OLD | NEW |