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

Side by Side Diff: ui/compositor/compositor.h

Issue 11194042: Implement TextureImageTransportSurface using texture mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura DCHECK() Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « gpu/command_buffer/service/texture_definition.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_COMPOSITOR_COMPOSITOR_H_ 5 #ifndef UI_COMPOSITOR_COMPOSITOR_H_
6 #define UI_COMPOSITOR_COMPOSITOR_H_ 6 #define UI_COMPOSITOR_COMPOSITOR_H_
7 7
8 #include "base/hash_tables.h" 8 #include "base/hash_tables.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 public: 105 public:
106 Texture(bool flipped, const gfx::Size& size, float device_scale_factor); 106 Texture(bool flipped, const gfx::Size& size, float device_scale_factor);
107 107
108 bool flipped() const { return flipped_; } 108 bool flipped() const { return flipped_; }
109 gfx::Size size() const { return size_; } 109 gfx::Size size() const { return size_; }
110 float device_scale_factor() const { return device_scale_factor_; } 110 float device_scale_factor() const { return device_scale_factor_; }
111 111
112 virtual unsigned int PrepareTexture() = 0; 112 virtual unsigned int PrepareTexture() = 0;
113 virtual WebKit::WebGraphicsContext3D* HostContext3D() = 0; 113 virtual WebKit::WebGraphicsContext3D* HostContext3D() = 0;
114 114
115 virtual void Consume(const gfx::Size& new_size) {}
116 virtual void Produce() {}
117
115 protected: 118 protected:
116 virtual ~Texture(); 119 virtual ~Texture();
120 gfx::Size size_; // in pixel
117 121
118 private: 122 private:
119 friend class base::RefCounted<Texture>; 123 friend class base::RefCounted<Texture>;
120 124
121 bool flipped_; 125 bool flipped_;
122 gfx::Size size_; // in pixel
123 float device_scale_factor_; 126 float device_scale_factor_;
124 127
125 DISALLOW_COPY_AND_ASSIGN(Texture); 128 DISALLOW_COPY_AND_ASSIGN(Texture);
126 }; 129 };
127 130
128 // An interface to allow the compositor to communicate with its owner. 131 // An interface to allow the compositor to communicate with its owner.
129 class COMPOSITOR_EXPORT CompositorDelegate { 132 class COMPOSITOR_EXPORT CompositorDelegate {
130 public: 133 public:
131 // Requests the owner to schedule a redraw of the layer tree. 134 // Requests the owner to schedule a redraw of the layer tree.
132 virtual void ScheduleDraw() = 0; 135 virtual void ScheduleDraw() = 0;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 bool disable_schedule_composite_; 308 bool disable_schedule_composite_;
306 309
307 CompositorLock* compositor_lock_; 310 CompositorLock* compositor_lock_;
308 311
309 DISALLOW_COPY_AND_ASSIGN(Compositor); 312 DISALLOW_COPY_AND_ASSIGN(Compositor);
310 }; 313 };
311 314
312 } // namespace ui 315 } // namespace ui
313 316
314 #endif // UI_COMPOSITOR_COMPOSITOR_H_ 317 #endif // UI_COMPOSITOR_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/texture_definition.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698