Make USB permissions work in the new permission message system
[chromium-blink-merge.git] / content / browser / compositor / reflector_texture.h
blobcacabd39c15eac5f80e1ffdf48e22034162b7a24
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.
5 #ifndef CONTENT_BROWSER_COMPOSITOR_REFLECTOR_TEXTURE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_REFLECTOR_TEXTURE_H_
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"
13 namespace cc {
14 class ContextProvider;
17 namespace gfx {
18 class Rect;
19 class Size;
22 namespace content {
23 class GLHelper;
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();
31 void CopyTextureFullImage(const gfx::Size& size);
32 void CopyTextureSubImage(const gfx::Rect& size);
34 uint32 texture_id() const { return texture_id_; }
35 scoped_refptr<OwnedMailbox> mailbox() { return mailbox_; }
37 private:
38 scoped_refptr<OwnedMailbox> mailbox_;
39 scoped_ptr<GLHelper> gl_helper_;
40 uint32 texture_id_;
42 DISALLOW_COPY_AND_ASSIGN(ReflectorTexture);
45 } // namespace content
47 #endif