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

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: 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 public: 96 public:
97 Texture(bool flipped, const gfx::Size& size, float device_scale_factor); 97 Texture(bool flipped, const gfx::Size& size, float device_scale_factor);
98 98
99 bool flipped() const { return flipped_; } 99 bool flipped() const { return flipped_; }
100 gfx::Size size() const { return size_; } 100 gfx::Size size() const { return size_; }
101 float device_scale_factor() const { return device_scale_factor_; } 101 float device_scale_factor() const { return device_scale_factor_; }
102 102
103 virtual unsigned int PrepareTexture() = 0; 103 virtual unsigned int PrepareTexture() = 0;
104 virtual WebKit::WebGraphicsContext3D* HostContext3D() = 0; 104 virtual WebKit::WebGraphicsContext3D* HostContext3D() = 0;
105 105
106 virtual void Consume(const gfx::Size& new_size) {}
107 virtual void Produce() {}
108
106 protected: 109 protected:
107 virtual ~Texture(); 110 virtual ~Texture();
111 gfx::Size size_; // in pixel
108 112
109 private: 113 private:
110 friend class base::RefCounted<Texture>; 114 friend class base::RefCounted<Texture>;
111 115
112 bool flipped_; 116 bool flipped_;
113 gfx::Size size_; // in pixel
114 float device_scale_factor_; 117 float device_scale_factor_;
115 118
116 DISALLOW_COPY_AND_ASSIGN(Texture); 119 DISALLOW_COPY_AND_ASSIGN(Texture);
117 }; 120 };
118 121
119 // An interface to allow the compositor to communicate with its owner. 122 // An interface to allow the compositor to communicate with its owner.
120 class COMPOSITOR_EXPORT CompositorDelegate { 123 class COMPOSITOR_EXPORT CompositorDelegate {
121 public: 124 public:
122 // Requests the owner to schedule a redraw of the layer tree. 125 // Requests the owner to schedule a redraw of the layer tree.
123 virtual void ScheduleDraw() = 0; 126 virtual void ScheduleDraw() = 0;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 int last_ended_frame_; 260 int last_ended_frame_;
258 261
259 bool disable_schedule_composite_; 262 bool disable_schedule_composite_;
260 263
261 DISALLOW_COPY_AND_ASSIGN(Compositor); 264 DISALLOW_COPY_AND_ASSIGN(Compositor);
262 }; 265 };
263 266
264 } // namespace ui 267 } // namespace ui
265 268
266 #endif // UI_COMPOSITOR_COMPOSITOR_H_ 269 #endif // UI_COMPOSITOR_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698