Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/renderer/browser_plugin/browser_plugin_compositing_helper.h" | 5 #include "content/renderer/browser_plugin/browser_plugin_compositing_helper.h" |
| 6 | 6 |
| 7 #include "cc/solid_color_layer.h" | 7 #include "cc/solid_color_layer.h" |
| 8 #include "cc/texture_layer.h" | 8 #include "cc/texture_layer.h" |
| 9 #include "content/common/browser_plugin_messages.h" | 9 #include "content/common/browser_plugin_messages.h" |
| 10 #include "content/renderer/browser_plugin/browser_plugin_manager.h" | 10 #include "content/renderer/browser_plugin/browser_plugin_manager.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 211 cc::TextureMailbox::ReleaseCallback callback; | 211 cc::TextureMailbox::ReleaseCallback callback; |
| 212 if (current_mailbox_valid) { | 212 if (current_mailbox_valid) { |
| 213 callback = base::Bind(&BrowserPluginCompositingHelper::MailboxReleased, | 213 callback = base::Bind(&BrowserPluginCompositingHelper::MailboxReleased, |
| 214 scoped_refptr<BrowserPluginCompositingHelper>(this), | 214 scoped_refptr<BrowserPluginCompositingHelper>(this), |
| 215 mailbox_name, | 215 mailbox_name, |
| 216 gpu_route_id, | 216 gpu_route_id, |
| 217 gpu_host_id); | 217 gpu_host_id); |
| 218 } | 218 } |
| 219 texture_layer_->setTextureMailbox(cc::TextureMailbox(mailbox_name, | 219 texture_layer_->setTextureMailbox(cc::TextureMailbox(mailbox_name, |
| 220 callback)); | 220 callback)); |
| 221 texture_layer_->setNeedsDisplay(); | |
|
jamesr
2013/03/06 19:30:28
Is this an unrelated change?
alexst (slow to review)
2013/03/06 20:34:07
Related, when partial swaps are turned on, the emb
| |
| 221 last_mailbox_valid_ = current_mailbox_valid; | 222 last_mailbox_valid_ = current_mailbox_valid; |
| 222 } | 223 } |
| 223 | 224 |
| 224 void BrowserPluginCompositingHelper::UpdateVisibility(bool visible) { | 225 void BrowserPluginCompositingHelper::UpdateVisibility(bool visible) { |
| 225 if (texture_layer_) | 226 if (texture_layer_) |
| 226 texture_layer_->setIsDrawable(visible); | 227 texture_layer_->setIsDrawable(visible); |
| 227 } | 228 } |
| 228 | 229 |
| 229 } // namespace content | 230 } // namespace content |
| OLD | NEW |