Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Side by Side Diff: content/browser/compositor/reflector_texture.h

Issue 1123763003: Draw the offscreen texture to reflector's surface without extra copy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved texture code to ReflectorTexture Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW
« no previous file with comments | « content/browser/compositor/reflector_impl_unittest.cc ('k') | content/browser/compositor/reflector_texture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698