OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GFX_COMPOSITOR_COMPOSITOR_H_ | 5 #ifndef UI_GFX_COMPOSITOR_COMPOSITOR_H_ |
6 #define UI_GFX_COMPOSITOR_COMPOSITOR_H_ | 6 #define UI_GFX_COMPOSITOR_COMPOSITOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 private: | 66 private: |
67 friend class base::RefCounted<Texture>; | 67 friend class base::RefCounted<Texture>; |
68 }; | 68 }; |
69 | 69 |
70 // An interface to allow the compositor to communicate with its owner. | 70 // An interface to allow the compositor to communicate with its owner. |
71 class COMPOSITOR_EXPORT CompositorDelegate { | 71 class COMPOSITOR_EXPORT CompositorDelegate { |
72 public: | 72 public: |
73 // Requests the owner to schedule a paint. | 73 // Requests the owner to schedule a paint. |
74 virtual void ScheduleCompositorPaint() = 0; | 74 virtual void ScheduleCompositorPaint() = 0; |
| 75 |
| 76 protected: |
| 77 virtual ~CompositorDelegate() {} |
75 }; | 78 }; |
76 | 79 |
77 // Compositor object to take care of GPU painting. | 80 // Compositor object to take care of GPU painting. |
78 // A Browser compositor object is responsible for generating the final | 81 // A Browser compositor object is responsible for generating the final |
79 // displayable form of pixels comprising a single widget's contents. It draws an | 82 // displayable form of pixels comprising a single widget's contents. It draws an |
80 // appropriately transformed texture for each transformed view in the widget's | 83 // appropriately transformed texture for each transformed view in the widget's |
81 // view hierarchy. | 84 // view hierarchy. |
82 class COMPOSITOR_EXPORT Compositor : public base::RefCounted<Compositor> { | 85 class COMPOSITOR_EXPORT Compositor : public base::RefCounted<Compositor> { |
83 public: | 86 public: |
84 // Create a compositor from the provided handle. | 87 // Create a compositor from the provided handle. |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 Layer* root_layer_; | 156 Layer* root_layer_; |
154 | 157 |
155 ObserverList<CompositorObserver> observer_list_; | 158 ObserverList<CompositorObserver> observer_list_; |
156 | 159 |
157 friend class base::RefCounted<Compositor>; | 160 friend class base::RefCounted<Compositor>; |
158 }; | 161 }; |
159 | 162 |
160 } // namespace ui | 163 } // namespace ui |
161 | 164 |
162 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_ | 165 #endif // UI_GFX_COMPOSITOR_COMPOSITOR_H_ |
OLD | NEW |