OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_REFLECTOR_TEXTURE_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_REFLECTOR_TEXTURE_H_ |
6 #define CONTENT_BROWSER_COMPOSITOR_REFLECTOR_TEXTURE_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_REFLECTOR_TEXTURE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "content/browser/compositor/owned_mailbox.h" | 14 #include "content/browser/compositor/owned_mailbox.h" |
14 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
15 | 16 |
16 namespace cc { | 17 namespace cc { |
17 class ContextProvider; | 18 class ContextProvider; |
18 } | 19 } |
19 | 20 |
20 namespace gfx { | 21 namespace gfx { |
21 class Rect; | 22 class Rect; |
22 class Size; | 23 class Size; |
23 } | 24 } |
24 | 25 |
25 namespace content { | 26 namespace content { |
26 class GLHelper; | 27 class GLHelper; |
27 | 28 |
28 // Create and manages texture mailbox to be used by Reflector. | 29 // Create and manages texture mailbox to be used by Reflector. |
29 class CONTENT_EXPORT ReflectorTexture { | 30 class CONTENT_EXPORT ReflectorTexture { |
30 public: | 31 public: |
31 explicit ReflectorTexture(cc::ContextProvider* provider); | 32 explicit ReflectorTexture(cc::ContextProvider* provider); |
32 ~ReflectorTexture(); | 33 ~ReflectorTexture(); |
33 | 34 |
34 void CopyTextureFullImage(const gfx::Size& size); | 35 void CopyTextureFullImage(const gfx::Size& size); |
35 void CopyTextureSubImage(const gfx::Rect& size); | 36 void CopyTextureSubImage(const gfx::Rect& size); |
36 | 37 |
37 uint32_t texture_id() const { return texture_id_; } | 38 uint32_t texture_id() const { return texture_id_; } |
38 scoped_refptr<OwnedMailbox> mailbox() { return mailbox_; } | 39 scoped_refptr<OwnedMailbox> mailbox() { return mailbox_; } |
39 | 40 |
40 private: | 41 private: |
41 scoped_refptr<OwnedMailbox> mailbox_; | 42 scoped_refptr<OwnedMailbox> mailbox_; |
42 scoped_ptr<GLHelper> gl_helper_; | 43 std::unique_ptr<GLHelper> gl_helper_; |
43 uint32_t texture_id_; | 44 uint32_t texture_id_; |
44 | 45 |
45 DISALLOW_COPY_AND_ASSIGN(ReflectorTexture); | 46 DISALLOW_COPY_AND_ASSIGN(ReflectorTexture); |
46 }; | 47 }; |
47 | 48 |
48 } // namespace content | 49 } // namespace content |
49 | 50 |
50 #endif | 51 #endif |
OLD | NEW |