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"
14 class ContextProvider
;
25 // Create and manages texture mailbox to be used by Reflector.
26 class CONTENT_EXPORT ReflectorTexture
{
28 explicit ReflectorTexture(cc::ContextProvider
* provider
);
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_
; }
38 scoped_refptr
<OwnedMailbox
> mailbox_
;
39 scoped_ptr
<GLHelper
> gl_helper_
;
42 DISALLOW_COPY_AND_ASSIGN(ReflectorTexture
);
45 } // namespace content