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

Side by Side Diff: content/browser/compositor/owned_mailbox.h

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 12 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 CONTENT_BROWSER_COMPOSITOR_OWNED_MAILBOX_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_OWNED_MAILBOX_H_
6 #define CONTENT_BROWSER_COMPOSITOR_OWNED_MAILBOX_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_OWNED_MAILBOX_H_
7 7
8 #include <stdint.h>
9
8 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
9 #include "content/browser/compositor/image_transport_factory.h" 11 #include "content/browser/compositor/image_transport_factory.h"
10 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
11 #include "gpu/command_buffer/common/mailbox_holder.h" 13 #include "gpu/command_buffer/common/mailbox_holder.h"
12 14
13 namespace content { 15 namespace content {
14 16
15 class GLHelper; 17 class GLHelper;
16 18
17 // This class holds a texture id and gpu::Mailbox, and deletes the texture 19 // This class holds a texture id and gpu::Mailbox, and deletes the texture
18 // id when the object itself is destroyed. Should only be created if a GLHelper 20 // id when the object itself is destroyed. Should only be created if a GLHelper
19 // exists on the ImageTransportFactory. 21 // exists on the ImageTransportFactory.
20 class CONTENT_EXPORT OwnedMailbox : public base::RefCounted<OwnedMailbox>, 22 class CONTENT_EXPORT OwnedMailbox : public base::RefCounted<OwnedMailbox>,
21 public ImageTransportFactoryObserver { 23 public ImageTransportFactoryObserver {
22 public: 24 public:
23 explicit OwnedMailbox(GLHelper* gl_helper); 25 explicit OwnedMailbox(GLHelper* gl_helper);
24 26
25 const gpu::MailboxHolder& holder() const { return mailbox_holder_; } 27 const gpu::MailboxHolder& holder() const { return mailbox_holder_; }
26 const gpu::Mailbox& mailbox() const { return mailbox_holder_.mailbox; } 28 const gpu::Mailbox& mailbox() const { return mailbox_holder_.mailbox; }
27 const gpu::SyncToken& sync_token() const { 29 const gpu::SyncToken& sync_token() const {
28 return mailbox_holder_.sync_token; 30 return mailbox_holder_.sync_token;
29 } 31 }
30 uint32 texture_id() const { return texture_id_; } 32 uint32_t texture_id() const { return texture_id_; }
31 uint32 target() const { return mailbox_holder_.texture_target; } 33 uint32_t target() const { return mailbox_holder_.texture_target; }
32 void UpdateSyncToken(const gpu::SyncToken& sync_token); 34 void UpdateSyncToken(const gpu::SyncToken& sync_token);
33 void Destroy(); 35 void Destroy();
34 36
35 protected: 37 protected:
36 ~OwnedMailbox() override; 38 ~OwnedMailbox() override;
37 39
38 // ImageTransportFactoryObserver implementation. 40 // ImageTransportFactoryObserver implementation.
39 void OnLostResources() override; 41 void OnLostResources() override;
40 42
41 private: 43 private:
42 friend class base::RefCounted<OwnedMailbox>; 44 friend class base::RefCounted<OwnedMailbox>;
43 45
44 uint32 texture_id_; 46 uint32_t texture_id_;
45 gpu::MailboxHolder mailbox_holder_; 47 gpu::MailboxHolder mailbox_holder_;
46 GLHelper* gl_helper_; 48 GLHelper* gl_helper_;
47 }; 49 };
48 50
49 } // namespace content 51 } // namespace content
50 52
51 #endif // CONTENT_BROWSER_COMPOSITOR_OWNED_MAILBOX_H_ 53 #endif // CONTENT_BROWSER_COMPOSITOR_OWNED_MAILBOX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698