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

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: rebased, fixed post sub buffer, use multiple mailbox names Created 8 years, 1 month 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
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 public: 97 public:
98 Texture(bool flipped, const gfx::Size& size, float device_scale_factor); 98 Texture(bool flipped, const gfx::Size& size, float device_scale_factor);
99 99
100 bool flipped() const { return flipped_; } 100 bool flipped() const { return flipped_; }
101 gfx::Size size() const { return size_; } 101 gfx::Size size() const { return size_; }
102 float device_scale_factor() const { return device_scale_factor_; } 102 float device_scale_factor() const { return device_scale_factor_; }
103 103
104 virtual unsigned int PrepareTexture() = 0; 104 virtual unsigned int PrepareTexture() = 0;
105 virtual WebKit::WebGraphicsContext3D* HostContext3D() = 0; 105 virtual WebKit::WebGraphicsContext3D* HostContext3D() = 0;
106 106
107 virtual void Consume(const gfx::Size& new_size) {}
108 virtual void Produce() {}
109
107 protected: 110 protected:
108 virtual ~Texture(); 111 virtual ~Texture();
112 gfx::Size size_; // in pixel
109 113
110 private: 114 private:
111 friend class base::RefCounted<Texture>; 115 friend class base::RefCounted<Texture>;
112 116
113 bool flipped_; 117 bool flipped_;
114 gfx::Size size_; // in pixel
115 float device_scale_factor_; 118 float device_scale_factor_;
116 119
117 DISALLOW_COPY_AND_ASSIGN(Texture); 120 DISALLOW_COPY_AND_ASSIGN(Texture);
118 }; 121 };
119 122
120 // An interface to allow the compositor to communicate with its owner. 123 // An interface to allow the compositor to communicate with its owner.
121 class COMPOSITOR_EXPORT CompositorDelegate { 124 class COMPOSITOR_EXPORT CompositorDelegate {
122 public: 125 public:
123 // Requests the owner to schedule a redraw of the layer tree. 126 // Requests the owner to schedule a redraw of the layer tree.
124 virtual void ScheduleDraw() = 0; 127 virtual void ScheduleDraw() = 0;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 bool disable_schedule_composite_; 293 bool disable_schedule_composite_;
291 294
292 CompositorLock* compositor_lock_; 295 CompositorLock* compositor_lock_;
293 296
294 DISALLOW_COPY_AND_ASSIGN(Compositor); 297 DISALLOW_COPY_AND_ASSIGN(Compositor);
295 }; 298 };
296 299
297 } // namespace ui 300 } // namespace ui
298 301
299 #endif // UI_COMPOSITOR_COMPOSITOR_H_ 302 #endif // UI_COMPOSITOR_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698