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