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> |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 // Create and manages texture mailbox to be used by Reflector. | 32 // Create and manages texture mailbox to be used by Reflector. |
33 class CONTENT_EXPORT ReflectorTexture { | 33 class CONTENT_EXPORT ReflectorTexture { |
34 public: | 34 public: |
35 explicit ReflectorTexture(cc::ContextProvider* provider); | 35 explicit ReflectorTexture(cc::ContextProvider* provider); |
36 ~ReflectorTexture(); | 36 ~ReflectorTexture(); |
37 | 37 |
38 void CopyTextureFullImage(const gfx::Size& size); | 38 void CopyTextureFullImage(const gfx::Size& size); |
39 void CopyTextureSubImage(const gfx::Rect& size); | 39 void CopyTextureSubImage(const gfx::Rect& size); |
40 | 40 |
| 41 bool is_texture_defined() const { return is_texture_defined_; } |
| 42 |
41 uint32_t texture_id() const { return texture_id_; } | 43 uint32_t texture_id() const { return texture_id_; } |
42 scoped_refptr<OwnedMailbox> mailbox() { return mailbox_; } | 44 scoped_refptr<OwnedMailbox> mailbox() { return mailbox_; } |
43 | 45 |
44 private: | 46 private: |
45 scoped_refptr<OwnedMailbox> mailbox_; | 47 scoped_refptr<OwnedMailbox> mailbox_; |
46 std::unique_ptr<display_compositor::GLHelper> gl_helper_; | 48 std::unique_ptr<display_compositor::GLHelper> gl_helper_; |
47 uint32_t texture_id_; | 49 uint32_t texture_id_; |
| 50 bool is_texture_defined_ = false; |
48 | 51 |
49 DISALLOW_COPY_AND_ASSIGN(ReflectorTexture); | 52 DISALLOW_COPY_AND_ASSIGN(ReflectorTexture); |
50 }; | 53 }; |
51 | 54 |
52 } // namespace content | 55 } // namespace content |
53 | 56 |
54 #endif | 57 #endif |
OLD | NEW |