Index: content/renderer/pepper/pepper_plugin_instance_impl.h |
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.h b/content/renderer/pepper/pepper_plugin_instance_impl.h |
index da461798a5502d85b77b040a6e0bbc80c3ec0cb0..315381f011fd06e226866b1f32200a6e7aa8f6d8 100644 |
--- a/content/renderer/pepper/pepper_plugin_instance_impl.h |
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.h |
@@ -24,6 +24,7 @@ |
#include "cc/layers/content_layer_client.h" |
#include "cc/layers/layer.h" |
#include "cc/layers/texture_layer_client.h" |
+#include "cc/resources/texture_mailbox.h" |
#include "content/common/content_export.h" |
#include "content/public/renderer/pepper_plugin_instance.h" |
#include "content/public/renderer/plugin_instance_throttler.h" |
@@ -197,9 +198,17 @@ class CONTENT_EXPORT PepperPluginInstanceImpl |
// slow path can also be triggered if there is an overlapping frame. |
void ScrollRect(int dx, int dy, const gfx::Rect& rect); |
- // Commit the backing texture to the screen once the side effects some |
- // rendering up to an offscreen SwapBuffers are visible. |
- void CommitBackingTexture(); |
+ // Commit the texture mailbox to the screen. |
+ void CommitTextureMailbox(const cc::TextureMailbox& texture_mailbox); |
+ |
+ // Passes the committed texture to |texture_layer_| and marks it as in use. |
+ void PassCommittedTextureToTextureLayer(); |
+ |
+ // Callback when the compositor is finished consuming the committed texture. |
+ void FinishedConsumingCommittedTexture( |
+ const cc::TextureMailbox& texture_mailbox, |
+ const gpu::SyncToken& sync_token, |
+ bool is_lost); |
// Called when the out-of-process plugin implementing this instance crashed. |
void InstanceCrashed(); |
@@ -933,6 +942,16 @@ class CONTENT_EXPORT PepperPluginInstanceImpl |
// The text that is currently selected in the plugin. |
base::string16 selected_text_; |
+ // The most recently committed texture. This is kept around in case the layer |
+ // needs to be regenerated. |
+ cc::TextureMailbox committed_texture_; |
+ |
+ // Whether the most recently committed texture is still in use by the |
+ // compositor. |
+ bool committed_texture_in_use_ = false; |
+ |
+ gpu::SyncToken committed_texture_consumed_sync_token_; |
+ |
bool initialized_; |
// We use a weak ptr factory for scheduling DidChangeView events so that we |