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

Unified Diff: gpu/command_buffer/service/mailbox_manager.h

Issue 180723023: gpu: Mailbox emulation with EGLImage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 6 years, 9 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: gpu/command_buffer/service/mailbox_manager.h
diff --git a/gpu/command_buffer/service/mailbox_manager.h b/gpu/command_buffer/service/mailbox_manager.h
index a2319791249316e369ae1ed53b4ac684a022e32b..e1b36cb934e61b72af29a66c5e47fc5b53461343 100644
--- a/gpu/command_buffer/service/mailbox_manager.h
+++ b/gpu/command_buffer/service/mailbox_manager.h
@@ -19,6 +19,7 @@ typedef signed char GLbyte;
namespace gpu {
namespace gles2 {
+class MailboxSynchronizer;
class Texture;
class TextureManager;
@@ -35,11 +36,20 @@ class GPU_EXPORT MailboxManager : public base::RefCounted<MailboxManager> {
const Mailbox& mailbox,
Texture* texture);
+ // Returns whether this manager synchronizes with other instances.
+ bool UsesSync() { return sync_ != NULL; }
+
+ // Used with the MailboxSynchronizer to push/pull texture state to/from
+ // other manager instances.
+ void PushTextureUpdates();
+ void PullTextureUpdates();
+
// Destroy any mailbox that reference the given texture.
void TextureDeleted(Texture* texture);
private:
friend class base::RefCounted<MailboxManager>;
+ friend class MailboxSynchronizer;
~MailboxManager();
@@ -48,6 +58,7 @@ class GPU_EXPORT MailboxManager : public base::RefCounted<MailboxManager> {
unsigned target;
Mailbox mailbox;
};
+ void InsertTexture(TargetName target_name, Texture* texture);
static bool TargetNameLess(const TargetName& lhs, const TargetName& rhs);
@@ -65,6 +76,8 @@ class GPU_EXPORT MailboxManager : public base::RefCounted<MailboxManager> {
MailboxToTextureMap mailbox_to_textures_;
TextureToMailboxMap textures_to_mailboxes_;
+ MailboxSynchronizer* sync_;
+
DISALLOW_COPY_AND_ASSIGN(MailboxManager);
};
} // namespage gles2
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.cc ('k') | gpu/command_buffer/service/mailbox_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698