Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.h

Issue 1964793002: Revert of [Reland 1] Pepper takes ownership of a mailbox before passing it to the texture layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 2ad4318efc701705e3310e60eabdef50e1dbd6ea..da461798a5502d85b77b040a6e0bbc80c3ec0cb0 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.h
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.h
@@ -24,7 +24,6 @@
#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"
@@ -198,17 +197,9 @@
// slow path can also be triggered if there is an overlapping frame.
void ScrollRect(int dx, int dy, const gfx::Rect& rect);
- // 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);
+ // Commit the backing texture to the screen once the side effects some
+ // rendering up to an offscreen SwapBuffers are visible.
+ void CommitBackingTexture();
// Called when the out-of-process plugin implementing this instance crashed.
void InstanceCrashed();
@@ -711,28 +702,6 @@
void ConvertRectToDIP(PP_Rect* rect) const;
void ConvertDIPToViewport(gfx::Rect* rect) const;
- // Each time CommitTextureMailbox() is called, this instance is given
- // ownership
- // of a cc::TextureMailbox. This instance always needs to hold on to the most
- // recently committed cc::TextureMailbox, since UpdateLayer() might require
- // it.
- // Since it is possible for a cc::TextureMailbox to be passed to
- // texture_layer_ more than once, a reference counting mechanism is necessary
- // to ensure that a cc::TextureMailbox isn't returned until all copies of it
- // have been released by texture_layer_.
- //
- // This method should be called each time a cc::TextureMailbox is passed to
- // |texture_layer_|. It increments an internal reference count.
- void IncrementTextureReferenceCount(const cc::TextureMailbox& mailbox);
-
- // This method should be called each time |texture_layer_| finishes consuming
- // a cc::TextureMailbox. It decrements an internal reference count. Returns
- // whether the last reference was removed.
- bool DecrementTextureReferenceCount(const cc::TextureMailbox& mailbox);
-
- // Whether a given cc::TextureMailbox is in use by |texture_layer_|.
- bool IsTextureInUse(const cc::TextureMailbox& mailbox) const;
-
RenderFrameImpl* render_frame_;
base::Closure instance_deleted_callback_;
scoped_refptr<PluginModule> module_;
@@ -964,19 +933,6 @@
// 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_;
-
- gpu::SyncToken committed_texture_consumed_sync_token_;
-
- // Holds the number of references |texture_layer_| has to any given
- // cc::TextureMailbox.
- // We expect there to be no more than 10 textures in use at a time. A
- // std::vector will have better performance than a std::map.
- using TextureMailboxRefCount = std::pair<cc::TextureMailbox, int>;
- std::vector<TextureMailboxRefCount> texture_ref_counts_;
-
bool initialized_;
// We use a weak ptr factory for scheduling DidChangeView events so that we
« no previous file with comments | « components/mus/public/interfaces/command_buffer.mojom ('k') | content/renderer/pepper/pepper_plugin_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698