OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_EXO_SURFACE_H_ | 5 #ifndef COMPONENTS_EXO_SURFACE_H_ |
6 #define COMPONENTS_EXO_SURFACE_H_ | 6 #define COMPONENTS_EXO_SURFACE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
193 // Called when the begin frame source has changed. | 193 // Called when the begin frame source has changed. |
194 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source); | 194 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source); |
195 | 195 |
196 // Check whether this Surface and its children need to create new cc::Surface | 196 // Check whether this Surface and its children need to create new cc::Surface |
197 // IDs for their contents next time they get new buffer contents. | 197 // IDs for their contents next time they get new buffer contents. |
198 void CheckIfSurfaceHierarchyNeedsCommitToNewSurfaces(); | 198 void CheckIfSurfaceHierarchyNeedsCommitToNewSurfaces(); |
199 | 199 |
200 // Returns the active contents size. | 200 // Returns the active contents size. |
201 gfx::Size content_size() const { return content_size_; } | 201 gfx::Size content_size() const { return content_size_; } |
202 | 202 |
203 // Returns true if this surface represents an annotation layer. | |
204 bool GetAnnotationLayer() const { return annotation_layer_; } | |
reveman
2017/05/23 16:41:06
Can we add an ash window property for this instead
Vladislav Kaznacheev
2017/05/23 23:48:56
Done.
| |
205 | |
206 // Sets the "annotation layer" flag. | |
207 void SetAnnotationLayer(bool on) { annotation_layer_ = on; } | |
reveman
2017/05/23 16:41:06
exo::Surface API should match the wayland interfac
Vladislav Kaznacheev
2017/05/23 23:48:55
Done.
| |
208 | |
203 // Overridden from ui::ContextFactoryObserver: | 209 // Overridden from ui::ContextFactoryObserver: |
204 void OnLostResources() override; | 210 void OnLostResources() override; |
205 | 211 |
206 // Overridden from aura::WindowObserver: | 212 // Overridden from aura::WindowObserver: |
207 void OnWindowAddedToRootWindow(aura::Window* window) override; | 213 void OnWindowAddedToRootWindow(aura::Window* window) override; |
208 void OnWindowRemovingFromRootWindow(aura::Window* window, | 214 void OnWindowRemovingFromRootWindow(aura::Window* window, |
209 aura::Window* new_root) override; | 215 aura::Window* new_root) override; |
210 | 216 |
211 // Overridden from ui::CompositorVSyncManager::Observer: | 217 // Overridden from ui::CompositorVSyncManager::Observer: |
212 void OnUpdateVSyncParameters(base::TimeTicks timebase, | 218 void OnUpdateVSyncParameters(base::TimeTicks timebase, |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
380 SurfaceDelegate* delegate_ = nullptr; | 386 SurfaceDelegate* delegate_ = nullptr; |
381 | 387 |
382 // Surface observer list. Surface does not own the observers. | 388 // Surface observer list. Surface does not own the observers. |
383 base::ObserverList<SurfaceObserver, true> observers_; | 389 base::ObserverList<SurfaceObserver, true> observers_; |
384 | 390 |
385 // The begin frame source being observed. | 391 // The begin frame source being observed. |
386 cc::BeginFrameSource* begin_frame_source_ = nullptr; | 392 cc::BeginFrameSource* begin_frame_source_ = nullptr; |
387 bool needs_begin_frame_ = false; | 393 bool needs_begin_frame_ = false; |
388 cc::BeginFrameAck current_begin_frame_ack_; | 394 cc::BeginFrameAck current_begin_frame_ack_; |
389 | 395 |
396 // Whether this surface represents an annotation layer. | |
397 bool annotation_layer_ = false; | |
398 | |
390 DISALLOW_COPY_AND_ASSIGN(Surface); | 399 DISALLOW_COPY_AND_ASSIGN(Surface); |
391 }; | 400 }; |
392 | 401 |
393 } // namespace exo | 402 } // namespace exo |
394 | 403 |
395 #endif // COMPONENTS_EXO_SURFACE_H_ | 404 #endif // COMPONENTS_EXO_SURFACE_H_ |
OLD | NEW |