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