| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 } | 28 } |
| 29 | 29 |
| 30 namespace gfx { | 30 namespace gfx { |
| 31 class GLContext; | 31 class GLContext; |
| 32 class GLSurface; | 32 class GLSurface; |
| 33 class GLShareGroup; | 33 class GLShareGroup; |
| 34 class Point; | 34 class Point; |
| 35 class Rect; | 35 class Rect; |
| 36 } | 36 } |
| 37 | 37 |
| 38 namespace gpu { | |
| 39 struct Mailbox; | |
| 40 } | |
| 41 | |
| 42 namespace WebKit { | 38 namespace WebKit { |
| 43 class WebGraphicsContext3D; | 39 class WebGraphicsContext3D; |
| 44 } | 40 } |
| 45 | 41 |
| 46 namespace ui { | 42 namespace ui { |
| 47 | 43 |
| 48 class Compositor; | 44 class Compositor; |
| 49 class CompositorObserver; | 45 class CompositorObserver; |
| 50 class Layer; | 46 class Layer; |
| 51 class PostedSwapQueue; | 47 class PostedSwapQueue; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 Texture(bool flipped, const gfx::Size& size, float device_scale_factor); | 121 Texture(bool flipped, const gfx::Size& size, float device_scale_factor); |
| 126 | 122 |
| 127 bool flipped() const { return flipped_; } | 123 bool flipped() const { return flipped_; } |
| 128 gfx::Size size() const { return size_; } | 124 gfx::Size size() const { return size_; } |
| 129 float device_scale_factor() const { return device_scale_factor_; } | 125 float device_scale_factor() const { return device_scale_factor_; } |
| 130 | 126 |
| 131 virtual unsigned int PrepareTexture() = 0; | 127 virtual unsigned int PrepareTexture() = 0; |
| 132 virtual WebKit::WebGraphicsContext3D* HostContext3D() = 0; | 128 virtual WebKit::WebGraphicsContext3D* HostContext3D() = 0; |
| 133 | 129 |
| 134 // Replaces the texture with the texture from the specified mailbox. | 130 // Replaces the texture with the texture from the specified mailbox. |
| 135 virtual void Consume(const gpu::Mailbox& mailbox_name, | 131 virtual void Consume(const std::string& mailbox_name, |
| 136 const gfx::Size& new_size) {} | 132 const gfx::Size& new_size) {} |
| 137 | 133 |
| 138 // Moves the texture into the mailbox and returns the mailbox name. | 134 // Moves the texture into the mailbox and returns the mailbox name. |
| 139 // The texture must have been previously consumed from a mailbox. | 135 // The texture must have been previously consumed from a mailbox. |
| 140 virtual gpu::Mailbox Produce(); | 136 virtual std::string Produce(); |
| 141 | 137 |
| 142 protected: | 138 protected: |
| 143 virtual ~Texture(); | 139 virtual ~Texture(); |
| 144 gfx::Size size_; // in pixel | 140 gfx::Size size_; // in pixel |
| 145 | 141 |
| 146 private: | 142 private: |
| 147 friend class base::RefCounted<Texture>; | 143 friend class base::RefCounted<Texture>; |
| 148 | 144 |
| 149 bool flipped_; | 145 bool flipped_; |
| 150 float device_scale_factor_; | 146 float device_scale_factor_; |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 bool disable_schedule_composite_; | 334 bool disable_schedule_composite_; |
| 339 | 335 |
| 340 CompositorLock* compositor_lock_; | 336 CompositorLock* compositor_lock_; |
| 341 | 337 |
| 342 DISALLOW_COPY_AND_ASSIGN(Compositor); | 338 DISALLOW_COPY_AND_ASSIGN(Compositor); |
| 343 }; | 339 }; |
| 344 | 340 |
| 345 } // namespace ui | 341 } // namespace ui |
| 346 | 342 |
| 347 #endif // UI_COMPOSITOR_COMPOSITOR_H_ | 343 #endif // UI_COMPOSITOR_COMPOSITOR_H_ |
| OLD | NEW |