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

Side by Side Diff: gpu/command_buffer/service/mailbox_manager_impl.h

Issue 1331843005: Implemented new fence syncs which replaces the old sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some fixes Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_IMPL_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_IMPL_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_IMPL_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 12 matching lines...) Expand all
23 23
24 // Manages resources scoped beyond the context or context group level. 24 // Manages resources scoped beyond the context or context group level.
25 class GPU_EXPORT MailboxManagerImpl : public MailboxManager { 25 class GPU_EXPORT MailboxManagerImpl : public MailboxManager {
26 public: 26 public:
27 MailboxManagerImpl(); 27 MailboxManagerImpl();
28 28
29 // MailboxManager implementation: 29 // MailboxManager implementation:
30 Texture* ConsumeTexture(const Mailbox& mailbox) override; 30 Texture* ConsumeTexture(const Mailbox& mailbox) override;
31 void ProduceTexture(const Mailbox& mailbox, Texture* texture) override; 31 void ProduceTexture(const Mailbox& mailbox, Texture* texture) override;
32 bool UsesSync() override; 32 bool UsesSync() override;
33 void PushTextureUpdates(uint32 sync_point) override {} 33 void PushTextureUpdates(int channel_client_id,
34 void PullTextureUpdates(uint32 sync_point) override {} 34 uint32 route_id,
35 uint32 release) override {}
36 void PullTextureUpdates(int channel_client_id,
37 uint32 route_id,
38 uint32 release) override {}
35 void TextureDeleted(Texture* texture) override; 39 void TextureDeleted(Texture* texture) override;
36 40
37 protected: 41 protected:
38 ~MailboxManagerImpl() override; 42 ~MailboxManagerImpl() override;
39 43
40 private: 44 private:
41 friend class base::RefCounted<MailboxManager>; 45 friend class base::RefCounted<MailboxManager>;
42 46
43 void InsertTexture(const Mailbox& mailbox, Texture* texture); 47 void InsertTexture(const Mailbox& mailbox, Texture* texture);
44 48
45 // This is a bidirectional map between mailbox and textures. We can have 49 // This is a bidirectional map between mailbox and textures. We can have
46 // multiple mailboxes per texture, but one texture per mailbox. We keep an 50 // multiple mailboxes per texture, but one texture per mailbox. We keep an
47 // iterator in the MailboxToTextureMap to be able to manage changes to 51 // iterator in the MailboxToTextureMap to be able to manage changes to
48 // the TextureToMailboxMap efficiently. 52 // the TextureToMailboxMap efficiently.
49 typedef std::multimap<Texture*, Mailbox> TextureToMailboxMap; 53 typedef std::multimap<Texture*, Mailbox> TextureToMailboxMap;
50 typedef std::map<Mailbox, TextureToMailboxMap::iterator> 54 typedef std::map<Mailbox, TextureToMailboxMap::iterator>
51 MailboxToTextureMap; 55 MailboxToTextureMap;
52 56
53 MailboxToTextureMap mailbox_to_textures_; 57 MailboxToTextureMap mailbox_to_textures_;
54 TextureToMailboxMap textures_to_mailboxes_; 58 TextureToMailboxMap textures_to_mailboxes_;
55 59
56 DISALLOW_COPY_AND_ASSIGN(MailboxManagerImpl); 60 DISALLOW_COPY_AND_ASSIGN(MailboxManagerImpl);
57 }; 61 };
58 62
59 } // namespage gles2 63 } // namespage gles2
60 } // namespace gpu 64 } // namespace gpu
61 65
62 #endif // GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_IMPL_H_ 66 #endif // GPU_COMMAND_BUFFER_SERVICE_MAILBOX_MANAGER_IMPL_H_
63 67
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698