OLD | NEW |
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/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Texture provide an abstraction over the external texture that can be passed | 94 // Texture provide an abstraction over the external texture that can be passed |
95 // to a layer. | 95 // to a layer. |
96 class COMPOSITOR_EXPORT Texture : public base::RefCounted<Texture> { | 96 class COMPOSITOR_EXPORT Texture : public base::RefCounted<Texture> { |
97 public: | 97 public: |
98 Texture(bool flipped, const gfx::Size& size); | 98 Texture(bool flipped, const gfx::Size& size); |
99 | 99 |
100 unsigned int texture_id() const { return texture_id_; } | 100 unsigned int texture_id() const { return texture_id_; } |
101 void set_texture_id(unsigned int id) { texture_id_ = id; } | 101 void set_texture_id(unsigned int id) { texture_id_ = id; } |
102 bool flipped() const { return flipped_; } | 102 bool flipped() const { return flipped_; } |
103 gfx::Size size() const { return size_; } | 103 gfx::Size size() const { return size_; } |
| 104 virtual WebKit::WebGraphicsContext3D* HostContext3D() = 0; |
104 | 105 |
105 protected: | 106 protected: |
106 virtual ~Texture(); | 107 virtual ~Texture(); |
107 | 108 |
108 private: | 109 private: |
109 friend class base::RefCounted<Texture>; | 110 friend class base::RefCounted<Texture>; |
110 | 111 |
111 unsigned int texture_id_; | 112 unsigned int texture_id_; |
112 bool flipped_; | 113 bool flipped_; |
113 gfx::Size size_; // in pixel | 114 gfx::Size size_; // in pixel |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 int last_ended_frame_; | 257 int last_ended_frame_; |
257 | 258 |
258 bool disable_schedule_composite_; | 259 bool disable_schedule_composite_; |
259 | 260 |
260 DISALLOW_COPY_AND_ASSIGN(Compositor); | 261 DISALLOW_COPY_AND_ASSIGN(Compositor); |
261 }; | 262 }; |
262 | 263 |
263 } // namespace ui | 264 } // namespace ui |
264 | 265 |
265 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 266 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |