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; | |
105 | 104 |
106 protected: | 105 protected: |
107 virtual ~Texture(); | 106 virtual ~Texture(); |
108 | 107 |
109 private: | 108 private: |
110 friend class base::RefCounted<Texture>; | 109 friend class base::RefCounted<Texture>; |
111 | 110 |
112 unsigned int texture_id_; | 111 unsigned int texture_id_; |
113 bool flipped_; | 112 bool flipped_; |
114 gfx::Size size_; // in pixel | 113 gfx::Size size_; // in pixel |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 int last_ended_frame_; | 256 int last_ended_frame_; |
258 | 257 |
259 bool disable_schedule_composite_; | 258 bool disable_schedule_composite_; |
260 | 259 |
261 DISALLOW_COPY_AND_ASSIGN(Compositor); | 260 DISALLOW_COPY_AND_ASSIGN(Compositor); |
262 }; | 261 }; |
263 | 262 |
264 } // namespace ui | 263 } // namespace ui |
265 | 264 |
266 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 265 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |