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

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

Issue 1937173002: Revert of 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, 8 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/ppb_graphics_3d_impl.h
diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.h b/content/renderer/pepper/ppb_graphics_3d_impl.h
index bc439789474e834e79bb108c792051c147313765..b356b508c927c9c76ca0dd62ff4af2d2d45e4f1f 100644
--- a/content/renderer/pepper/ppb_graphics_3d_impl.h
+++ b/content/renderer/pepper/ppb_graphics_3d_impl.h
@@ -48,10 +48,6 @@
gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start,
int32_t end) override;
void EnsureWorkVisible() override;
- void TakeFrontBuffer() override;
- void ReturnFrontBuffer(const gpu::Mailbox& mailbox,
- const gpu::SyncToken& sync_token,
- bool is_lost);
// Binds/unbinds the graphics of this context with the associated instance.
// Returns true if binding/unbinding is successful.
@@ -63,6 +59,11 @@
// Notifications about the view's progress painting. See PluginInstance.
// These messages are used to send Flush callbacks to the plugin.
void ViewInitiatedPaint();
+
+ void GetBackingMailbox(gpu::Mailbox* mailbox, gpu::SyncToken* sync_token) {
+ *mailbox = mailbox_;
+ *sync_token = sync_token_;
+ }
gpu::CommandBufferProxyImpl* GetCommandBufferProxy();
@@ -93,16 +94,6 @@
// Notifications sent to plugin.
void SendContextLost();
- // Reuses a mailbox if one is available, otherwise makes a new one.
- gpu::Mailbox GenerateMailbox();
-
- // A front buffer that was recently taken from the command buffer. This should
- // be immediately consumed by DoSwapBuffers().
- gpu::Mailbox taken_front_buffer_;
-
- // Mailboxes that are no longer in use.
- std::vector<gpu::Mailbox> mailboxes_to_reuse_;
-
// True if context is bound to instance.
bool bound_to_instance_;
// True when waiting for compositor to commit our backing texture.
@@ -112,6 +103,8 @@
bool lost_context_ = false;
#endif
+ gpu::Mailbox mailbox_;
+ gpu::SyncToken sync_token_;
bool has_alpha_;
scoped_refptr<gpu::GpuChannelHost> channel_;
std::unique_ptr<gpu::CommandBufferProxyImpl> command_buffer_;
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | content/renderer/pepper/ppb_graphics_3d_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698